cf 1.0.0-beta.24 → 1.0.0-beta.26

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 (243) hide show
  1. package/dist/_meta/commands.json +497 -145
  2. package/dist/_meta/hand-written-commands.json +60 -1
  3. package/dist/_meta/schemas.json +254 -2
  4. package/dist/{abuse-reports-CTOO4FJ4.mjs → abuse-reports-zPrsxbRz.mjs} +3 -3
  5. package/dist/{access-DFGLlXpy.mjs → access-DCOOmDC5.mjs} +1 -1
  6. package/dist/{accounts-C-wpV8Az.mjs → accounts-HC6XuIwP.mjs} +36 -34
  7. package/dist/{acm-thIt17mv.mjs → acm-DYgr6SAR.mjs} +1 -1
  8. package/dist/{addressing-D7VI7-Oi.mjs → addressing-BS66pJ_a.mjs} +1 -1
  9. package/dist/{agent-memory-duLTH8pl.mjs → agent-memory-BbXdueL0.mjs} +1 -1
  10. package/dist/{ai-ctIjDCq0.mjs → ai-BiIKznNv.mjs} +3 -3
  11. package/dist/{ai-audit-CjhuS21p.mjs → ai-audit-DI4Rw2wl.mjs} +1 -1
  12. package/dist/{ai-gateway-B1TIw7wl.mjs → ai-gateway-rlYCbts5.mjs} +3 -3
  13. package/dist/{ai-search-DUQBnOWH.mjs → ai-search-QOenIzDL.mjs} +1 -1
  14. package/dist/{ai-security-bdABwEIR.mjs → ai-security-BUwS6kVh.mjs} +2 -2
  15. package/dist/{alerting-I_KErGZy.mjs → alerting-BSzuvFk1.mjs} +1 -1
  16. package/dist/{analytics-DGxcDAWu.mjs → analytics-CQ-Yt1mm.mjs} +1 -1
  17. package/dist/{analytics-engine-DNNokw1O.mjs → analytics-engine-CdrY5-95.mjs} +1 -1
  18. package/dist/{api-security-CsPrJ-Xw.mjs → api-security-BBxEJjGv.mjs} +3 -3
  19. package/dist/{argo-BhNmRYk5.mjs → argo-BiefH8wc.mjs} +1 -1
  20. package/dist/{artifacts-DRo8KadB.mjs → artifacts-B9g9aPrk.mjs} +3 -3
  21. package/dist/{audit-logs-CzxDyTbx.mjs → audit-logs-BhJs-OS2.mjs} +1 -1
  22. package/dist/auth-C50SqX9F.mjs +7 -0
  23. package/dist/auth-Czzy5Rs_.mjs +2 -0
  24. package/dist/{auth-pbuzyz4C.mjs → auth-D5Yj9eYU.mjs} +1 -1
  25. package/dist/{auth-token-BcIV7k1B.mjs → auth-token-DvNoIhRL.mjs} +1 -1
  26. package/dist/{autoconfig-CXcy-e1R.mjs → autoconfig-ldsgXxa6.mjs} +75 -65
  27. package/dist/{basin-catalog-DoTn8zvi.mjs → basin-catalog-CtKFiH-n.mjs} +9 -9
  28. package/dist/{billing-CMbLzZV0.mjs → billing-BrLJqlOf.mjs} +1 -1
  29. package/dist/{blocks-DmOx-xEv.mjs → blocks-DnNrvi8s.mjs} +1 -1
  30. package/dist/{bot-management-CJs5WwAW.mjs → bot-management-BSBVuKc0.mjs} +1 -1
  31. package/dist/{botnet-feed-DeF7P5lI.mjs → botnet-feed-lD9s2oLA.mjs} +1 -1
  32. package/dist/{brand-protection-dx_B8OWa.mjs → brand-protection-Byoa1hvj.mjs} +2 -2
  33. package/dist/{browser-run-fRn9ItYu.mjs → browser-run-BSVANGzU.mjs} +1 -1
  34. package/dist/build-CPKxZ3kL.mjs +2 -0
  35. package/dist/{build-CCepbVuJ.mjs → build-Dwd1_7o0.mjs} +1 -1
  36. package/dist/{builds-5YhQ_zIm.mjs → builds-D3mAH87h.mjs} +1 -1
  37. package/dist/{cache-WQyxt7O5.mjs → cache-0xCdyNg9.mjs} +1 -1
  38. package/dist/cf-CpC4giTf.mjs +18 -0
  39. package/dist/{chunk-3PJ54H4K-C8sxQzhB.mjs → chunk-3PJ54H4K-CY8EY_n2.mjs} +1 -1
  40. package/dist/{chunk-2HLTAS5V-B92NbX1j.mjs → chunk-AAQI36FL-e6E5HW1g.mjs} +1 -1
  41. package/dist/{chunk-DSGVRFIS-CP2xC0bc.mjs → chunk-DSGVRFIS-vdfri8fR.mjs} +1 -1
  42. package/dist/{cli-CgkhNdjb.mjs → cli-Cm4Twas4.mjs} +3 -3
  43. package/dist/{client-side-security-COuAb7BM.mjs → client-side-security-BRn7KBpu.mjs} +1 -1
  44. package/dist/{cloud-connector-D1gjX0Dx.mjs → cloud-connector-DqkOIRDr.mjs} +1 -1
  45. package/dist/{cloudflared-FEg1GxHT.mjs → cloudflared-DDp_8PTK.mjs} +1 -1
  46. package/dist/{cloudforce-one-BmXgL6kB.mjs → cloudforce-one-B9k8vhso.mjs} +58 -58
  47. package/dist/{command-CA6yIa17.mjs → command--Y_QAiU2.mjs} +1 -1
  48. package/dist/{command-hh8rEbH4.mjs → command-B-_ba4rQ.mjs} +1 -1
  49. package/dist/{command-Dsi4sM8D.mjs → command-BKNQsGqu.mjs} +1 -1
  50. package/dist/{command-BG9JYUHo.mjs → command-BV8-laJK.mjs} +1 -1
  51. package/dist/{command-BaIY4UuC.mjs → command-BVz2aES3.mjs} +1 -1
  52. package/dist/{command-D3E7d8E7.mjs → command-BsCFkho-.mjs} +1 -1
  53. package/dist/{command-8hWrCCy6.mjs → command-CN8NFLs2.mjs} +1 -1
  54. package/dist/{command-B_Fxpr5v.mjs → command-CQMRxiDz.mjs} +1 -1
  55. package/dist/{command-DrdxR1tJ.mjs → command-CfOqnqlN.mjs} +1 -1
  56. package/dist/{command-WyIFe__L.mjs → command-DlI7Z_7j.mjs} +1 -1
  57. package/dist/{command-BJFKdqVc.mjs → command-Dn39o5xQ.mjs} +1 -1
  58. package/dist/{command-BfoLlrr1.mjs → command-DsOv6z9q.mjs} +1 -1
  59. package/dist/{command-qhfkede5.mjs → command-QHmV62Fv.mjs} +1 -1
  60. package/dist/{command-BXPssGfS.mjs → command-yOG9VUtq.mjs} +1 -1
  61. package/dist/{completions-BshG3sAO.mjs → completions-BA52jTea.mjs} +1 -1
  62. package/dist/{connector-interrupts-pNU4QmsW.mjs → connector-interrupts-zL7pxPn6.mjs} +1 -1
  63. package/dist/{connector-telemetry-events-BpRPtTdD.mjs → connector-telemetry-events-PL4Fqqvu.mjs} +1 -1
  64. package/dist/{connector-telemetry-snapshots-pNfynA2r.mjs → connector-telemetry-snapshots-DyBSuEFB.mjs} +1 -1
  65. package/dist/{connectors-CiWTAGHh.mjs → connectors-D8H6rQz9.mjs} +1 -1
  66. package/dist/{containers-IBtaInTL.mjs → containers-D4sa-Eoy.mjs} +193 -193
  67. package/dist/{containers-Dvq0NjQg.mjs → containers-Db-eWudu.mjs} +2 -2
  68. package/dist/{content-scan-B69hOyhb.mjs → content-scan-DUVq09i8.mjs} +1 -1
  69. package/dist/{context-BryBS1zQ.mjs → context-BvLXzoMs.mjs} +1 -1
  70. package/dist/{cps-DLgWaZMT.mjs → cps-CqaRliZZ.mjs} +1 -1
  71. package/dist/{csam-scanner-D1928b81.mjs → csam-scanner-DsXvOOsZ.mjs} +1 -1
  72. package/dist/{custom-csrs-DrxWBjmx.mjs → custom-csrs-Dl_daAbX.mjs} +1 -1
  73. package/dist/{custom-hostnames-BP1pxK1F.mjs → custom-hostnames-Cj_csfo_.mjs} +1 -1
  74. package/dist/{custom-nameservers-5DJLY479.mjs → custom-nameservers-Bw2P7F_W.mjs} +1 -1
  75. package/dist/{custom-pages-CNAsOY9a.mjs → custom-pages-CJ7ecSX6.mjs} +1 -1
  76. package/dist/{d1-Dge80Qgq.mjs → d1-BsWI546w.mjs} +2 -2
  77. package/dist/{delegate-CBKb0nov.mjs → delegate-CMfEjvHn.mjs} +1 -1
  78. package/dist/delegate.mjs +1 -1
  79. package/dist/{deploy-CR5b7uhB.mjs → deploy-DDbmxkiX.mjs} +1 -1
  80. package/dist/{deploy-context-D51tgJGI.mjs → deploy-context-DsEVu7bf.mjs} +1 -1
  81. package/dist/{deploy-input-em95cFc7.mjs → deploy-input-BA_3Q2Xu.mjs} +1 -1
  82. package/dist/{dev-BczBHbpj.mjs → dev-BS156bim.mjs} +1 -1
  83. package/dist/{diagnostics-BKKinCge.mjs → diagnostics-BmkQnSEb.mjs} +1 -1
  84. package/dist/{dist-D5YYi2LO.mjs → dist-DehXZozc.mjs} +4 -4
  85. package/dist/{dls-DU4HnxED.mjs → dls-DciZC_gQ.mjs} +1 -1
  86. package/dist/{dns-BzdH3geY.mjs → dns-C2YPspGN.mjs} +60 -58
  87. package/dist/{dns-firewall-puq_86Wd.mjs → dns-firewall-CRfde07f.mjs} +1 -1
  88. package/dist/{docs-AWb7X2VX.mjs → docs-CYjyBA8q.mjs} +1 -1
  89. package/dist/{dotenv-qsoPELMm.mjs → dotenv-DKRemNCH.mjs} +1 -1
  90. package/dist/{durable-objects-Dg6XPcsB.mjs → durable-objects-DcI97y4p.mjs} +1 -1
  91. package/dist/{email-auth-DXR0NU9R.mjs → email-auth-CMCQAu99.mjs} +1 -1
  92. package/dist/{email-domains-B00mAtjT.mjs → email-domains-1Nx60ETD.mjs} +1 -1
  93. package/dist/{email-routing-Cm19q9hA.mjs → email-routing-7p9dr5Ue.mjs} +1 -1
  94. package/dist/{email-security-CFKcS-DM.mjs → email-security-Bu0fAYh-.mjs} +2 -2
  95. package/dist/{email-sending-B3xSoKcC.mjs → email-sending-OpMZNaHZ.mjs} +1 -1
  96. package/dist/error-sanitization-B025CygB.mjs +2 -0
  97. package/dist/{error-sanitization-ahuAGEjT.mjs → error-sanitization-DG8WSzHe.mjs} +1 -1
  98. package/dist/{errors-CIQDUrWg.mjs → errors-C5RGao2J.mjs} +1 -1
  99. package/dist/{field-extractors-Csz8QknP.mjs → field-extractors-BfsNjd0e.mjs} +1 -1
  100. package/dist/{firewall-C8FW0Nb2.mjs → firewall-CJ-VIOk1.mjs} +22 -16
  101. package/dist/{flagship-v-bGZ_U-.mjs → flagship-C5PTR1ND.mjs} +1 -1
  102. package/dist/{fraud-VvfL2I5a.mjs → fraud-B7hwBheX.mjs} +1 -1
  103. package/dist/{google-tag-gateway-DF6fS2MQ.mjs → google-tag-gateway-D7iFDVEa.mjs} +1 -1
  104. package/dist/{healthchecks-D3p3E4WL.mjs → healthchecks-B4jTcKV7.mjs} +1 -1
  105. package/dist/{hyperdrive-DopYL1dK.mjs → hyperdrive-1432DM-p.mjs} +1 -1
  106. package/dist/{iam-cIfyshlf.mjs → iam-DuZenYtc.mjs} +1 -1
  107. package/dist/{images-BR5fP_6r.mjs → images-Ttea4khD.mjs} +1 -1
  108. package/dist/index.mjs +1 -1
  109. package/dist/{init-JXRQoqGP.mjs → init-BeYrAg7Q.mjs} +1 -1
  110. package/dist/{intel-BvNrrM7V.mjs → intel-CJznBf5n.mjs} +2 -2
  111. package/dist/{interactive-DOWEcR6_.mjs → interactive-DsU8VDvK.mjs} +1 -1
  112. package/dist/{internal-DcnAVlpA.mjs → internal-DOho_iA0.mjs} +1 -1
  113. package/dist/{ips-BUEIuhhw.mjs → ips-BgNoRwFN.mjs} +1 -1
  114. package/dist/{k2-Dm4LvAhL.mjs → k2-Cj1ORHul.mjs} +1 -1
  115. package/dist/{kv-7oD-JIak.mjs → kv-CTyuvcAz.mjs} +1 -1
  116. package/dist/{lazy-command-CD1nuS38.mjs → lazy-command-DeTzOWvU.mjs} +1 -1
  117. package/dist/{leaked-credential-checks-B6s8hUYU.mjs → leaked-credential-checks-21Wc7OqL.mjs} +1 -1
  118. package/dist/list-4MfEFwJN.mjs +2 -0
  119. package/dist/list-ByCv9-Fl.mjs +2 -0
  120. package/dist/{live-CHP4AXSN.mjs → live-BfrWKfq8.mjs} +1 -1
  121. package/dist/{load-balancers-B_yvINGW.mjs → load-balancers-DMTsh-9q.mjs} +1 -1
  122. package/dist/local-CWTti4ot.mjs +2 -0
  123. package/dist/{local-CIeKNHSz.mjs → local-CvzO-cQH.mjs} +1 -1
  124. package/dist/{local-runtime-DOSBgJlo.mjs → local-runtime-DOpR_Tnc.mjs} +1 -1
  125. package/dist/{login-h8vuvNN3.mjs → login-CVWkMh1L.mjs} +2 -2
  126. package/dist/login-Djz5mvHJ.mjs +2 -0
  127. package/dist/{logpush-B70rNMOP.mjs → logpush-OMhp7VgE.mjs} +2 -2
  128. package/dist/{logs-DqmqCNqQ.mjs → logs-BSyyNwso.mjs} +1 -1
  129. package/dist/{magic-cloud-networking-CurtlBvl.mjs → magic-cloud-networking-DD29yMnE.mjs} +3 -3
  130. package/dist/{magic-network-monitoring-OzpX7MfI.mjs → magic-network-monitoring-DRRvSrDP.mjs} +1 -1
  131. package/dist/{magic-transit-Ca_CROhr.mjs → magic-transit-BhP424T-.mjs} +1 -1
  132. package/dist/{managed-defense-BRxv0mgy.mjs → managed-defense-6l_B3hn_.mjs} +1 -1
  133. package/dist/{managed-transforms-C7YLIPdN.mjs → managed-transforms-D7FMBsnq.mjs} +1 -1
  134. package/dist/{mcp-B_StIx94.mjs → mcp-BUOfMkBP.mjs} +1 -1
  135. package/dist/{mesh-YW-p6Tkx.mjs → mesh-B1RrhAT1.mjs} +1 -1
  136. package/dist/{migrate-CrBgU7Xm.mjs → migrate-BTU8AvlP.mjs} +1 -1
  137. package/dist/{monetization-rMP8HK_4.mjs → monetization-Da3ooFLC.mjs} +1 -1
  138. package/dist/{network-D9Do7C-u.mjs → network-CjhSzhMm.mjs} +2 -2
  139. package/dist/{network-interconnects-DYMhB3TR.mjs → network-interconnects-DEQD6GM8.mjs} +1 -1
  140. package/dist/{o11y-HT9_9NUF.mjs → o11y-DeNxXxcp.mjs} +1 -1
  141. package/dist/{oauth-D6uh5ZdS.mjs → oauth-DdXkpU44.mjs} +1 -1
  142. package/dist/{oauth-DetIFT59.mjs → oauth-Dnog5v-Q.mjs} +2 -2
  143. package/dist/{oauth-clients-B_BJco0Z.mjs → oauth-clients-UnbMcHkx.mjs} +1 -1
  144. package/dist/oauth-scopes-DbtnZVO4.mjs +4 -0
  145. package/dist/{organization-DhxMPdqU.mjs → organization-IsxVyWol.mjs} +4 -4
  146. package/dist/organizations-p8Mgo8A7.mjs +4 -0
  147. package/dist/{origin-post-quantum-encryption-CPZQGLmW.mjs → origin-post-quantum-encryption-Bwysyttf.mjs} +1 -1
  148. package/dist/package-BOE_De2L.mjs +2 -0
  149. package/dist/{page-rules-0nDfdFWr.mjs → page-rules-D2eFbKWb.mjs} +1 -1
  150. package/dist/{pages-Br-w5HLL.mjs → pages-DYZDvWK6.mjs} +2 -2
  151. package/dist/{pay-per-crawl-Di6UpJoo.mjs → pay-per-crawl-CgPFv5HT.mjs} +1 -1
  152. package/dist/{pay-per-use-Bm7Nxf6s.mjs → pay-per-use-BIQrsrTy.mjs} +1 -1
  153. package/dist/{pipelines-BRVI3bV9.mjs → pipelines-D6pkhlpm.mjs} +1 -1
  154. package/dist/{precursor-DyrQWdO5.mjs → precursor-B35P8h6h.mjs} +1 -1
  155. package/dist/{previews-rpfwcJzi.mjs → previews-B1mqjXaJ.mjs} +1 -1
  156. package/dist/{progress-C_yVLVcl.mjs → progress-B-CVX0kn.mjs} +1 -1
  157. package/dist/{prompt-kxvGZ6nF.mjs → prompt-DJF_Rs5S.mjs} +1 -1
  158. package/dist/{queues-BGV3aC26.mjs → queues-DaqLO-UO.mjs} +1 -1
  159. package/dist/{r2-CWMqr3JJ.mjs → r2-DDIU9JN3.mjs} +1 -1
  160. package/dist/radar-D59qCgld.mjs +300 -0
  161. package/dist/{raw-fetch-C_hWBr7n.mjs → raw-fetch-BrOxDN9k.mjs} +1 -1
  162. package/dist/{ready-BXz5amSL.mjs → ready-DgE08svD.mjs} +1 -1
  163. package/dist/{realtime-9jG5GaNK.mjs → realtime-DWjdrDzv.mjs} +2 -2
  164. package/dist/{registrar-sandbox-D9ldxGPo.mjs → registrar-sandbox-uzs3eOKk.mjs} +2 -2
  165. package/dist/{registrar-C-2I1SJh.mjs → registrar-uYOU1U27.mjs} +10 -10
  166. package/dist/{reporting-Bk3dc6Gi.mjs → reporting-Dx2YTick.mjs} +1 -1
  167. package/dist/{request-headers-B5Rjq7Ic.mjs → request-headers-DHzBX7dQ.mjs} +1 -1
  168. package/dist/{request-tracers-H-iRAUdG.mjs → request-tracers-B49cBKkj.mjs} +1 -1
  169. package/dist/{resource-sharing-A6ITunsT.mjs → resource-sharing-CIsLVAcK.mjs} +2 -2
  170. package/dist/{rules-BntvQdnS.mjs → rules-CjgLSlUC.mjs} +1 -1
  171. package/dist/{rulesets-DKz_iYU_.mjs → rulesets-C7_aZA7m.mjs} +1 -1
  172. package/dist/{rum-D9zpcNqT.mjs → rum-vPEpMS_h.mjs} +1 -1
  173. package/dist/{run-BlSXngtI.mjs → run-BZ6Fj3jQ.mjs} +1 -1
  174. package/dist/run-D4-K_cbQ.mjs +2 -0
  175. package/dist/schema-cache-C_rvto6Y.mjs +3 -0
  176. package/dist/schema-flags-Cr6kleor.mjs +4 -0
  177. package/dist/{scim-DVhxKKpH.mjs → scim-BA7XbsSu.mjs} +1 -1
  178. package/dist/{secrets-store-3mxJrDWJ.mjs → secrets-store-MEUNt1Ph.mjs} +2 -2
  179. package/dist/{security-insights-BDLWuG0E.mjs → security-insights-ZKtey62s.mjs} +5 -5
  180. package/dist/{security-txt-COzdrpdW.mjs → security-txt-DikhnR2L.mjs} +1 -1
  181. package/dist/{session-X3xaW70I.mjs → session-BOnam-Wv.mjs} +1 -1
  182. package/dist/{shared-foRpbmSV.mjs → shared-DmmWSObC.mjs} +1 -1
  183. package/dist/{signed-url-Dgi1p-Qi.mjs → signed-url-C-24KbWB.mjs} +1 -1
  184. package/dist/{smart-shield-DSDA5bZt.mjs → smart-shield-DPqLMz7M.mjs} +1 -1
  185. package/dist/{snippets-myowgDLd.mjs → snippets-Bi3Uq1DF.mjs} +1 -1
  186. package/dist/{spawn-C8D5pzxJ.mjs → spawn-C3hzWVrJ.mjs} +1 -1
  187. package/dist/{spectrum-CB-NzbZ7.mjs → spectrum-BaWKMoAl.mjs} +5 -5
  188. package/dist/{speed-UqKG1WDl.mjs → speed-DShjlpAs.mjs} +1 -1
  189. package/dist/{sql-BzikdIje.mjs → sql-DCoFf15T.mjs} +1 -1
  190. package/dist/{src-B9agxHh8.mjs → src-jyCTFHcS.mjs} +5 -5
  191. package/dist/{ssl-BmWWsUX6.mjs → ssl-C4nt4pJK.mjs} +2 -2
  192. package/dist/{startup-profile-B7yHR_YB.mjs → startup-profile-CFJ_Lu1c.mjs} +1 -1
  193. package/dist/startup-profile-D_Qjgca1.mjs +2 -0
  194. package/dist/state-C7lNNN31.mjs +2 -0
  195. package/dist/{state-DNuVv5i-.mjs → state-DmjHXZat.mjs} +1 -1
  196. package/dist/{stream-G87TzC9e.mjs → stream-CpZbnSpH.mjs} +1 -1
  197. package/dist/{tags-Ctl4fLux.mjs → tags-BIjQ3Kjh.mjs} +2 -2
  198. package/dist/{telemetry-CA0_i9-l.mjs → telemetry-BDhqOpUw.mjs} +1 -1
  199. package/dist/telemetry-BZdRnr26.mjs +2 -0
  200. package/dist/{tenant-t5yPFQOx.mjs → tenant-CqYoylyU.mjs} +1 -1
  201. package/dist/{tenant-custom-nameservers-B2ehXfQK.mjs → tenant-custom-nameservers-DDzzdyY3.mjs} +1 -1
  202. package/dist/{tunnels-DL_VgV0P.mjs → tunnels-CXAO2CeL.mjs} +3 -3
  203. package/dist/{turnstile-CEjw5vn6.mjs → turnstile-Ctm0rs0q.mjs} +1 -1
  204. package/dist/ui-BUCBQ3Sq.mjs +2 -0
  205. package/dist/{update-check-2Mn4Z1ln.mjs → update-check-D_Wtw0_D.mjs} +1 -1
  206. package/dist/{update-check-LF-JcHRF.mjs → update-check-Dc7cRFlx.mjs} +1 -1
  207. package/dist/update-check-worker.mjs +1 -1
  208. package/dist/{url-normalization-BL_BkGvP.mjs → url-normalization-DOfc2Q7a.mjs} +1 -1
  209. package/dist/{url-scanner-CVzV9Syq.mjs → url-scanner-J8M3X2tR.mjs} +2 -2
  210. package/dist/{user-YnQSmPNR.mjs → user-BaF0qvvO.mjs} +1 -1
  211. package/dist/{vectorize-C5ZwKQzI.mjs → vectorize-D5qiggZU.mjs} +1 -1
  212. package/dist/version-DNcdABcr.mjs +2 -0
  213. package/dist/{waiting-rooms-D9V1Fm16.mjs → waiting-rooms-BdmAq7ul.mjs} +1 -1
  214. package/dist/{web-assets-yzPkWgLy.mjs → web-assets-BySw_Tme.mjs} +5 -5
  215. package/dist/{web3-DbWNUhP4.mjs → web3-BKkKf1RF.mjs} +1 -1
  216. package/dist/{workers-r9Aj68v1.mjs → workers-TS0oQ-XH.mjs} +2 -2
  217. package/dist/{workers-builds-DgIDPDhj.mjs → workers-builds-CVJ4FqzB.mjs} +1 -1
  218. package/dist/{workers-for-platforms-CoPp1ez5.mjs → workers-for-platforms-mzdtmr6r.mjs} +1 -1
  219. package/dist/{workers-vpc-Cvjg15bk.mjs → workers-vpc-xB1hHFPd.mjs} +1 -1
  220. package/dist/{workflows-D4SIo58Q.mjs → workflows-Cr957c4U.mjs} +1 -1
  221. package/dist/{wrangler-migration-D2HwxIG5.mjs → wrangler-migration-DZV7-4Fp.mjs} +5 -5
  222. package/dist/{zaraz-CkqpiZBH.mjs → zaraz-C8__FhOh.mjs} +2 -2
  223. package/dist/{zero-trust-CEY-lohP.mjs → zero-trust-BVCvQJ4e.mjs} +64 -58
  224. package/dist/{zones-BWieAez1.mjs → zones-BzyjOT10.mjs} +2 -2
  225. package/package.json +12 -12
  226. package/dist/auth-B2V5gsm4.mjs +0 -2
  227. package/dist/auth-CyF_s5ic.mjs +0 -2
  228. package/dist/build-CgpCJjPA.mjs +0 -2
  229. package/dist/cf-CInFH4Ng.mjs +0 -18
  230. package/dist/error-sanitization-rodO1WCL.mjs +0 -2
  231. package/dist/local-CTaqb1nl.mjs +0 -2
  232. package/dist/login-pt6gTX3x.mjs +0 -2
  233. package/dist/oauth-scopes-Cub2pl0Z.mjs +0 -4
  234. package/dist/organizations-DIduPB74.mjs +0 -4
  235. package/dist/package-Bf2u3-yO.mjs +0 -2
  236. package/dist/radar-D8x_TUAi.mjs +0 -300
  237. package/dist/run-DB1-Sj9a.mjs +0 -2
  238. package/dist/schema-flags-CoTAkrz8.mjs +0 -5
  239. package/dist/startup-profile-zt6cFnBn.mjs +0 -2
  240. package/dist/state-C5mQ9At8.mjs +0 -2
  241. package/dist/telemetry-jl3s2-bN.mjs +0 -2
  242. package/dist/ui-Dt1-eURh.mjs +0 -2
  243. package/dist/version-Bz705iJe.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CIeKNHSz.mjs";import{i as n,n as r}from"./auth-pbuzyz4C.mjs";import{a as i,t as a}from"./context-BryBS1zQ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-C_yVLVcl.mjs";import{t as l}from"./run-BlSXngtI.mjs";import"./telemetry-jl3s2-bN.mjs";import{a as u,i as d,n as f,r as p,s as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g,t as _}from"./input-validation-D7z60HJH.mjs";import{a as v,i as y,n as b}from"./prompt-kxvGZ6nF.mjs";import{n as x,t as S}from"./raw-fetch-C_hWBr7n.mjs";function ee(e){return e.usage(`$0 cloudforce-one binary-storage create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as u,i as d,n as f,r as p,s as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g,t as _}from"./input-validation-D7z60HJH.mjs";import{a as v,i as y,n as b}from"./prompt-DJF_Rs5S.mjs";import{n as x,t as S}from"./raw-fetch-BrOxDN9k.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 e=>l({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0){let t=new FormData;if(e.file){let n=_(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:t}));o(r,{successLabel:`Created`})}else if(e.body){let t=g(e.body,`body`,`binary`),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/binary/${t.hash}`,response:!1,errors:{400:`BadRequestError`}};function re(e){return e.usage(`$0 cloudforce-one binary-storage get <hash>
5
5
 
@@ -175,7 +175,7 @@ Returns a dataset by its ID.`).positional(`dataset-id`,{type:`string`,descriptio
175
175
 
176
176
  Lists the account's datasets. Set \`includeDeleted\` to include deleted datasets.`).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 Oa={command:`list`,describe:`List datasets`,builder:Da,handler:async e=>l({command:`cloudforce-one threat-intel datasets list`,classification:{safeFlags:[`include-deleted`,`dry-run`]}},e,async()=>{let n={includeDeleted:e[`include-deleted`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ea,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ka={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/datasets/populate`,errors:{400:`BadRequestError`}};function Aa(e){return e.usage(`$0 cloudforce-one threat-intel datasets populate
177
177
 
178
- Rebuilds the lists of attackers, categories, indicator types, and target industries for the account's datasets from their existing events. Datasets are processed in batches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ja={command:`populate`,describe:`Rebuild dataset lookup lists`,builder:Aa,handler:async e=>l({command:`cloudforce-one threat-intel datasets populate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel datasets populate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/populate`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(ka,{account_id:l}));o(u,{successLabel:`Created`})})};var Ma={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`}};function Na(e){return e.usage("$0 cloudforce-one threat-intel datasets update <dataset-id>\n\nUpdates a dataset's `name` and `isPublic` setting. Both fields are required.").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 Pa={command:`update <dataset-id>`,describe:`Update a dataset`,builder:Na,handler:async e=>l({command:`cloudforce-one threat-intel datasets update`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel datasets update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({isPublic:e[`is-public`],name:g(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Ma,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Updated`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await v(`name`,`Used to describe the dataset within the account context.`));let u=h({isPublic:e[`is-public`],name:g(e.name,`name`,`text`)}),d=await c(`Updating`,async()=>n.send(Ma,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Updated`})})},Fa={command:`datasets`,describe:`Operations for threat-intel.datasets`,builder:e=>e.command(ya).command(Sa).command(Ta).command(Oa).command(ja).command(Pa).command(ga).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ia={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/aggregate`,query:[`aggregateBy`,`datasetId`,`startDate`,`endDate`,`groupByDate`,`limit`],errors:{400:`BadRequestError`}};function La(e){return e.usage("$0 cloudforce-one threat-intel events aggregate\n\nCounts events grouped by one or more columns, such as `attacker` or `targetIndustry`. Optionally filter by date range and group the counts by day.").option(`aggregate-by`,{type:`string`,description:"Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry'). With `tags`, an event counts once for each of its tags, in the bucket counts and in `total`, and events without tags count as `Unknown`; `tags` is not supported for analytics datasets.",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 Ra={command:`aggregate`,describe:`Aggregate events`,builder:La,handler:async e=>l({command:`cloudforce-one threat-intel events aggregate`,classification:{safeFlags:[`group-by-date`,`dry-run`]}},e,async()=>{let n={aggregateBy:e[`aggregate-by`],datasetId:e[`dataset-id`],startDate:e[`start-date`],endDate:e[`end-date`],groupByDate:e[`group-by-date`],limit:e.limit};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events aggregate`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/aggregate`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ia,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var za={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/attackers`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function Ba(e){return e.usage("$0 cloudforce-one threat-intel events attackers list\n\nLists the attackers referenced by events in the datasets given by `datasetIds`, or in the default dataset when `datasetIds` is omitted.").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 Va={command:`list`,describe:`List attackers`,builder:Ba,handler:async e=>l({command:`cloudforce-one threat-intel events attackers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events attackers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/attackers`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(za,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Ha={command:`attackers`,describe:`Operations for threat-intel.events.attackers`,builder:e=>e.command(Va).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ua={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/create/bulk`,body:`json`,errors:{400:`BadRequestError`}};function Wa(e){return e.usage("$0 cloudforce-one threat-intel events bulk-create\n\nCreates multiple events in one dataset. `datasetId` is required; to find dataset IDs, use `threat-intel datasets list`. Set `includeCreatedEvents` to return the UUIDs of the created events.").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 Ga={command:`bulk-create`,describe:`Create events in bulk`,builder:Wa,handler:async e=>l({command:`cloudforce-one threat-intel events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/create/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({data:u(e.data,`data`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ua,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.data===void 0)throw Error(`--data is required (or pass --body with this field set).`);e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`The datasetId field`));let d=h({data:u(e.data,`data`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}),p=await c(`Creating`,async()=>n.send(Ua,{body:d,account_id:l}));o(p,{successLabel:`Created`})})};var Ka={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/update/bulk`,body:`json`,errors:{400:`BadRequestError`}};function qa(e){return e.usage(`$0 cloudforce-one threat-intel events bulk-update
178
+ Rebuilds the lists of attackers, categories, indicator types, and target industries for the account's datasets from their existing events. Datasets are processed in batches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ja={command:`populate`,describe:`Rebuild dataset lookup lists`,builder:Aa,handler:async e=>l({command:`cloudforce-one threat-intel datasets populate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel datasets populate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/populate`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(ka,{account_id:l}));o(u,{successLabel:`Created`})})};var Ma={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`}};function Na(e){return e.usage("$0 cloudforce-one threat-intel datasets update <dataset-id>\n\nUpdates a dataset's `name` and `isPublic` setting. Both fields are required.").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 Pa={command:`update <dataset-id>`,describe:`Update a dataset`,builder:Na,handler:async e=>l({command:`cloudforce-one threat-intel datasets update`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel datasets update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({isPublic:e[`is-public`],name:g(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Ma,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Updated`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await v(`name`,`Used to describe the dataset within the account context.`));let u=h({isPublic:e[`is-public`],name:g(e.name,`name`,`text`)}),d=await c(`Updating`,async()=>n.send(Ma,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Updated`})})},Fa={command:`datasets`,describe:`Operations for threat-intel.datasets`,builder:e=>e.command(ya).command(Sa).command(Ta).command(Oa).command(ja).command(Pa).command(ga).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ia={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/aggregate`,query:[`aggregateBy`,`datasetId`,`startDate`,`endDate`,`groupByDate`,`limit`],errors:{400:`BadRequestError`}};function La(e){return e.usage("$0 cloudforce-one threat-intel events aggregate\n\nCounts events grouped by one or more columns, such as `attacker` or `targetIndustry`. Optionally filter by date range and group the counts by day.").option(`aggregate-by`,{type:`string`,description:"Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry'). With `tags`, an event counts once for each of its tags, in the bucket counts and in `total`, and events without tags count as `Unknown`; `tags` is not supported for analytics datasets.",demandOption:!0}).option(`dataset-id`,{type:`string`,array:!0,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 Ra={command:`aggregate`,describe:`Aggregate events`,builder:La,handler:async e=>l({command:`cloudforce-one threat-intel events aggregate`,classification:{safeFlags:[`group-by-date`,`dry-run`]}},e,async()=>{let n={aggregateBy:e[`aggregate-by`],datasetId:e[`dataset-id`],startDate:e[`start-date`],endDate:e[`end-date`],groupByDate:e[`group-by-date`],limit:e.limit};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events aggregate`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/aggregate`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ia,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var za={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/attackers`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function Ba(e){return e.usage("$0 cloudforce-one threat-intel events attackers list\n\nLists the attackers referenced by events in the datasets given by `datasetIds`, or in the default dataset when `datasetIds` is omitted.").option(`dataset-ids`,{type:`string`,array:!0,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 Va={command:`list`,describe:`List attackers`,builder:Ba,handler:async e=>l({command:`cloudforce-one threat-intel events attackers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events attackers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/attackers`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(za,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Ha={command:`attackers`,describe:`Operations for threat-intel.events.attackers`,builder:e=>e.command(Va).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ua={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/create/bulk`,body:`json`,errors:{400:`BadRequestError`}};function Wa(e){return e.usage("$0 cloudforce-one threat-intel events bulk-create\n\nCreates multiple events in one dataset. `datasetId` is required; to find dataset IDs, use `threat-intel datasets list`. Set `includeCreatedEvents` to return the UUIDs of the created events.").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 Ga={command:`bulk-create`,describe:`Create events in bulk`,builder:Wa,handler:async e=>l({command:`cloudforce-one threat-intel events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/create/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({data:u(e.data,`data`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ua,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.data===void 0)throw Error(`--data is required (or pass --body with this field set).`);e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`The datasetId field`));let d=h({data:u(e.data,`data`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}),p=await c(`Creating`,async()=>n.send(Ua,{body:d,account_id:l}));o(p,{successLabel:`Created`})})};var Ka={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/update/bulk`,body:`json`,errors:{400:`BadRequestError`}};function qa(e){return e.usage(`$0 cloudforce-one threat-intel events bulk-update
179
179
 
180
180
  Applies the same field values to up to 100 events in one dataset. The \`date\` field can't be changed in bulk.`).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the events to update. Required to prevent cross-account modifications.`}).option(`event-ids`,{type:`string`,array:!0,description:`List of event UUIDs to update (1-100)`}).option(`updates-attacker`,{type:`string`,description:`The updates.attacker field`}).option(`updates-attacker-country`,{type:`string`,description:`The updates.attackerCountry field`}).option(`updates-category`,{type:`string`,description:`The updates.category field`}).option(`updates-created-at`,{type:`string`,description:`The updates.createdAt field`}).option(`updates-event`,{type:`string`,description:`The updates.event field`}).option(`updates-indicator`,{type:`string`,description:`The updates.indicator field`}).option(`updates-indicator-type`,{type:`string`,description:`The updates.indicatorType field`}).option(`updates-insight`,{type:`string`,description:`The updates.insight field`}).option(`updates-raw-data`,{type:`string`,description:`The updates.raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`updates-raw-source`,{type:`string`,description:`The updates.raw.source field`}).option(`updates-raw-tlp`,{type:`string`,description:`The updates.raw.tlp field`}).option(`updates-target-country`,{type:`string`,description:`The updates.targetCountry field`}).option(`updates-target-industry`,{type:`string`,description:`The updates.targetIndustry field`}).option(`updates-tlp`,{type:`string`,description:`The updates.tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ja={command:`bulk-update`,describe:`Update events in bulk`,builder:qa,handler:async e=>l({command:`cloudforce-one threat-intel events bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events bulk-update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/update/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({datasetId:g(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:g(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:g(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:g(e[`updates-category`],`updates-category`,`text`),createdAt:g(e[`updates-created-at`],`updates-created-at`,`text`),event:g(e[`updates-event`],`updates-event`,`text`),indicator:g(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:g(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:g(e[`updates-insight`],`updates-insight`,`text`),raw:{data:p(e[`updates-raw-data`],`updates-raw-data`),source:g(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:g(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:g(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:g(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:g(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Ka,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset ID containing the events to update. Required to prevent cross-account modifications.`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let u=h({datasetId:g(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:g(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:g(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:g(e[`updates-category`],`updates-category`,`text`),createdAt:g(e[`updates-created-at`],`updates-created-at`,`text`),event:g(e[`updates-event`],`updates-event`,`text`),indicator:g(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:g(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:g(e[`updates-insight`],`updates-insight`,`text`),raw:{data:p(e[`updates-raw-data`],`updates-raw-data`),source:g(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:g(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:g(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:g(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:g(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]),d=await c(`Updating`,async()=>n.send(Ka,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})};var Ya={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/categories/catalog`,errors:{400:`BadRequestError`}};function Xa(e){return e.usage(`$0 cloudforce-one threat-intel events categories catalog list
181
181
 
@@ -183,19 +183,19 @@ Lists every event category in the catalog, whether or not an event uses it. To l
183
183
 
184
184
  Deletes an event category by its ID.`).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 io={command:`delete <category-id>`,describe:`Delete an event category`,builder:ro,handler:async e=>l({command:`cloudforce-one threat-intel events categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(no,{account_id:l,category_id:e[`category-id`]}));o(u,{successLabel:`Deleted`})})};var ao={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,errors:{400:`BadRequestError`}};function oo(e){return e.usage(`$0 cloudforce-one threat-intel events categories get <category-id>
185
185
 
186
- Returns an event category by its ID.`).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 so={command:`get <category-id>`,describe:`Get an event category`,builder:oo,handler:async e=>l({command:`cloudforce-one threat-intel events categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ao,{account_id:l,category_id:e[`category-id`]}));o(u,{successLabel:`Loaded`})})};var co={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/categories`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function lo(e){return e.usage("$0 cloudforce-one threat-intel events categories list\n\nLists the event categories used by events in the datasets given by `datasetIds`, or in the default dataset when `datasetIds` is omitted. Dataset scope values are not supported. To list every category, use `threat-intel events categories catalog list`.").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 uo={command:`list`,describe:`List event categories used in datasets`,builder:lo,handler:async e=>l({command:`cloudforce-one threat-intel events categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(co,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var fo={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,body:`json`,errors:{400:`BadRequestError`}};function po(e){return e.usage(`$0 cloudforce-one threat-intel events categories update <category-id>
186
+ Returns an event category by its ID.`).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 so={command:`get <category-id>`,describe:`Get an event category`,builder:oo,handler:async e=>l({command:`cloudforce-one threat-intel events categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ao,{account_id:l,category_id:e[`category-id`]}));o(u,{successLabel:`Loaded`})})};var co={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/categories`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function lo(e){return e.usage("$0 cloudforce-one threat-intel events categories list\n\nLists the event categories used by events in the datasets given by `datasetIds`, or in the default dataset when `datasetIds` is omitted. Dataset scope values are not supported. To list every category, use `threat-intel events categories catalog list`.").option(`dataset-ids`,{type:`string`,array:!0,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 uo={command:`list`,describe:`List event categories used in datasets`,builder:lo,handler:async e=>l({command:`cloudforce-one threat-intel events categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(co,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var fo={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,body:`json`,errors:{400:`BadRequestError`}};function po(e){return e.usage(`$0 cloudforce-one threat-intel events categories update <category-id>
187
187
 
188
188
  Updates the given fields of an event category and leaves the other fields unchanged.`).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 mo={command:`update <category-id>`,describe:`Update an event category`,builder:po,handler:async e=>l({command:`cloudforce-one threat-intel events categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events categories update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:g(e.name,`name`,`text`),shortname:g(e.shortname,`shortname`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(fo,{body:t,account_id:l,category_id:e[`category-id`]}));o(r,{successLabel:`Updated`});return}let u=h({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:g(e.name,`name`,`text`),shortname:g(e.shortname,`shortname`,`text`)}),d=await c(`Updating`,async()=>n.send(fo,{body:u,account_id:l,category_id:e[`category-id`]}));o(d,{successLabel:`Updated`})})},ho={command:`categories`,describe:`Operations for threat-intel.events.categories`,builder:e=>e.command(to).command(io).command(so).command(uo).command(mo).command(Qa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var go={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/copy`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function _o(e){return e.usage("$0 cloudforce-one threat-intel events copy <dataset-id>\n\nCopies events to the dataset given by `destDatasetId` and leaves the originals in place. Raw event data is copied only when `keepRawData` is true.").positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied).`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const vo={command:`copy <dataset-id>`,describe:`Copy events to another dataset`,builder:_o,handler:async e=>l({command:`cloudforce-one threat-intel events copy`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/copy`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?h({destDatasetId:g(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(go,{body:t,account_id:u,dataset_id:e[`dataset-id`],...n}));o(r,{successLabel:`Created`});return}if(e[`dest-dataset-id`]===void 0&&(e[`dest-dataset-id`]=await v(`dest-dataset-id`,`The destDatasetId field`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let d=h({destDatasetId:g(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>l.send(go,{body:d,account_id:u,dataset_id:e[`dataset-id`],...n}));o(p,{successLabel:`Created`})})};var yo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/countries`,errors:{400:`BadRequestError`}};function bo(e){return e.usage(`$0 cloudforce-one threat-intel events countries list
189
189
 
190
190
  Lists the countries used in threat intelligence data, such as attacker and target countries.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xo={command:`list`,describe:`List countries`,builder:bo,handler:async e=>l({command:`cloudforce-one threat-intel events countries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events countries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/countries`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(yo,{account_id:l}));o(u,{successLabel:`Loaded`})})},So={command:`countries`,describe:`Operations for threat-intel.events.countries`,builder:e=>e.command(xo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Co={method:`POST`,path:t=>e`/accounts/${t.account_id_path}/cloudforce-one/events/create`,body:`json`,errors:{400:`BadRequestError`}};function wo(e){return e.usage("$0 cloudforce-one threat-intel events create <account-id-path>\n\nCreates an event. Without `datasetId`, the event is created in the default Cloudforce One Threat Events dataset. To create a dataset, use `threat-intel datasets create`.").positional(`account-id-path`,{type:`string`,description:`Account ID.`,demandOption:!0}).option(`account-id-body`,{type:`number`,description:`The accountId field`}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`dataset-id`,{type:`string`,description:`The datasetId field`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`indicators`,{type:`string`,description:`Array of indicators for this event. Supports multiple indicators per event for complex scenarios. Provide as a JSON array of objects or @path/to/file.json.`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-data`,{type:`string`,description:`The raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`source-resource-id`,{type:`string`,description:`The source.resourceId field`}).option(`source-resource-type`,{type:`string`,description:`The source.resourceType field`,choices:[`article`]}).coerce(`source-resource-type`,e=>g(e,`source-resource-type`,`text`)).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).coerce(`source-system`,e=>g(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 To={command:`create <account-id-path>`,describe:`Create an event`,builder:wo,handler:async e=>l({command:`cloudforce-one threat-intel events create`,classification:{safeFlags:[`source-resource-type`,`source-system`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf cloudforce-one threat-intel 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?h({accountId:e[`account-id-body`],attacker:g(e.attacker,`attacker`,`text`),attackerCountry:g(e[`attacker-country`],`attacker-country`,`text`),category:g(e.category,`category`,`text`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),date:g(e.date,`date`,`text`),event:g(e.event,`event`,`text`),indicator:g(e.indicator,`indicator`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),indicators:u(e.indicators,`indicators`),insight:g(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`,!0),source:g(e[`raw-source`],`raw-source`,`text`),tlp:g(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:g(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:g(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:g(e[`target-country`],`target-country`,`text`),targetIndustry:g(e[`target-industry`],`target-industry`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):f(e.body,[{path:[`raw`,`data`],flag:`raw-data`}])});return}let t=await r(e);if(e.body){let n=f(e.body,[{path:[`raw`,`data`],flag:`raw-data`}]),r=await c(`Creating`,async()=>t.send(Co,{body:n,account_id_path:e[`account-id-path`]}));o(r,{successLabel:`Created`});return}if(e.category===void 0&&(e.category=await v(`category`,`The category field`)),e.date===void 0&&(e.date=await v(`date`,`The date field`)),e.event===void 0&&(e.event=await v(`event`,`The event field`)),e[`raw-data`]===void 0)throw Error(`--raw-data is required (or pass --body with this field set).`);e.tlp===void 0&&(e.tlp=await v(`tlp`,`The tlp field`));let n=h({accountId:e[`account-id-body`],attacker:g(e.attacker,`attacker`,`text`),attackerCountry:g(e[`attacker-country`],`attacker-country`,`text`),category:g(e.category,`category`,`text`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),date:g(e.date,`date`,`text`),event:g(e.event,`event`,`text`),indicator:g(e.indicator,`indicator`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),indicators:u(e.indicators,`indicators`),insight:g(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`,!0),source:g(e[`raw-source`],`raw-source`,`text`),tlp:g(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:g(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:g(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:g(e[`target-country`],`target-country`,`text`),targetIndustry:g(e[`target-industry`],`target-industry`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),i=await c(`Creating`,async()=>t.send(Co,{body:n,account_id_path:e[`account-id-path`]}));o(i,{successLabel:`Created`})})};var Eo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/datasets/${t.dataset_id}/events`,query:[`eventIds`],errors:{400:`BadRequestError`}};function Do(e){return e.usage(`$0 cloudforce-one threat-intel events delete <dataset-id>
191
191
 
192
- Deletes one or more events from a dataset. Pass the event UUIDs in \`eventIds\`.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`event-ids`,{type:`string`,description:`Array of Event IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oo={command:`delete <dataset-id>`,describe:`Delete events`,builder:Do,handler:async e=>l({command:`cloudforce-one threat-intel events delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={eventIds:e[`event-ids`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await b({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(Eo,{account_id:u,dataset_id:e[`dataset-id`],...n}));o(d,{successLabel:`Deleted`})})};var ko={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/events/${t.event_id}`,errors:{404:`NotFoundError`}};function Ao(e){return e.usage(`$0 cloudforce-one threat-intel events get <event-id>
192
+ Deletes one or more events from a dataset. Pass the event UUIDs in \`eventIds\`.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`event-ids`,{type:`string`,array:!0,description:`Array of Event IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oo={command:`delete <dataset-id>`,describe:`Delete events`,builder:Do,handler:async e=>l({command:`cloudforce-one threat-intel events delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={eventIds:e[`event-ids`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await b({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(Eo,{account_id:u,dataset_id:e[`dataset-id`],...n}));o(d,{successLabel:`Deleted`})})};var ko={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/events/${t.event_id}`,errors:{404:`NotFoundError`}};function Ao(e){return e.usage(`$0 cloudforce-one threat-intel events get <event-id>
193
193
 
194
194
  Returns an event from a dataset by its UUID.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jo={command:`get <event-id>`,describe:`Get an event`,builder:Ao,handler:async e=>l({command:`cloudforce-one threat-intel events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ko,{account_id:l,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})};var Mo={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/graphql`,errors:{400:`BadRequestError`}};function No(e){return e.usage(`$0 cloudforce-one threat-intel events graphql
195
195
 
196
196
  Runs a GraphQL aggregation query over events. Supports grouping by multiple fields, date range filters, and aggregation across datasets.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Po={command:`graphql`,describe:`Run a GraphQL aggregation over events`,builder:No,handler:async e=>l({command:`cloudforce-one threat-intel events graphql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events graphql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/graphql`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Mo,{account_id:l}));o(u,{successLabel:`Created`})})};var Fo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}`,errors:{404:`NotFoundError`}};function Io(e){return e.usage("$0 cloudforce-one threat-intel events legacy get <event-id>\n\nLegacy. Use `threat-intel events get` (`GET /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 Lo={command:`get <event-id>`,describe:`Get an event (legacy)`,builder:Io,handler:async e=>l({command:`cloudforce-one threat-intel events legacy get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Fo,{account_id:l,event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})};var Ro={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/events/graphql`,errors:{400:`BadRequestError`}};function zo(e){return e.usage("$0 cloudforce-one threat-intel events legacy graphql\n\nLegacy. Use `threat-intel events graphql` (`POST /events/graphql`) instead. Both commands run the same query.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bo={command:`graphql`,describe:`Run a GraphQL aggregation over events (legacy)`,builder:zo,handler:async e=>l({command:`cloudforce-one threat-intel events legacy graphql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events legacy graphql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/events/graphql`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Ro,{account_id:l}));o(u,{successLabel:`Created`})})};var Vo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}/raw/${t.raw_id}`,errors:{400:`BadRequestError`}};function Ho(e){return e.usage("$0 cloudforce-one threat-intel events legacy raw get <raw-id>\n\nLegacy. Returns raw data stored under a `raw_id`, which new events don't use. Use `threat-intel events raw get` (`GET /events/datasets/{dataset_id}/events/{event_id}/raw`) instead.").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 Uo={command:`get <raw-id>`,describe:`Get raw event data by raw ID (legacy)`,builder:Ho,handler:async e=>l({command:`cloudforce-one threat-intel events legacy raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Vo,{account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(u,{successLabel:`Loaded`})})};var Wo={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}/raw/${t.raw_id}`,body:`json`,errors:{400:`BadRequestError`}};function Go(e){return e.usage(`$0 cloudforce-one threat-intel events legacy raw update <raw-id>
197
197
 
198
- Legacy. Updates raw data stored under a \`raw_id\`, which new events don't use. There is no direct replacement.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`data`,{type:`string`,description:`The data field. Provide as a JSON object or @path/to/file.json.`}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ko={command:`update <raw-id>`,describe:`Update raw event data by raw ID (legacy)`,builder:Go,handler:async e=>l({command:`cloudforce-one threat-intel events legacy raw update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy raw update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({data:p(e.data,`data`),source:g(e.source,`source`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Wo,{body:t,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(r,{successLabel:`Updated`});return}let u=h({data:p(e.data,`data`),source:g(e.source,`source`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`data`]]),d=await c(`Updating`,async()=>n.send(Wo,{body:u,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(d,{successLabel:`Updated`})})},qo={command:`raw`,describe:`Operations for threat-intel.events.legacy.raw`,builder:e=>e.command(Uo).command(Ko).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Jo={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relate/${t.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function Yo(e){return e.usage("$0 cloudforce-one threat-intel events legacy references create <event-id>\n\nLegacy. Use `threat-intel events relationships create` (`POST /events/relationships/create`) instead.").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 Xo={command:`create <event-id>`,describe:`Add event references (legacy)`,builder:Yo,handler:async e=>l({command:`cloudforce-one threat-intel events legacy references create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy references create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({events:e.events}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Jo,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let u=h({events:e.events}),d=await c(`Creating`,async()=>n.send(Jo,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})};var Zo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relate/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function Qo(e){return e.usage("$0 cloudforce-one threat-intel events legacy references delete <event-id>\n\nLegacy. Removes references created with `threat-intel events legacy references create`. Use `threat-intel events relationships` for new event links.").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 $o={command:`delete <event-id>`,describe:`Remove event references (legacy)`,builder:Qo,handler:async e=>l({command:`cloudforce-one threat-intel events legacy references delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy references delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({events:e.events}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(Zo,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Deleted`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let u=h({events:e.events}),d=await c(`Deleting`,async()=>n.send(Zo,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Deleted`})})},es={command:`references`,describe:`Operations for threat-intel.events.legacy.references`,builder:e=>e.command(Xo).command($o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ts={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event_tag/${t.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function ns(e){return e.usage("$0 cloudforce-one threat-intel events legacy tags create <event-id>\n\nLegacy. Use `threat-intel tags relationships create` (`POST /events/tags/{tag_uuid}/relationships`) instead.").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 rs={command:`create <event-id>`,describe:`Add tags to an event (legacy)`,builder:ns,handler:async e=>l({command:`cloudforce-one threat-intel events legacy tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event_tag/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({tags:e.tags}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(ts,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let u=h({tags:e.tags}),d=await c(`Creating`,async()=>n.send(ts,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})};var is={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event_tag/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function as(e){return e.usage("$0 cloudforce-one threat-intel events legacy tags delete <event-id>\n\nLegacy. Use `threat-intel tags relationships delete` (`DELETE /events/tags/{tag_uuid}/relationships/{rel_uuid}`) instead.").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:`Remove tags from an event (legacy)`,builder:as,handler:async e=>l({command:`cloudforce-one threat-intel events legacy tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event_tag/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({tags:e.tags}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(is,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Deleted`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let u=h({tags:e.tags}),d=await c(`Deleting`,async()=>n.send(is,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Deleted`})})},ss={command:`tags`,describe:`Operations for threat-intel.events.legacy.tags`,builder:e=>e.command(rs).command(os).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},cs={command:`legacy`,describe:`Operations for threat-intel.events.legacy`,builder:e=>e.command(Lo).command(Bo).command(qo).command(es).command(ss).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ls={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events`,query:[`cursor`,`search`,`searchBranches`,`page`,`pageSize`,`orderBy`,`order`,`datasetId`,`forceRefresh`,`format`,`cache`],errors:{400:`BadRequestError`}};function us(e){return e.usage("$0 cloudforce-one threat-intel events list\n\nLists events, with filters passed as query parameters. `datasetId` accepts dataset UUIDs or one scope value used alone: `all` (or `*`) and `operational` select the intelligence datasets you can read, and `analytics` selects the analytics datasets you can read. A scope value covers at most 50 datasets. Without `datasetId`, the default Cloudforce One Threat Events dataset is used. To send filters in a JSON body instead, use `threat-intel events search`.").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 ds={command:`list`,describe:`List events`,builder:us,handler:async e=>l({command:`cloudforce-one threat-intel events list`,classification:{safeFlags:[`order`,`force-refresh`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,search:e.search,searchBranches:e[`search-branches`],page:e.page,pageSize:e[`page-size`],orderBy:e[`order-by`],order:e.order,datasetId:e[`dataset-id`],forceRefresh:e[`force-refresh`],format:e.format,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ls,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var fs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/move`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function ps(e){return e.usage("$0 cloudforce-one threat-intel events move <dataset-id>\n\nMoves events to the dataset given by `destDatasetId` and removes them from the source dataset. Raw event data is always removed from the source and is kept only when `keepRawData` is true.").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 ms={command:`move <dataset-id>`,describe:`Move events to another dataset`,builder:ps,handler:async e=>l({command:`cloudforce-one threat-intel events move`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/move`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?h({destDatasetId:g(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(fs,{body:t,account_id:u,dataset_id:e[`dataset-id`],...n}));o(r,{successLabel:`Created`});return}if(e[`dest-dataset-id`]===void 0&&(e[`dest-dataset-id`]=await v(`dest-dataset-id`,`The destDatasetId field`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let d=h({destDatasetId:g(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>l.send(fs,{body:d,account_id:u,dataset_id:e[`dataset-id`],...n}));o(p,{successLabel:`Created`})})};var hs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/create`,body:`json`,errors:{400:`BadRequestError`}};function gs(e){return e.usage("$0 cloudforce-one threat-intel events queries create\n\nSaves an event query under a unique `name`. `query_json` holds the query parameters as a JSON string.").option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _s={command:`create`,describe:`Create a saved event query`,builder:gs,handler:async e=>l({command:`cloudforce-one threat-intel events queries create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:g(e.name,`name`,`text`),query_json:g(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:g(e[`rule-scope`],`rule-scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(hs,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`Unique name for the saved query`)),e[`query-json`]===void 0&&(e[`query-json`]=await v(`query-json`,`JSON string containing the query parameters`));let u=h({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:g(e.name,`name`,`text`),query_json:g(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:g(e[`rule-scope`],`rule-scope`,`text`)}),d=await c(`Creating`,async()=>n.send(hs,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var vs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,response:!1,errors:{404:`NotFoundError`}};function ys(e){return e.usage(`$0 cloudforce-one threat-intel events queries delete <query-id>
198
+ Legacy. Updates raw data stored under a \`raw_id\`, which new events don't use. There is no direct replacement.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`data`,{type:`string`,description:`The data field. Provide as a JSON object or @path/to/file.json.`}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ko={command:`update <raw-id>`,describe:`Update raw event data by raw ID (legacy)`,builder:Go,handler:async e=>l({command:`cloudforce-one threat-intel events legacy raw update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy raw update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({data:p(e.data,`data`),source:g(e.source,`source`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Wo,{body:t,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(r,{successLabel:`Updated`});return}let u=h({data:p(e.data,`data`),source:g(e.source,`source`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`data`]]),d=await c(`Updating`,async()=>n.send(Wo,{body:u,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(d,{successLabel:`Updated`})})},qo={command:`raw`,describe:`Operations for threat-intel.events.legacy.raw`,builder:e=>e.command(Uo).command(Ko).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Jo={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relate/${t.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function Yo(e){return e.usage("$0 cloudforce-one threat-intel events legacy references create <event-id>\n\nLegacy. Use `threat-intel events relationships create` (`POST /events/relationships/create`) instead.").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 Xo={command:`create <event-id>`,describe:`Add event references (legacy)`,builder:Yo,handler:async e=>l({command:`cloudforce-one threat-intel events legacy references create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy references create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({events:e.events}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Jo,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let u=h({events:e.events}),d=await c(`Creating`,async()=>n.send(Jo,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})};var Zo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relate/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function Qo(e){return e.usage("$0 cloudforce-one threat-intel events legacy references delete <event-id>\n\nLegacy. Removes references created with `threat-intel events legacy references create`. Use `threat-intel events relationships` for new event links.").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 $o={command:`delete <event-id>`,describe:`Remove event references (legacy)`,builder:Qo,handler:async e=>l({command:`cloudforce-one threat-intel events legacy references delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy references delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({events:e.events}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(Zo,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Deleted`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let u=h({events:e.events}),d=await c(`Deleting`,async()=>n.send(Zo,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Deleted`})})},es={command:`references`,describe:`Operations for threat-intel.events.legacy.references`,builder:e=>e.command(Xo).command($o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ts={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event_tag/${t.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function ns(e){return e.usage("$0 cloudforce-one threat-intel events legacy tags create <event-id>\n\nLegacy. Use `threat-intel tags relationships create` (`POST /events/tags/{tag_uuid}/relationships`) instead.").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 rs={command:`create <event-id>`,describe:`Add tags to an event (legacy)`,builder:ns,handler:async e=>l({command:`cloudforce-one threat-intel events legacy tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event_tag/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({tags:e.tags}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(ts,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let u=h({tags:e.tags}),d=await c(`Creating`,async()=>n.send(ts,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})};var is={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event_tag/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function as(e){return e.usage("$0 cloudforce-one threat-intel events legacy tags delete <event-id>\n\nLegacy. Use `threat-intel tags relationships delete` (`DELETE /events/tags/{tag_uuid}/relationships/{rel_uuid}`) instead.").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:`Remove tags from an event (legacy)`,builder:as,handler:async e=>l({command:`cloudforce-one threat-intel events legacy tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events legacy tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event_tag/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({tags:e.tags}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(is,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Deleted`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let u=h({tags:e.tags}),d=await c(`Deleting`,async()=>n.send(is,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Deleted`})})},ss={command:`tags`,describe:`Operations for threat-intel.events.legacy.tags`,builder:e=>e.command(rs).command(os).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},cs={command:`legacy`,describe:`Operations for threat-intel.events.legacy`,builder:e=>e.command(Lo).command(Bo).command(qo).command(es).command(ss).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ls={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events`,query:[`cursor`,`search`,`searchBranches`,`page`,`pageSize`,`orderBy`,`order`,`datasetId`,`forceRefresh`,`format`,`cache`],errors:{400:`BadRequestError`}};function us(e){return e.usage("$0 cloudforce-one threat-intel events list\n\nLists events, with filters passed as query parameters. `datasetId` accepts dataset UUIDs or one scope value used alone: `all` (or `*`) and `operational` select the intelligence datasets you can read, and `analytics` selects the analytics datasets you can read. A scope value covers at most 50 datasets. Without `datasetId`, the default Cloudforce One Threat Events dataset is used. To send filters in a JSON body instead, use `threat-intel events search`.").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`,array:!0,description:`Search`}).option(`search-branches`,{type:`string`,array:!0,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`,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(`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 ds={command:`list`,describe:`List events`,builder:us,handler:async e=>l({command:`cloudforce-one threat-intel events list`,classification:{safeFlags:[`order`,`force-refresh`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,search:e.search,searchBranches:e[`search-branches`],page:e.page,pageSize:e[`page-size`],orderBy:e[`order-by`],order:e.order,datasetId:e[`dataset-id`],forceRefresh:e[`force-refresh`],format:e.format,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ls,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var fs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/move`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function ps(e){return e.usage("$0 cloudforce-one threat-intel events move <dataset-id>\n\nMoves events to the dataset given by `destDatasetId` and removes them from the source dataset. Raw event data is always removed from the source and is kept only when `keepRawData` is true.").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 ms={command:`move <dataset-id>`,describe:`Move events to another dataset`,builder:ps,handler:async e=>l({command:`cloudforce-one threat-intel events move`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/move`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?h({destDatasetId:g(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(fs,{body:t,account_id:u,dataset_id:e[`dataset-id`],...n}));o(r,{successLabel:`Created`});return}if(e[`dest-dataset-id`]===void 0&&(e[`dest-dataset-id`]=await v(`dest-dataset-id`,`The destDatasetId field`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let d=h({destDatasetId:g(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>l.send(fs,{body:d,account_id:u,dataset_id:e[`dataset-id`],...n}));o(p,{successLabel:`Created`})})};var hs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/create`,body:`json`,errors:{400:`BadRequestError`}};function gs(e){return e.usage("$0 cloudforce-one threat-intel events queries create\n\nSaves an event query under a unique `name`. `query_json` holds the query parameters as a JSON string.").option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _s={command:`create`,describe:`Create a saved event query`,builder:gs,handler:async e=>l({command:`cloudforce-one threat-intel events queries create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:g(e.name,`name`,`text`),query_json:g(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:g(e[`rule-scope`],`rule-scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(hs,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`Unique name for the saved query`)),e[`query-json`]===void 0&&(e[`query-json`]=await v(`query-json`,`JSON string containing the query parameters`));let u=h({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:g(e.name,`name`,`text`),query_json:g(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:g(e[`rule-scope`],`rule-scope`,`text`)}),d=await c(`Creating`,async()=>n.send(hs,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var vs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,response:!1,errors:{404:`NotFoundError`}};function ys(e){return e.usage(`$0 cloudforce-one threat-intel events queries delete <query-id>
199
199
 
200
200
  Deletes a saved event query by its ID.`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const bs={command:`delete <query-id>`,describe:`Delete a saved event query`,builder:ys,handler:async e=>l({command:`cloudforce-one threat-intel events queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(vs,{account_id:l,query_id:e[`query-id`]}));o(u,{successLabel:`Deleted`})})};var xs={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,errors:{404:`NotFoundError`}};function Ss(e){return e.usage(`$0 cloudforce-one threat-intel events queries get <query-id>
201
201
 
@@ -207,110 +207,110 @@ Updates the given fields of a saved event query.`).positional(`query-id`,{type:`
207
207
 
208
208
  Returns the raw source data stored with an event.`).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 Ns={command:`get <event-id>`,describe:`Get raw data for an event`,builder:Ms,handler:async e=>l({command:`cloudforce-one threat-intel events raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(js,{account_id:l,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})},Ps={command:`raw`,describe:`Operations for threat-intel.events.raw`,builder:e=>e.command(Ns).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relationships/create`,body:`json`,errors:{400:`BadRequestError`}};function Is(e){return e.usage(`$0 cloudforce-one threat-intel events relationships create
209
209
 
210
- Creates directed relationships of type \`relationshipType\` from a parent event to one or more child events in the same dataset.`).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=>g(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 Ls={command:`create`,describe:`Create event relationships`,builder:Is,handler:async e=>l({command:`cloudforce-one threat-intel events relationships create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relationships/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({childIds:e[`child-ids`],datasetId:g(e[`dataset-id`],`dataset-id`,`text`),parentId:g(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Fs,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`child-ids`]===void 0)throw Error(`--child-ids is required (or pass --body with this field set).`);e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset identifier where the events are stored`)),e[`parent-id`]===void 0&&(e[`parent-id`]=await v(`parent-id`,`UUID of the parent event that will be the source of the relationship`)),e[`relationship-type`]===void 0&&(e[`relationship-type`]=await y(`relationship-type`,`Type of relationship to create between parent and child events`,[`related_to`,`caused_by`,`attributed_to`]));let u=h({childIds:e[`child-ids`],datasetId:g(e[`dataset-id`],`dataset-id`,`text`),parentId:g(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}),d=await c(`Creating`,async()=>n.send(Fs,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Rs={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/by-id/${t.event_id}/relationships`,query:[`direction`,`maxDepth`,`relationshipTypes`,`indicatorTypeIds`,`datasetId`,`includeParent`,`page`,`pageSize`],errors:{400:`BadRequestError`}};function zs(e){return e.usage("$0 cloudforce-one threat-intel events relationships list\n\nLists events related to an event by following its relationships. `datasetId` is required. Use `direction`, `maxDepth`, and `relationshipTypes` to control which relationships are followed.").option(`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 Bs={command:`list`,describe:`List related events`,builder:zs,handler:async e=>l({command:`cloudforce-one threat-intel events relationships list`,classification:{safeFlags:[`direction`,`include-parent`,`dry-run`]}},e,async()=>{let n={direction:e.direction,maxDepth:e[`max-depth`],relationshipTypes:e[`relationship-types`],indicatorTypeIds:e[`indicator-type-ids`],datasetId:e[`dataset-id`],includeParent:e[`include-parent`],page:e.page,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/by-id/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/relationships`,pathParams:{"event-id":String(e[`event-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Rs,{account_id:u,event_id:e[`event-id`],...n}));o(d,{successLabel:`Loaded`})})},Vs={command:`relationships`,describe:`Operations for threat-intel.events.relationships`,builder:e=>e.command(Ls).command(Bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events`,query:[`forceRefresh`,`format`,`cache`],body:`json`,errors:{400:`BadRequestError`}};function Us(e){return e.usage("$0 cloudforce-one threat-intel events search\n\nLists events, with filters sent in a JSON request body. Accepts the same filters as `threat-intel events list` and suits long or complex `search` filters. `datasetId` accepts dataset UUIDs or one scope value used alone: `all` (or `*`) and `operational` select the intelligence datasets you can read, and `analytics` selects the analytics datasets you can read. A scope value covers at most 50 datasets. Without `datasetId`, the default Cloudforce One Threat Events dataset is used.").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=>g(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(`search-branches`,{type:`string`,description:"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`. Provide as a JSON array of arrays 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 Ws={command:`search`,describe:`Search events`,builder:Us,handler:async e=>l({command:`cloudforce-one threat-intel events search`,classification:{safeFlags:[`force-refresh`,`format`,`cache`,`order`,`dry-run`]}},e,async()=>{let n={forceRefresh:e[`force-refresh`],format:e.format,cache:e.cache};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({cursor:g(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:g(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:u(e.search,`search`),searchBranches:d(e[`search-branches`],`search-branches`)}):f(e.body)});return}let l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Loading`,async()=>l.send(Hs,{body:t,account_id:p,...n}));o(r,{successLabel:`Loaded`});return}let m=h({cursor:g(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:g(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:u(e.search,`search`),searchBranches:d(e[`search-branches`],`search-branches`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Loading`,async()=>l.send(Hs,{body:m,account_id:p,...n}));o(_,{successLabel:`Loaded`})})};var Gs={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/targetIndustries/catalog`,errors:{400:`BadRequestError`}};function Ks(e){return e.usage(`$0 cloudforce-one threat-intel events target-industries catalog list
210
+ Creates directed relationships of type \`relationshipType\` from a parent event to one or more child events in the same dataset.`).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=>g(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 Ls={command:`create`,describe:`Create event relationships`,builder:Is,handler:async e=>l({command:`cloudforce-one threat-intel events relationships create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relationships/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({childIds:e[`child-ids`],datasetId:g(e[`dataset-id`],`dataset-id`,`text`),parentId:g(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Fs,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`child-ids`]===void 0)throw Error(`--child-ids is required (or pass --body with this field set).`);e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset identifier where the events are stored`)),e[`parent-id`]===void 0&&(e[`parent-id`]=await v(`parent-id`,`UUID of the parent event that will be the source of the relationship`)),e[`relationship-type`]===void 0&&(e[`relationship-type`]=await y(`relationship-type`,`Type of relationship to create between parent and child events`,[`related_to`,`caused_by`,`attributed_to`]));let u=h({childIds:e[`child-ids`],datasetId:g(e[`dataset-id`],`dataset-id`,`text`),parentId:g(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}),d=await c(`Creating`,async()=>n.send(Fs,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Rs={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/by-id/${t.event_id}/relationships`,query:[`direction`,`maxDepth`,`relationshipTypes`,`indicatorTypeIds`,`datasetId`,`includeParent`,`page`,`pageSize`],errors:{400:`BadRequestError`}};function zs(e){return e.usage("$0 cloudforce-one threat-intel events relationships list\n\nLists events related to an event by following its relationships. `datasetId` is required. Use `direction`, `maxDepth`, and `relationshipTypes` to control which relationships are followed.").option(`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`,array:!0,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 Bs={command:`list`,describe:`List related events`,builder:zs,handler:async e=>l({command:`cloudforce-one threat-intel events relationships list`,classification:{safeFlags:[`direction`,`include-parent`,`dry-run`]}},e,async()=>{let n={direction:e.direction,maxDepth:e[`max-depth`],relationshipTypes:e[`relationship-types`],indicatorTypeIds:e[`indicator-type-ids`],datasetId:e[`dataset-id`],includeParent:e[`include-parent`],page:e.page,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/by-id/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/relationships`,pathParams:{"event-id":String(e[`event-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Rs,{account_id:u,event_id:e[`event-id`],...n}));o(d,{successLabel:`Loaded`})})},Vs={command:`relationships`,describe:`Operations for threat-intel.events.relationships`,builder:e=>e.command(Ls).command(Bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hs={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events`,query:[`forceRefresh`,`format`,`cache`],body:`json`,errors:{400:`BadRequestError`}};function Us(e){return e.usage("$0 cloudforce-one threat-intel events search\n\nLists events, with filters sent in a JSON request body. Accepts the same filters as `threat-intel events list` and suits long or complex `search` filters. `datasetId` accepts dataset UUIDs or one scope value used alone: `all` (or `*`) and `operational` select the intelligence datasets you can read, and `analytics` selects the analytics datasets you can read. A scope value covers at most 50 datasets. Without `datasetId`, the default Cloudforce One Threat Events dataset is used.").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=>g(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(`search-branches`,{type:`string`,description:"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`. Provide as a JSON array of arrays 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 Ws={command:`search`,describe:`Search events`,builder:Us,handler:async e=>l({command:`cloudforce-one threat-intel events search`,classification:{safeFlags:[`force-refresh`,`format`,`cache`,`order`,`dry-run`]}},e,async()=>{let n={forceRefresh:e[`force-refresh`],format:e.format,cache:e.cache};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({cursor:g(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:g(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:u(e.search,`search`),searchBranches:d(e[`search-branches`],`search-branches`)}):f(e.body)});return}let l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Loading`,async()=>l.send(Hs,{body:t,account_id:p,...n}));o(r,{successLabel:`Loaded`});return}let m=h({cursor:g(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:g(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:u(e.search,`search`),searchBranches:d(e[`search-branches`],`search-branches`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Loading`,async()=>l.send(Hs,{body:m,account_id:p,...n}));o(_,{successLabel:`Loaded`})})};var Gs={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/targetIndustries/catalog`,errors:{400:`BadRequestError`}};function Ks(e){return e.usage(`$0 cloudforce-one threat-intel events target-industries catalog list
211
211
 
212
- Lists every predefined target industry, whether or not an event uses it. To list only the industries used in specific datasets, use \`threat-intel events target-industries list\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qs={command:`list`,describe:`List all target industries`,builder:Ks,handler:async e=>l({command:`cloudforce-one threat-intel events target-industries catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events target-industries catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries/catalog`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Gs,{account_id:l}));o(u,{successLabel:`Loaded`})})},Js={command:`catalog`,describe:`Operations for threat-intel.events.target-industries.catalog`,builder:e=>e.command(qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ys={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/targetIndustries`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function Xs(e){return e.usage("$0 cloudforce-one threat-intel events target-industries list\n\nLists the target industries referenced by events in the datasets given by `datasetIds`, or in the default dataset when `datasetIds` is omitted. To list every target industry, use `threat-intel events target-industries catalog list`.").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:`List target industries used in datasets`,builder:Xs,handler:async e=>l({command:`cloudforce-one threat-intel events target-industries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events target-industries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ys,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Qs={command:`target-industries`,describe:`Operations for threat-intel.events.target-industries`,builder:e=>e.command(Zs).command(Js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $s={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function ec(e){return e.usage(`$0 cloudforce-one threat-intel events update <event-id>
212
+ Lists every predefined target industry, whether or not an event uses it. To list only the industries used in specific datasets, use \`threat-intel events target-industries list\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qs={command:`list`,describe:`List all target industries`,builder:Ks,handler:async e=>l({command:`cloudforce-one threat-intel events target-industries catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events target-industries catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries/catalog`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Gs,{account_id:l}));o(u,{successLabel:`Loaded`})})},Js={command:`catalog`,describe:`Operations for threat-intel.events.target-industries.catalog`,builder:e=>e.command(qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ys={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/targetIndustries`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function Xs(e){return e.usage("$0 cloudforce-one threat-intel events target-industries list\n\nLists the target industries referenced by events in the datasets given by `datasetIds`, or in the default dataset when `datasetIds` is omitted. To list every target industry, use `threat-intel events target-industries catalog list`.").option(`dataset-ids`,{type:`string`,array:!0,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:`List target industries used in datasets`,builder:Xs,handler:async e=>l({command:`cloudforce-one threat-intel events target-industries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel events target-industries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ys,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Qs={command:`target-industries`,describe:`Operations for threat-intel.events.target-industries`,builder:e=>e.command(Zs).command(Js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $s={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function ec(e){return e.usage(`$0 cloudforce-one threat-intel events update <event-id>
213
213
 
214
214
  Updates the given fields of an event and leaves the other fields unchanged. \`datasetId\` is required.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-data`,{type:`string`,description:`The raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tc={command:`update <event-id>`,describe:`Update an event`,builder:ec,handler:async e=>l({command:`cloudforce-one threat-intel events update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel events update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({attacker:g(e.attacker,`attacker`,`text`),attackerCountry:g(e[`attacker-country`],`attacker-country`,`text`),category:g(e.category,`category`,`text`),createdAt:g(e[`created-at`],`created-at`,`text`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),date:g(e.date,`date`,`text`),event:g(e.event,`event`,`text`),indicator:g(e.indicator,`indicator`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),insight:g(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`),source:g(e[`raw-source`],`raw-source`,`text`),tlp:g(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:g(e[`target-country`],`target-country`,`text`),targetIndustry:g(e[`target-industry`],`target-industry`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send($s,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Updated`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset ID containing the event to update.`));let u=h({attacker:g(e.attacker,`attacker`,`text`),attackerCountry:g(e[`attacker-country`],`attacker-country`,`text`),category:g(e.category,`category`,`text`),createdAt:g(e[`created-at`],`created-at`,`text`),datasetId:g(e[`dataset-id`],`dataset-id`,`text`),date:g(e.date,`date`,`text`),event:g(e.event,`event`,`text`),indicator:g(e.indicator,`indicator`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),insight:g(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`),source:g(e[`raw-source`],`raw-source`,`text`),tlp:g(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:g(e[`target-country`],`target-country`,`text`),targetIndustry:g(e[`target-industry`],`target-industry`,`text`),tlp:g(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),d=await c(`Updating`,async()=>n.send($s,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Updated`})})},nc={command:`events`,describe:`Operations for threat-intel.events`,builder:e=>e.command(Ra).command(Ga).command(Ja).command(vo).command(To).command(Oo).command(jo).command(Po).command(ds).command(ms).command(Ws).command(tc).command(Ha).command(ho).command(So).command(cs).command(As).command(Ps).command(Vs).command(Qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var rc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/bulk`,body:`json`,errors:{400:`BadRequestError`}};function ic(e){return e.usage(`$0 cloudforce-one threat-intel indicators bulk-create
215
215
 
216
- Creates multiple indicators in a dataset in one request. Set \`autoCreateType\` to create any indicator types that don't exist.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`Global flag to automatically create indicator types if they don't exist. Individual indicators can override this with their own autoCreateType flag.`}).option(`indicators`,{type:`string`,description:`The indicators field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ac={command:`bulk-create`,describe:`Create indicators in bulk`,builder:ic,handler:async e=>l({command:`cloudforce-one threat-intel indicators bulk-create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/bulk`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({autoCreateType:e[`auto-create-type`],indicators:u(e.indicators,`indicators`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(rc,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}if(e.indicators===void 0)throw Error(`--indicators is required (or pass --body with this field set).`);let d=h({autoCreateType:e[`auto-create-type`],indicators:u(e.indicators,`indicators`)}),p=await c(`Creating`,async()=>n.send(rc,{body:d,account_id:l,dataset_id:e[`dataset-id`]}));o(p,{successLabel:`Created`})})};var oc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/create`,body:`json`,errors:{400:`BadRequestError`}};function sc(e){return e.usage(`$0 cloudforce-one threat-intel indicators create <dataset-id>
216
+ Creates multiple indicators in a dataset in one request. Set \`autoCreateType\` to create any indicator types that don't exist.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`Global flag to automatically create indicator types if they don't exist. Individual indicators can override this with their own autoCreateType flag.`}).option(`indicators`,{type:`string`,description:`The indicators field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ac={command:`bulk-create`,describe:`Create indicators in bulk`,builder:ic,handler:async e=>l({command:`cloudforce-one threat-intel indicators bulk-create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/bulk`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({autoCreateType:e[`auto-create-type`],indicators:u(e.indicators,`indicators`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(rc,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}if(e.indicators===void 0)throw Error(`--indicators is required (or pass --body with this field set).`);let d=h({autoCreateType:e[`auto-create-type`],indicators:u(e.indicators,`indicators`)}),p=await c(`Creating`,async()=>n.send(rc,{body:d,account_id:l,dataset_id:e[`dataset-id`]}));o(p,{successLabel:`Created`})})};var oc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators`,query:[`indicatorIds`],errors:{400:`BadRequestError`,404:`NotFoundError`}};function sc(e){return e.usage("$0 cloudforce-one threat-intel indicators bulk-delete\n\nDeletes up to 200 indicators from a dataset. Pass the indicator UUIDs in `indicatorIds`; UUIDs that are not found are returned in `missingUUIDs`.").option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`indicator-ids`,{type:`string`,array:!0,description:`Indicator UUIDs to delete, 1-200 per request.`,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 cc={command:`bulk-delete`,describe:`Delete indicators in bulk`,builder:sc,handler:async e=>l({command:`cloudforce-one threat-intel indicators bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={indicatorIds:e[`indicator-ids`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await b({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(oc,{account_id:u,dataset_id:e[`dataset-id`],...n}));o(d,{successLabel:`Deleted`})})};var lc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/create`,body:`json`,errors:{400:`BadRequestError`}};function uc(e){return e.usage(`$0 cloudforce-one threat-intel indicators create <dataset-id>
217
217
 
218
- Creates an indicator in a dataset. Set \`autoCreateType\` to create the indicator type if it doesn't exist.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist.`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const cc={command:`create <dataset-id>`,describe:`Create an indicator`,builder:sc,handler:async e=>l({command:`cloudforce-one threat-intel indicators create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({autoCreateType:e[`auto-create-type`],indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(oc,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e[`indicator-type`]===void 0&&(e[`indicator-type`]=await v(`indicator-type`,`The indicatorType field`)),e.value===void 0&&(e.value=await v(`value`,`The value field`));let d=h({autoCreateType:e[`auto-create-type`],indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}),p=await c(`Creating`,async()=>n.send(oc,{body:d,account_id:l,dataset_id:e[`dataset-id`]}));o(p,{successLabel:`Created`})})};var lc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,errors:{404:`NotFoundError`}};function uc(e){return e.usage(`$0 cloudforce-one threat-intel indicators delete <indicator-id>
218
+ Creates an indicator in a dataset. Set \`autoCreateType\` to create the indicator type if it doesn't exist.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist.`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const dc={command:`create <dataset-id>`,describe:`Create an indicator`,builder:uc,handler:async e=>l({command:`cloudforce-one threat-intel indicators create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({autoCreateType:e[`auto-create-type`],indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(lc,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e[`indicator-type`]===void 0&&(e[`indicator-type`]=await v(`indicator-type`,`The indicatorType field`)),e.value===void 0&&(e.value=await v(`value`,`The value field`));let d=h({autoCreateType:e[`auto-create-type`],indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}),p=await c(`Creating`,async()=>n.send(lc,{body:d,account_id:l,dataset_id:e[`dataset-id`]}));o(p,{successLabel:`Created`})})};var fc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,errors:{404:`NotFoundError`}};function pc(e){return e.usage(`$0 cloudforce-one threat-intel indicators delete <indicator-id>
219
219
 
220
- Deletes an indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const dc={command:`delete <indicator-id>`,describe:`Delete an indicator`,builder:uc,handler:async e=>l({command:`cloudforce-one threat-intel indicators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(lc,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Deleted`})})};var fc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,errors:{404:`NotFoundError`}};function pc(e){return e.usage(`$0 cloudforce-one threat-intel indicators get <indicator-id>
220
+ Deletes an indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mc={command:`delete <indicator-id>`,describe:`Delete an indicator`,builder:pc,handler:async e=>l({command:`cloudforce-one threat-intel indicators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(fc,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Deleted`})})};var hc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,errors:{404:`NotFoundError`}};function gc(e){return e.usage(`$0 cloudforce-one threat-intel indicators get <indicator-id>
221
221
 
222
- Returns an indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mc={command:`get <indicator-id>`,describe:`Get an indicator`,builder:pc,handler:async e=>l({command:`cloudforce-one threat-intel indicators get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(fc,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Loaded`})})};var hc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/indicators`,query:[`datasetIds`,`page`,`pageSize`,`search`,`name`,`indicatorType`,`relatedEvents`,`tags`,`tagSearch`,`createdAfter`,`createdBefore`,`relatedEventsLimit`,`includeTags`,`includeTotalCount`,`format`,`cache`,`cursor`],errors:{400:`BadRequestError`}};function gc(e){return e.usage("$0 cloudforce-one threat-intel indicators list\n\nLists indicators across datasets, newest first. `datasetIds` accepts dataset UUIDs or one scope value used alone: `all` (or `*`) and `operational` select the intelligence datasets you can read, and `analytics` selects the analytics datasets you can read. Without `datasetIds`, the default dataset is used.").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 _c={command:`list`,describe:`List indicators`,builder:gc,handler:async e=>l({command:`cloudforce-one threat-intel indicators list`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],search:e.search,name:e.name,indicatorType:e[`indicator-type`],relatedEvents:e[`related-events`],tags:e.tags,tagSearch:e[`tag-search`],createdAfter:e[`created-after`],createdBefore:e[`created-before`],relatedEventsLimit:e[`related-events-limit`],includeTags:e[`include-tags`],includeTotalCount:e[`include-total-count`],format:e.format,cache:e.cache,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(hc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var vc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function yc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships create <indicator-id>
222
+ Returns an indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _c={command:`get <indicator-id>`,describe:`Get an indicator`,builder:gc,handler:async e=>l({command:`cloudforce-one threat-intel indicators get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(hc,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Loaded`})})};var vc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/indicators`,query:[`datasetIds`,`page`,`pageSize`,`search`,`name`,`indicatorType`,`relatedEvents`,`tags`,`tagSearch`,`createdAfter`,`createdBefore`,`relatedEventsLimit`,`includeTags`,`includeTotalCount`,`format`,`cache`,`cursor`],errors:{400:`BadRequestError`}};function yc(e){return e.usage("$0 cloudforce-one threat-intel indicators list\n\nLists indicators across datasets, newest first. `datasetIds` accepts dataset UUIDs or one scope value used alone: `all` (or `*`) and `operational` select the intelligence datasets you can read, and `analytics` selects the analytics datasets you can read. Without `datasetIds`, the default dataset is used.").option(`dataset-ids`,{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). If not provided, uses the default dataset.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,array:!0,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`,array:!0,description:`Filter by related event IDs`}).option(`tags`,{type:`string`,array:!0,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`,array:!0,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 bc={command:`list`,describe:`List indicators`,builder:yc,handler:async e=>l({command:`cloudforce-one threat-intel indicators list`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],search:e.search,name:e.name,indicatorType:e[`indicator-type`],relatedEvents:e[`related-events`],tags:e.tags,tagSearch:e[`tag-search`],createdAfter:e[`created-after`],createdBefore:e[`created-before`],relatedEventsLimit:e[`related-events-limit`],includeTags:e[`include-tags`],includeTotalCount:e[`include-total-count`],format:e.format,cache:e.cache,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(vc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var xc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function Sc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships create <indicator-id>
223
223
 
224
- Creates a relationship from an indicator to an event or tag (\`targetType\`). Relationships between two indicators are not supported.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`metadata`,{type:`string`,description:`Arbitrary JSON metadata. Provide as a JSON object or @path/to/file.json.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,choices:[`event`,`tag`]}).coerce(`target-type`,e=>g(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 bc={command:`create <indicator-id>`,describe:`Create an indicator relationship`,builder:yc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(vc,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(r,{successLabel:`Created`});return}e[`target-id`]===void 0&&(e[`target-id`]=await v(`target-id`,`UUID of the target entity.`)),e[`target-type`]===void 0&&(e[`target-type`]=await y(`target-type`,`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,[`event`,`tag`])),e.type===void 0&&(e.type=await v(`type`,`Relationship type.`));let u=h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(vc,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(d,{successLabel:`Created`})})};var xc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships/${t.rel_uuid}`,errors:{400:`BadRequestError`}};function Sc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships delete <rel-uuid>
224
+ Creates a relationship from an indicator to an event or tag (\`targetType\`). Relationships between two indicators are not supported.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`metadata`,{type:`string`,description:`Arbitrary JSON metadata. Provide as a JSON object or @path/to/file.json.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,choices:[`event`,`tag`]}).coerce(`target-type`,e=>g(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 Cc={command:`create <indicator-id>`,describe:`Create an indicator relationship`,builder:Sc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(xc,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(r,{successLabel:`Created`});return}e[`target-id`]===void 0&&(e[`target-id`]=await v(`target-id`,`UUID of the target entity.`)),e[`target-type`]===void 0&&(e[`target-type`]=await y(`target-type`,`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,[`event`,`tag`])),e.type===void 0&&(e.type=await v(`type`,`Relationship type.`));let u=h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(xc,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(d,{successLabel:`Created`})})};var wc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships/${t.rel_uuid}`,errors:{400:`BadRequestError`}};function Tc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships delete <rel-uuid>
225
225
 
226
- Deletes an indicator relationship by its UUID. Returns \`deleted: false\` if the relationship doesn't exist.`).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 Cc={command:`delete <rel-uuid>`,describe:`Delete an indicator relationship`,builder:Sc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(xc,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(u,{successLabel:`Deleted`})})};var wc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships`,query:[`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Tc(e){return e.usage("$0 cloudforce-one threat-intel indicators relationships list\n\nLists the relationships that start at an indicator. Use `search` to filter them and `expand` to include the related entities in the response.").option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters, AND-combined. Fields: entityType (other-end type), type (relationship type), confidence (0–100), metadata.<key>. Example: [{"field":"type","op":"equals","value":"appears_in"},{"field":"confidence","op":"gte","value":50}]`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Keyset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ec={command:`list`,describe:`List indicator relationships`,builder:Tc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(wc,{account_id:u,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],...n}));o(d,{successLabel:`Loaded`})})};var Dc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships/${t.rel_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Oc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships update <rel-uuid>
226
+ Deletes an indicator relationship by its UUID. Returns \`deleted: false\` if the relationship doesn't exist.`).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 Ec={command:`delete <rel-uuid>`,describe:`Delete an indicator relationship`,builder:Tc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(wc,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(u,{successLabel:`Deleted`})})};var Dc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships`,query:[`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Oc(e){return e.usage("$0 cloudforce-one threat-intel indicators relationships list\n\nLists the relationships that start at an indicator. Use `search` to filter them and `expand` to include the related entities in the response.").option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`search`,{type:`string`,array:!0,description:`JSON array of {field, op, value} filters, AND-combined. Fields: entityType (other-end type), type (relationship type), confidence (0–100), metadata.<key>. Example: [{"field":"type","op":"equals","value":"appears_in"},{"field":"confidence","op":"gte","value":50}]`}).option(`expand`,{type:`string`,array:!0,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Keyset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kc={command:`list`,describe:`List indicator relationships`,builder:Oc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Dc,{account_id:u,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],...n}));o(d,{successLabel:`Loaded`})})};var Ac={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships/${t.rel_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function jc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships update <rel-uuid>
227
227
 
228
- Updates the given fields of an indicator relationship and leaves the other fields unchanged.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`metadata`,{type:`string`,description:`Updated metadata. null clears it. Provide as a JSON object or @path/to/file.json.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const kc={command:`update <rel-uuid>`,describe:`Update an indicator relationship`,builder:Oc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Dc,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(r,{successLabel:`Updated`});return}let u=h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Updating`,async()=>n.send(Dc,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(d,{successLabel:`Updated`})})},Ac={command:`relationships`,describe:`Operations for threat-intel.indicators.relationships`,builder:e=>e.command(bc).command(Cc).command(Ec).command(kc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var jc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/tags`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Mc(e){return e.usage(`$0 cloudforce-one threat-intel indicators tags list
228
+ Updates the given fields of an indicator relationship and leaves the other fields unchanged.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`metadata`,{type:`string`,description:`Updated metadata. null clears it. Provide as a JSON object or @path/to/file.json.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mc={command:`update <rel-uuid>`,describe:`Update an indicator relationship`,builder:jc,handler:async e=>l({command:`cloudforce-one threat-intel indicators relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Ac,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(r,{successLabel:`Updated`});return}let u=h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Updating`,async()=>n.send(Ac,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(d,{successLabel:`Updated`})})},Nc={command:`relationships`,describe:`Operations for threat-intel.indicators.relationships`,builder:e=>e.command(Cc).command(Ec).command(kc).command(Mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/tags`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Fc(e){return e.usage(`$0 cloudforce-one threat-intel indicators tags list
229
229
 
230
- Lists the tags applied to indicators in a dataset. Results are not paginated.`).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 Nc={command:`list`,describe:`List tags on a dataset's indicators`,builder:Mc,handler:async e=>l({command:`cloudforce-one threat-intel indicators tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/tags`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(jc,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})},Pc={command:`tags`,describe:`Operations for threat-intel.indicators.tags`,builder:e=>e.command(Nc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicatorTypes/create`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function Ic(e){return e.usage(`$0 cloudforce-one threat-intel indicators types create <dataset-id>
230
+ Lists the tags applied to indicators in a dataset. Results are not paginated.`).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 Ic={command:`list`,describe:`List tags on a dataset's indicators`,builder:Fc,handler:async e=>l({command:`cloudforce-one threat-intel indicators tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/tags`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Pc,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})},Lc={command:`tags`,describe:`Operations for threat-intel.indicators.tags`,builder:e=>e.command(Ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicatorTypes/create`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function zc(e){return e.usage(`$0 cloudforce-one threat-intel indicators types create <dataset-id>
231
231
 
232
- Creates an indicator type in a dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description for the indicator type`}).option(`indicator-type`,{type:`string`,description:`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Lc={command:`create <dataset-id>`,describe:`Create an indicator type`,builder:Ic,handler:async e=>l({command:`cloudforce-one threat-intel indicators types create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators types create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicatorTypes/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({description:g(e.description,`description`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Fc,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e[`indicator-type`]===void 0&&(e[`indicator-type`]=await v(`indicator-type`,`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`));let u=h({description:g(e.description,`description`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`)}),d=await c(`Creating`,async()=>n.send(Fc,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Created`})})};var Rc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/indicator-types`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function zc(e){return e.usage("$0 cloudforce-one threat-intel indicators types list\n\nLists the indicator types used in the datasets given by `datasetIds`, which accepts dataset UUIDs or one scope value used alone. Without `datasetIds`, every dataset you can read is included, analytics datasets too.").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 Bc={command:`list`,describe:`List indicator types`,builder:zc,handler:async e=>l({command:`cloudforce-one threat-intel indicators types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel indicators types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicator-types`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Rc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Vc={command:`types`,describe:`Operations for threat-intel.indicators.types`,builder:e=>e.command(Lc).command(Bc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function Uc(e){return e.usage(`$0 cloudforce-one threat-intel indicators update <indicator-id>
232
+ Creates an indicator type in a dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description for the indicator type`}).option(`indicator-type`,{type:`string`,description:`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bc={command:`create <dataset-id>`,describe:`Create an indicator type`,builder:zc,handler:async e=>l({command:`cloudforce-one threat-intel indicators types create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators types create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicatorTypes/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({description:g(e.description,`description`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Rc,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e[`indicator-type`]===void 0&&(e[`indicator-type`]=await v(`indicator-type`,`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`));let u=h({description:g(e.description,`description`,`text`),indicatorType:g(e[`indicator-type`],`indicator-type`,`text`)}),d=await c(`Creating`,async()=>n.send(Rc,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Created`})})};var Vc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/indicator-types`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function Hc(e){return e.usage("$0 cloudforce-one threat-intel indicators types list\n\nLists the indicator types used in the datasets given by `datasetIds`, which accepts dataset UUIDs or one scope value used alone. Without `datasetIds`, every dataset you can read is included, analytics datasets too.").option(`dataset-ids`,{type:`string`,array:!0,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 Uc={command:`list`,describe:`List indicator types`,builder:Hc,handler:async e=>l({command:`cloudforce-one threat-intel indicators types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel indicators types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicator-types`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Vc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Wc={command:`types`,describe:`Operations for threat-intel.indicators.types`,builder:e=>e.command(Bc).command(Uc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function Kc(e){return e.usage(`$0 cloudforce-one threat-intel indicators update <indicator-id>
233
233
 
234
- Updates the given fields of an indicator and leaves the other fields unchanged.`).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 Wc={command:`update <indicator-id>`,describe:`Update an indicator`,builder:Uc,handler:async e=>l({command:`cloudforce-one threat-intel indicators update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Hc,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(r,{successLabel:`Updated`});return}let d=h({indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}),p=await c(`Updating`,async()=>n.send(Hc,{body:d,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(p,{successLabel:`Updated`})})},Gc={command:`indicators`,describe:`Operations for threat-intel.indicators`,builder:e=>e.command(ac).command(cc).command(dc).command(mc).command(_c).command(Wc).command(Ac).command(Pc).command(Vc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Kc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/search`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,429:`TooManyRequestsError`,503:`ServiceUnavailableError`}};function qc(e){return e.usage(`$0 cloudforce-one threat-intel search
234
+ Updates the given fields of an indicator and leaves the other fields unchanged.`).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 qc={command:`update <indicator-id>`,describe:`Update an indicator`,builder:Kc,handler:async e=>l({command:`cloudforce-one threat-intel indicators update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel indicators update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Gc,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(r,{successLabel:`Updated`});return}let d=h({indicatorType:g(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:u(e[`related-events`],`related-events`),tlp:g(e.tlp,`tlp`,`text`),value:g(e.value,`value`,`text`)}),p=await c(`Updating`,async()=>n.send(Gc,{body:d,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(p,{successLabel:`Updated`})})},Jc={command:`indicators`,describe:`Operations for threat-intel.indicators`,builder:e=>e.command(ac).command(cc).command(dc).command(mc).command(_c).command(bc).command(qc).command(Nc).command(Lc).command(Wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/search`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,429:`TooManyRequestsError`,503:`ServiceUnavailableError`}};function Xc(e){return e.usage(`$0 cloudforce-one threat-intel search
235
235
 
236
- Searches the articles, actors, tags, events, and indicators you can read and returns one list of typed results, most relevant first. Use \`entity_types\` to limit the types searched.`).option(`entity-types`,{type:`string`,array:!0,description:`Entity types to search. Omit to search articles, actors, tags, events, and indicators.`}).option(`include-analytics-datasets`,{type:`boolean`,description:`Whether to include Event and Indicator matches from analytics datasets. Defaults to false because these datasets can take longer to search. When omitted or false, those matches are intentionally excluded and source completeness covers only the backends that were queried.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of results to return. Defaults to 20.`,default:20}).option(`query`,{type:`string`,description:`Search text, from 1 to 1000 characters after trimming.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Jc={command:`search`,describe:`Search threat intelligence`,builder:qc,handler:async e=>l({command:`cloudforce-one threat-intel search`,classification:{safeFlags:[`include-analytics-datasets`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/search`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:g(e.query,`query`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Loading`,async()=>n.send(Kc,{body:t,account_id:l}));o(r,{successLabel:`Loaded`});return}e.query===void 0&&(e.query=await v(`query`,`Search text, from 1 to 1000 characters after trimming.`));let u=h({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:g(e.query,`query`,`text`)}),d=await c(`Loading`,async()=>n.send(Kc,{body:u,account_id:l}));o(d,{successLabel:`Loaded`})})};var Yc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories/actors`,query:[`page`,`pageSize`,`value`,`filters`],errors:{400:`BadRequestError`}};function Xc(e){return e.usage("$0 cloudforce-one threat-intel tags actors list\n\nLists threat actors from the Cloudforce One actor catalog. Use `value` to match actor names and `filters` to filter by fields such as origin country. Accounts outside Cloudforce One receive only public fields: identity, description, discovery date, TLP, confidence, custom properties, origin country, public aliases, and external references. Fields such as internal aliases, attribution, motive, and OPSEC level are omitted.").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 Zc={command:`list`,describe:`List threat actors`,builder:Xc,handler:async e=>l({command:`cloudforce-one threat-intel tags actors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],value:e.value,filters:e.filters};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel tags actors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories/actors`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Yc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Qc={command:`actors`,describe:`Operations for threat-intel.tags.actors`,builder:e=>e.command(Zc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $c={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories/create`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function el(e){return e.usage(`$0 cloudforce-one threat-intel tags categories create
236
+ Searches the articles, actors, tags, events, and indicators you can read and returns one list of typed results, most relevant first. Use \`entity_types\` to limit the types searched.`).option(`entity-types`,{type:`string`,array:!0,description:`Entity types to search. Omit to search articles, actors, tags, events, and indicators.`}).option(`include-analytics-datasets`,{type:`boolean`,description:`Whether to include Event and Indicator matches from analytics datasets. Defaults to false because these datasets can take longer to search. When omitted or false, those matches are intentionally excluded and source completeness covers only the backends that were queried.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of results to return. Defaults to 20.`,default:20}).option(`query`,{type:`string`,description:`Search text, from 1 to 1000 characters after trimming.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Zc={command:`search`,describe:`Search threat intelligence`,builder:Xc,handler:async e=>l({command:`cloudforce-one threat-intel search`,classification:{safeFlags:[`include-analytics-datasets`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/search`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:g(e.query,`query`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Loading`,async()=>n.send(Yc,{body:t,account_id:l}));o(r,{successLabel:`Loaded`});return}e.query===void 0&&(e.query=await v(`query`,`Search text, from 1 to 1000 characters after trimming.`));let u=h({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:g(e.query,`query`,`text`)}),d=await c(`Loading`,async()=>n.send(Yc,{body:u,account_id:l}));o(d,{successLabel:`Loaded`})})};var Qc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories/actors`,query:[`page`,`pageSize`,`value`,`filters`],errors:{400:`BadRequestError`}};function $c(e){return e.usage("$0 cloudforce-one threat-intel tags actors list\n\nLists threat actors from the Cloudforce One actor catalog. Use `value` to match actor names and `filters` to filter by fields such as origin country. Accounts outside Cloudforce One receive only public fields: identity, description, discovery date, TLP, confidence, custom properties, origin country, public aliases, and external references. Fields such as internal aliases, attribution, motive, and OPSEC level are omitted.").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`,array:!0,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 el={command:`list`,describe:`List threat actors`,builder:$c,handler:async e=>l({command:`cloudforce-one threat-intel tags actors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],value:e.value,filters:e.filters};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel tags actors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories/actors`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Qc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},tl={command:`actors`,describe:`Operations for threat-intel.tags.actors`,builder:e=>e.command(el).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories/create`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function rl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories create
237
237
 
238
- Creates a tag category. Use \`schema\` to define the custom fields its tags can have.`).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 tl={command:`create`,describe:`Create a tag category`,builder:el,handler:async e=>l({command:`cloudforce-one threat-intel tags categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send($c,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`The name field`));let d=h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}),p=await c(`Creating`,async()=>n.send($c,{body:d,account_id:l}));o(p,{successLabel:`Created`})})};var nl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function rl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories delete <category-uuid>
238
+ Creates a tag category. Use \`schema\` to define the custom fields its tags can have.`).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 il={command:`create`,describe:`Create a tag category`,builder:rl,handler:async e=>l({command:`cloudforce-one threat-intel tags categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(nl,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`The name field`));let d=h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}),p=await c(`Creating`,async()=>n.send(nl,{body:d,account_id:l}));o(p,{successLabel:`Created`})})};var al={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function ol(e){return e.usage(`$0 cloudforce-one threat-intel tags categories delete <category-uuid>
239
239
 
240
- Deletes a tag category by its UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const il={command:`delete <category-uuid>`,describe:`Delete a tag category`,builder:rl,handler:async e=>l({command:`cloudforce-one threat-intel tags categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(nl,{account_id:l,category_uuid:e[`category-uuid`]}));o(u,{successLabel:`Deleted`})})};var al={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,errors:{404:`NotFoundError`}};function ol(e){return e.usage(`$0 cloudforce-one threat-intel tags categories get <category-uuid>
240
+ Deletes a tag category by its UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const sl={command:`delete <category-uuid>`,describe:`Delete a tag category`,builder:ol,handler:async e=>l({command:`cloudforce-one threat-intel tags categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(al,{account_id:l,category_uuid:e[`category-uuid`]}));o(u,{successLabel:`Deleted`})})};var cl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,errors:{404:`NotFoundError`}};function ll(e){return e.usage(`$0 cloudforce-one threat-intel tags categories get <category-uuid>
241
241
 
242
- Returns a tag category by its UUID, including the custom fields defined in its \`schema\`.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sl={command:`get <category-uuid>`,describe:`Get a tag category`,builder:ol,handler:async e=>l({command:`cloudforce-one threat-intel tags categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(al,{account_id:l,category_uuid:e[`category-uuid`]}));o(u,{successLabel:`Loaded`})})};var cl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories`,query:[`search`],errors:{400:`BadRequestError`}};function ll(e){return e.usage(`$0 cloudforce-one threat-intel tags categories list
242
+ Returns a tag category by its UUID, including the custom fields defined in its \`schema\`.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ul={command:`get <category-uuid>`,describe:`Get a tag category`,builder:ll,handler:async e=>l({command:`cloudforce-one threat-intel tags categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(cl,{account_id:l,category_uuid:e[`category-uuid`]}));o(u,{successLabel:`Loaded`})})};var dl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories`,query:[`search`],errors:{400:`BadRequestError`}};function fl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories list
243
243
 
244
- Lists the account's tag categories. Use \`search\` to filter them.`).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ul={command:`list`,describe:`List tag categories`,builder:ll,handler:async e=>l({command:`cloudforce-one threat-intel tags categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel tags categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(cl,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var dl={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function fl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories update <category-uuid>
244
+ Lists the account's tag categories. Use \`search\` to filter them.`).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pl={command:`list`,describe:`List tag categories`,builder:fl,handler:async e=>l({command:`cloudforce-one threat-intel tags categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel tags categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(dl,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ml={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function hl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories update <category-uuid>
245
245
 
246
- Updates the given fields of a tag category and leaves the other fields unchanged.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects. When provided, replaces the existing field schema. When omitted, the existing schema is preserved. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pl={command:`update <category-uuid>`,describe:`Update a tag category`,builder:fl,handler:async e=>l({command:`cloudforce-one threat-intel tags categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(dl,{body:t,account_id:l,category_uuid:e[`category-uuid`]}));o(r,{successLabel:`Updated`});return}let d=h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}),p=await c(`Updating`,async()=>n.send(dl,{body:d,account_id:l,category_uuid:e[`category-uuid`]}));o(p,{successLabel:`Updated`})})},ml={command:`categories`,describe:`Operations for threat-intel.tags.categories`,builder:e=>e.command(tl).command(il).command(sl).command(ul).command(pl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var hl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/create`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function gl(e){return e.usage(`$0 cloudforce-one threat-intel tags create
246
+ Updates the given fields of a tag category and leaves the other fields unchanged.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects. When provided, replaces the existing field schema. When omitted, the existing schema is preserved. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gl={command:`update <category-uuid>`,describe:`Update a tag category`,builder:hl,handler:async e=>l({command:`cloudforce-one threat-intel tags categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags categories update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ml,{body:t,account_id:l,category_uuid:e[`category-uuid`]}));o(r,{successLabel:`Updated`});return}let d=h({description:g(e.description,`description`,`text`),name:g(e.name,`name`,`text`),schema:u(e.schema,`schema`)}),p=await c(`Updating`,async()=>n.send(ml,{body:d,account_id:l,category_uuid:e[`category-uuid`]}));o(p,{successLabel:`Updated`})})},_l={command:`categories`,describe:`Operations for threat-intel.tags.categories`,builder:e=>e.command(il).command(sl).command(ul).command(pl).command(gl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var vl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/create`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function yl(e){return e.usage(`$0 cloudforce-one threat-intel tags create
247
247
 
248
- Creates a tag in the account and returns the complete tag.`).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. Optional — when present, `properties` is validated against this category's schema. When absent, the tag is typeless and properties are accepted free-form."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Optional.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Optional.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`properties`,{type:`string`,description:"Structured metadata blob. Optional. When `categoryUuid` is given, validated against this category's schema on write. When typeless, accepted free-form. Use `{}` for a tag with no custom data. Provide as a JSON object or @path/to/file.json."}).option(`tlp`,{type:`string`,description:`Tag-level TLP handling marking. Optional. Allowed values: red, amber, amber-strict, green, clear, purple, amber+strict.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>g(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 _l={command:`create`,describe:`Create a tag`,builder:gl,handler:async e=>l({command:`cloudforce-one threat-intel tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(hl,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.value===void 0&&(e.value=await v(`value`,`The value field`));let d=h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]),m=await c(`Creating`,async()=>n.send(hl,{body:d,account_id:l}));o(m,{successLabel:`Created`})})};var vl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function yl(e){return e.usage(`$0 cloudforce-one threat-intel tags delete <tag-uuid>
248
+ Creates a tag in the account and returns the complete tag.`).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. Optional — when present, `properties` is validated against this category's schema. When absent, the tag is typeless and properties are accepted free-form."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Optional.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Optional.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`properties`,{type:`string`,description:"Structured metadata blob. Optional. When `categoryUuid` is given, validated against this category's schema on write. When typeless, accepted free-form. Use `{}` for a tag with no custom data. Provide as a JSON object or @path/to/file.json."}).option(`tlp`,{type:`string`,description:`Tag-level TLP handling marking. Optional. Allowed values: red, amber, amber-strict, green, clear, purple, amber+strict.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>g(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 bl={command:`create`,describe:`Create a tag`,builder:yl,handler:async e=>l({command:`cloudforce-one threat-intel tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(vl,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.value===void 0&&(e.value=await v(`value`,`The value field`));let d=h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]),m=await c(`Creating`,async()=>n.send(vl,{body:d,account_id:l}));o(m,{successLabel:`Created`})})};var xl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Sl(e){return e.usage(`$0 cloudforce-one threat-intel tags delete <tag-uuid>
249
249
 
250
- Deletes a tag by its UUID.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const bl={command:`delete <tag-uuid>`,describe:`Delete a tag`,builder:yl,handler:async e=>l({command:`cloudforce-one threat-intel tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(vl,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Deleted`})})};var xl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,errors:{404:`NotFoundError`}};function Sl(e){return e.usage(`$0 cloudforce-one threat-intel tags get <tag-uuid>
250
+ Deletes a tag by its UUID.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Cl={command:`delete <tag-uuid>`,describe:`Delete a tag`,builder:Sl,handler:async e=>l({command:`cloudforce-one threat-intel tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(xl,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Deleted`})})};var wl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,errors:{404:`NotFoundError`}};function Tl(e){return e.usage(`$0 cloudforce-one threat-intel tags get <tag-uuid>
251
251
 
252
- Returns a tag by its UUID, including its custom fields (\`properties\`). Tags marked TLP:PURPLE are visible only to Cloudforce One.`).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 Cl={command:`get <tag-uuid>`,describe:`Get a tag`,builder:Sl,handler:async e=>l({command:`cloudforce-one threat-intel tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(xl,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Loaded`})})};var wl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/indicators`,query:[`datasetIds`,`page`,`pageSize`,`indicatorType`,`relatedEvent`,`search`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Tl(e){return e.usage("$0 cloudforce-one threat-intel tags indicators list\n\nLists the indicators that carry a tag, with pagination. By default, every intelligence dataset you can read is searched; use `datasetIds` to limit the search to specific datasets or a scope value. Analytics datasets don't store tag associations, so the `analytics` scope returns no results.").option(`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 El={command:`list`,describe:`List a tag's indicators`,builder:Tl,handler:async e=>l({command:`cloudforce-one threat-intel tags indicators list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],indicatorType:e[`indicator-type`],relatedEvent:e[`related-event`],search:e.search};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/indicators`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(wl,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})},Dl={command:`indicators`,describe:`Operations for threat-intel.tags.indicators`,builder:e=>e.command(El).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ol={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags`,query:[`page`,`pageSize`,`search`,`categoryUuid`,`filters`,`cache`],errors:{400:`BadRequestError`}};function kl(e){return e.usage("$0 cloudforce-one threat-intel tags list\n\nLists the account's tags. Use `search` to match tag values, `categoryUuid` to limit results to one category, and `filters` (a JSON array) to filter by fields such as `originCountryISO`, `actorCategory`, `motive`, or `priority`. Country filters accept alpha-2 or alpha-3 codes, names, or common aliases. Tags marked TLP:PURPLE are visible only to Cloudforce One.").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 Al={command:`list`,describe:`List tags`,builder:kl,handler:async e=>l({command:`cloudforce-one threat-intel tags list`,classification:{safeFlags:[`cache`,`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],search:e.search,categoryUuid:e[`category-uuid`],filters:e.filters,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ol,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var jl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,body:`json`,errors:{400:`BadRequestError`}};function Ml(e){return e.usage("$0 cloudforce-one threat-intel tags relationships create <tag-uuid>\n\nCreates a relationship from a tag to an event or indicator (`targetType`) in the dataset given by `datasetId`. Relationships between two tags are not supported.").positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`dataset-id`,{type:`string`,description:`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`}).option(`metadata`,{type:`string`,description:`Arbitrary JSON metadata. Provide as a JSON object or @path/to/file.json.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,choices:[`event`,`indicator`]}).coerce(`target-type`,e=>g(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 Nl={command:`create <tag-uuid>`,describe:`Create a tag relationship`,builder:Ml,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,datasetId:g(e[`dataset-id`],`dataset-id`,`text`),metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(jl,{body:t,account_id:l,tag_uuid:e[`tag-uuid`]}));o(r,{successLabel:`Created`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`)),e[`target-id`]===void 0&&(e[`target-id`]=await v(`target-id`,`UUID of the target entity.`)),e[`target-type`]===void 0&&(e[`target-type`]=await y(`target-type`,`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,[`event`,`indicator`])),e.type===void 0&&(e.type=await v(`type`,`Relationship type.`));let u=h({confidence:e.confidence,datasetId:g(e[`dataset-id`],`dataset-id`,`text`),metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(jl,{body:u,account_id:l,tag_uuid:e[`tag-uuid`]}));o(d,{successLabel:`Created`})})};var Pl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships/${t.rel_uuid}`,query:[`datasetId`],errors:{400:`BadRequestError`}};function Fl(e){return e.usage("$0 cloudforce-one threat-intel tags relationships delete <rel-uuid>\n\nDeletes a tag relationship by its UUID. `datasetId` is required. Returns `deleted: false` if the relationship doesn't exist.").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 Il={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:Fl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await b({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(Pl,{account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(d,{successLabel:`Deleted`})})};var Ll={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,query:[`datasets`,`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Rl(e){return e.usage("$0 cloudforce-one threat-intel tags relationships list\n\nLists the relationships that start at a tag, across the intelligence datasets you can read. Use `datasets` to limit the datasets (`all` and `operational` are equivalent here) and `expand` to include the related entities. Analytics datasets don't store tag associations, so the `analytics` scope returns no results.").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 zl={command:`list`,describe:`List tag relationships`,builder:Rl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasets:e.datasets,search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ll,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})};var Bl={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships/${t.rel_uuid}`,query:[`datasetId`],body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Vl(e){return e.usage(`$0 cloudforce-one threat-intel tags relationships update <rel-uuid>
252
+ Returns a tag by its UUID, including its custom fields (\`properties\`). Tags marked TLP:PURPLE are visible only to Cloudforce One.`).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 El={command:`get <tag-uuid>`,describe:`Get a tag`,builder:Tl,handler:async e=>l({command:`cloudforce-one threat-intel tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(wl,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Loaded`})})};var Dl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/indicators`,query:[`datasetIds`,`page`,`pageSize`,`indicatorType`,`relatedEvent`,`search`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Ol(e){return e.usage("$0 cloudforce-one threat-intel tags indicators list\n\nLists the indicators that carry a tag, with pagination. By default, every intelligence dataset you can read is searched; use `datasetIds` to limit the search to specific datasets or a scope value. Analytics datasets don't store tag associations, so the `analytics` scope returns no results.").option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-ids`,{type:`string`,array:!0,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`,array:!0,description:`Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter.`}).option(`search`,{type:`string`,array:!0,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 kl={command:`list`,describe:`List a tag's indicators`,builder:Ol,handler:async e=>l({command:`cloudforce-one threat-intel tags indicators list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],indicatorType:e[`indicator-type`],relatedEvent:e[`related-event`],search:e.search};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/indicators`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Dl,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})},Al={command:`indicators`,describe:`Operations for threat-intel.tags.indicators`,builder:e=>e.command(kl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var jl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags`,query:[`page`,`pageSize`,`search`,`categoryUuid`,`filters`,`cache`],errors:{400:`BadRequestError`}};function Ml(e){return e.usage("$0 cloudforce-one threat-intel tags list\n\nLists the account's tags. Use `search` to match tag values, `categoryUuid` to limit results to one category, and `filters` (a JSON array) to filter by fields such as `originCountryISO`, `actorCategory`, `motive`, or `priority`. Country filters accept alpha-2 or alpha-3 codes, names, or common aliases. Tags marked TLP:PURPLE are visible only to Cloudforce One.").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`,array:!0,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 Nl={command:`list`,describe:`List tags`,builder:Ml,handler:async e=>l({command:`cloudforce-one threat-intel tags list`,classification:{safeFlags:[`cache`,`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],search:e.search,categoryUuid:e[`category-uuid`],filters:e.filters,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-intel tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(jl,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Pl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,body:`json`,errors:{400:`BadRequestError`}};function Fl(e){return e.usage("$0 cloudforce-one threat-intel tags relationships create <tag-uuid>\n\nCreates a relationship from a tag to an event or indicator (`targetType`) in the dataset given by `datasetId`. Relationships between two tags are not supported.").positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`dataset-id`,{type:`string`,description:`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`}).option(`metadata`,{type:`string`,description:`Arbitrary JSON metadata. Provide as a JSON object or @path/to/file.json.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,choices:[`event`,`indicator`]}).coerce(`target-type`,e=>g(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 Il={command:`create <tag-uuid>`,describe:`Create a tag relationship`,builder:Fl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,datasetId:g(e[`dataset-id`],`dataset-id`,`text`),metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Pl,{body:t,account_id:l,tag_uuid:e[`tag-uuid`]}));o(r,{successLabel:`Created`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`)),e[`target-id`]===void 0&&(e[`target-id`]=await v(`target-id`,`UUID of the target entity.`)),e[`target-type`]===void 0&&(e[`target-type`]=await y(`target-type`,`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,[`event`,`indicator`])),e.type===void 0&&(e.type=await v(`type`,`Relationship type.`));let u=h({confidence:e.confidence,datasetId:g(e[`dataset-id`],`dataset-id`,`text`),metadata:p(e.metadata,`metadata`),targetId:g(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:g(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(Pl,{body:u,account_id:l,tag_uuid:e[`tag-uuid`]}));o(d,{successLabel:`Created`})})};var Ll={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships/${t.rel_uuid}`,query:[`datasetId`],errors:{400:`BadRequestError`}};function Rl(e){return e.usage("$0 cloudforce-one threat-intel tags relationships delete <rel-uuid>\n\nDeletes a tag relationship by its UUID. `datasetId` is required. Returns `deleted: false` if the relationship doesn't exist.").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 zl={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:Rl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await b({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(Ll,{account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(d,{successLabel:`Deleted`})})};var Bl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,query:[`datasets`,`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Vl(e){return e.usage("$0 cloudforce-one threat-intel tags relationships list\n\nLists the relationships that start at a tag, across the intelligence datasets you can read. Use `datasets` to limit the datasets (`all` and `operational` are equivalent here) and `expand` to include the related entities. Analytics datasets don't store tag associations, so the `analytics` scope returns no results.").option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`datasets`,{type:`string`,array:!0,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`,array:!0,description:`JSON array of {field, op, value} filters (same as indicator list search).`}).option(`expand`,{type:`string`,array:!0,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 Hl={command:`list`,describe:`List tag relationships`,builder:Vl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasets:e.datasets,search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Bl,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})};var Ul={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships/${t.rel_uuid}`,query:[`datasetId`],body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Wl(e){return e.usage(`$0 cloudforce-one threat-intel tags relationships update <rel-uuid>
253
253
 
254
- Updates the given fields of a tag relationship and leaves the other fields unchanged. \`datasetId\` is required.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`metadata`,{type:`string`,description:`Updated metadata. null clears it. Provide as a JSON object or @path/to/file.json.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Hl={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:Vl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Updating`,async()=>l.send(Bl,{body:t,account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(r,{successLabel:`Updated`});return}let d=h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let m=await c(`Updating`,async()=>l.send(Bl,{body:d,account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(m,{successLabel:`Updated`})})},Ul={command:`relationships`,describe:`Operations for threat-intel.tags.relationships`,builder:e=>e.command(Nl).command(Il).command(zl).command(Hl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Wl={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Gl(e){return e.usage(`$0 cloudforce-one threat-intel tags update <tag-uuid>
254
+ Updates the given fields of a tag relationship and leaves the other fields unchanged. \`datasetId\` is required.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`metadata`,{type:`string`,description:`Updated metadata. null clears it. Provide as a JSON object or @path/to/file.json.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Gl={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:Wl,handler:async e=>l({command:`cloudforce-one threat-intel tags relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Updating`,async()=>l.send(Ul,{body:t,account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(r,{successLabel:`Updated`});return}let d=h({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:g(e.type,`type`,`text`)},[[`metadata`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let m=await c(`Updating`,async()=>l.send(Ul,{body:d,account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(m,{successLabel:`Updated`})})},Kl={command:`relationships`,describe:`Operations for threat-intel.tags.relationships`,builder:e=>e.command(Il).command(zl).command(Hl).command(Gl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ql={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Jl(e){return e.usage(`$0 cloudforce-one threat-intel tags update <tag-uuid>
255
255
 
256
- Updates the given fields of a tag and returns the complete tag.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. When changed, existing `properties` are re-validated against the new category's schema (400 on mismatch). Set to null to unlink (typeless; properties stop being validated)."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Omit to preserve existing.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Omit to preserve existing.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`properties`,{type:`string`,description:`Custom field values blob. When omitted, the existing value is preserved. When provided, performs a shallow per-key merge over the stored value (unmentioned keys are retained). Setting an individual key to null deletes that key. Validation runs against the merged result, so a partial update may omit a schema-required key if the stored value supplies it. Provide as a JSON object or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Tag-level TLP marking. Omit to preserve existing. Cannot be cleared to null.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>g(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 Kl={command:`update <tag-uuid>`,describe:`Update a tag`,builder:Gl,handler:async e=>l({command:`cloudforce-one threat-intel tags update`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Wl,{body:t,account_id:l,tag_uuid:e[`tag-uuid`]}));o(r,{successLabel:`Updated`});return}let d=h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]),m=await c(`Updating`,async()=>n.send(Wl,{body:d,account_id:l,tag_uuid:e[`tag-uuid`]}));o(m,{successLabel:`Updated`})})},ql={command:`tags`,describe:`Operations for threat-intel.tags`,builder:e=>e.command(_l).command(bl).command(Cl).command(Al).command(Kl).command(Qc).command(ml).command(Dl).command(Ul).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Jl={command:`threat-intel`,describe:`Operations for threat-intel`,builder:e=>e.command(Jc).command(Fa).command(nc).command(Gc).command(ql).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/relevance/aggregate`,query:[`published_after`,`published_before`]};function Xl(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-relevance
256
+ Updates the given fields of a tag and returns the complete tag.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. When changed, existing `properties` are re-validated against the new category's schema (400 on mismatch). Set to null to unlink (typeless; properties stop being validated)."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Omit to preserve existing.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Omit to preserve existing.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`properties`,{type:`string`,description:`Custom field values blob. When omitted, the existing value is preserved. When provided, performs a shallow per-key merge over the stored value (unmentioned keys are retained). Setting an individual key to null deletes that key. Validation runs against the merged result, so a partial update may omit a schema-required key if the stored value supplies it. Provide as a JSON object or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Tag-level TLP marking. Omit to preserve existing. Cannot be cleared to null.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>g(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 Yl={command:`update <tag-uuid>`,describe:`Update a tag`,builder:Jl,handler:async e=>l({command:`cloudforce-one threat-intel tags update`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-intel tags update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ql,{body:t,account_id:l,tag_uuid:e[`tag-uuid`]}));o(r,{successLabel:`Updated`});return}let d=h({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:u(e.aliases,`aliases`),categoryUuid:g(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:g(e[`date-of-discovery`],`date-of-discovery`,`text`),description:g(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:u(e[`external-references`],`external-references`),internalAliases:u(e[`internal-aliases`],`internal-aliases`),internalDescription:g(e[`internal-description`],`internal-description`,`text`),lastSeen:g(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:g(e.value,`value`,`text`)},[[`properties`]]),m=await c(`Updating`,async()=>n.send(ql,{body:d,account_id:l,tag_uuid:e[`tag-uuid`]}));o(m,{successLabel:`Updated`})})},Xl={command:`tags`,describe:`Operations for threat-intel.tags`,builder:e=>e.command(bl).command(Cl).command(El).command(Nl).command(Yl).command(tl).command(_l).command(Al).command(Kl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zl={command:`threat-intel`,describe:`Operations for threat-intel`,builder:e=>e.command(Zc).command(Fa).command(nc).command(Jc).command(Xl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ql={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/relevance/aggregate`,query:[`published_after`,`published_before`,`read`]};function $l(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-relevance
257
257
 
258
- Beta. Counts the account's Threat Signals articles in each relevance band, for each active Priority Intelligence Requirement and across all of them. Uses the same PIRs as article relevance: active PIRs, including those the matcher paused; drafts and deleted PIRs are excluded. Articles not scored against a PIR are not counted for it. The combined counts place each article once, in the band of its best score, so they are not the sum of the per-PIR counts. All counts are read together and are exact.`).option(`published-after`,{type:`string`,description:`Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`published-before`,{type:`string`,description:`Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zl={command:`aggregate-relevance`,describe:`Count Threat Signals articles by relevance band`,builder:Xl,handler:async e=>l({command:`cloudforce-one threat-signals articles aggregate-relevance`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={published_after:e[`published-after`],published_before:e[`published-before`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles aggregate-relevance`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/relevance/aggregate`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Yl,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Ql={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`,query:[`published_after`,`published_before`,`pir_id`,`min_relevance`]};function $l(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-severity
258
+ Beta. Counts the account's Threat Signals articles in each relevance band, for each active Priority Intelligence Requirement and across all of them. Uses the same PIRs as article relevance: active PIRs, including those the matcher paused; drafts and deleted PIRs are excluded. Articles not scored against a PIR are not counted for it. The combined counts place each article once, in the band of its best score, so they are not the sum of the per-PIR counts. read counts only read or only unread articles. All counts are read together and are exact.`).option(`published-after`,{type:`string`,description:`Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`published-before`,{type:`string`,description:`Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`read`,{type:`boolean`,description:`Filter by read state. Accepts true, false, 1, or 0; omit to include read and unread articles.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const eu={command:`aggregate-relevance`,describe:`Count Threat Signals articles by relevance band`,builder:$l,handler:async e=>l({command:`cloudforce-one threat-signals articles aggregate-relevance`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{let n={published_after:e[`published-after`],published_before:e[`published-before`],read:e.read};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles aggregate-relevance`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/relevance/aggregate`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ql,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var tu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`,query:[`published_after`,`published_before`,`read`,`pir_id`,`min_relevance`]};function nu(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-severity
259
259
 
260
- Beta. Counts the account's Threat Signals articles in each intrinsic severity band. An article's band is the severity level nearest its severity, from informational to critical. Articles without a severity are not counted. Also counts, for each active Priority Intelligence Requirement, the articles scored against it. min_relevance counts only articles at or above a relevance band: overall, for any active PIR; per PIR, for that PIR, the same rule as the per-PIR relevance counts. pir_id counts for one active PIR only. Like the article severity field, severity is reported only while the account has an active Priority Intelligence Requirement, including one the matcher paused; otherwise every count is zero and priorities is empty. All counts are read together and are exact.`).option(`published-after`,{type:`string`,description:`Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`published-before`,{type:`string`,description:`Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`pir-id`,{type:`string`,description:`Beta. Active Priority Intelligence Requirement to count for. articles then counts only articles scored against it, min_relevance applies to its score, and priorities lists only it. Returns a 400 error unless the PIR is active.`}).option(`min-relevance`,{type:`string`,description:`Beta. Count only articles at or above this relevance band: in articles, for any active Priority Intelligence Requirement, as the article list's min_relevance does without pir_id; in each priority, for that PIR. Excludes articles that have not been scored against an active PIR.`,choices:[`low`,`medium`,`high`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const eu={command:`aggregate-severity`,describe:`Count Threat Signals articles by severity band`,builder:$l,handler:async e=>l({command:`cloudforce-one threat-signals articles aggregate-severity`,classification:{safeFlags:[`min-relevance`,`dry-run`]}},e,async()=>{let n={published_after:e[`published-after`],published_before:e[`published-before`],pir_id:e[`pir-id`],min_relevance:e[`min-relevance`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles aggregate-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ql,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles`,body:`json`};function tu(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
260
+ Beta. Counts the account's Threat Signals articles in each intrinsic severity band. An article's band is the one reported as its severity, from informational to critical. Articles without a severity are not counted. Also counts, for each active Priority Intelligence Requirement, the articles scored against it. min_relevance counts only articles at or above a relevance band: overall, for any active PIR; per PIR, for that PIR, the same rule as the per-PIR relevance counts. pir_id counts for one active PIR only. read counts only read or only unread articles, in both articles and priorities. Like the article severity field, severity is reported only while the account has an active Priority Intelligence Requirement, including one the matcher paused; otherwise every count is zero and priorities is empty. All counts are read together and are exact.`).option(`published-after`,{type:`string`,description:`Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`published-before`,{type:`string`,description:`Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`read`,{type:`boolean`,description:`Filter by read state. Accepts true, false, 1, or 0; omit to include read and unread articles.`}).option(`pir-id`,{type:`string`,description:`Beta. Active Priority Intelligence Requirement to count for. articles then counts only articles scored against it, min_relevance applies to its score, and priorities lists only it. Returns a 400 error unless the PIR is active.`}).option(`min-relevance`,{type:`string`,description:`Beta. Count only articles at or above this relevance band: in articles, for any active Priority Intelligence Requirement, as the article list's min_relevance does without pir_id; in each priority, for that PIR. Excludes articles that have not been scored against an active PIR.`,choices:[`low`,`medium`,`high`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ru={command:`aggregate-severity`,describe:`Count Threat Signals articles by severity band`,builder:nu,handler:async e=>l({command:`cloudforce-one threat-signals articles aggregate-severity`,classification:{safeFlags:[`read`,`min-relevance`,`dry-run`]}},e,async()=>{let n={published_after:e[`published-after`],published_before:e[`published-before`],read:e.read,pir_id:e[`pir-id`],min_relevance:e[`min-relevance`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles aggregate-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(tu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles`,body:`json`};function iu(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
261
261
 
262
- Marks up to 50 Threat Signals articles as read or unread.`).option(`article-ids`,{type:`string`,array:!0,description:`Array of article UUIDs to mark (1-50).`}).option(`read`,{type:`boolean`,description:`True to mark read, false to mark unread.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nu={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:tu,handler:async e=>l({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles bulk-mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({article_ids:e[`article-ids`],read:e.read}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`article-ids`]===void 0)throw Error(`--article-ids is required (or pass --body with this field set).`);if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let u=h({article_ids:e[`article-ids`],read:e.read}),d=await c(`Updating`,async()=>n.send($,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})};function ru(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
262
+ Marks up to 50 Threat Signals articles as read or unread.`).option(`article-ids`,{type:`string`,array:!0,description:`Array of article UUIDs to mark (1-50).`}).option(`read`,{type:`boolean`,description:`True to mark read, false to mark unread.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const au={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:iu,handler:async e=>l({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles bulk-mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({article_ids:e[`article-ids`],read:e.read}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`article-ids`]===void 0)throw Error(`--article-ids is required (or pass --body with this field set).`);if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let u=h({article_ids:e[`article-ids`],read:e.read}),d=await c(`Updating`,async()=>n.send($,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})};function ou(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
263
263
 
264
- Retrieves the stored content of a Threat Signals article, unchanged. Depending on how the article was captured from its source, the content is HTML, Markdown, or plain text. The format parameter sets only the response Content-Type; it does not convert the content.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`format`,{type:`string`,description:`Response Content-Type: text (the default) for text/plain or html for text/html. Neither value converts the content. html is deprecated; use text.`,choices:[`text`,`html`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const iu={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:ru,handler:async e=>l({command:`cloudforce-one threat-signals articles get-content`,classification:{safeFlags:[`format`,`dry-run`]}},e,async()=>{let n={format:e.format};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles get-content`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/content`,pathParams:{"article-id":String(e[`article-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>S(`/accounts/${o}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/content${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));x(u.toString(`utf-8`))})};var au={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}`};function ou(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
264
+ Retrieves the stored content of a Threat Signals article, unchanged. Depending on how the article was captured from its source, the content is HTML, Markdown, or plain text. The format parameter sets only the response Content-Type; it does not convert the content.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`format`,{type:`string`,description:`Response Content-Type: text (the default) for text/plain or html for text/html. Neither value converts the content. html is deprecated; use text.`,choices:[`text`,`html`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const su={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:ou,handler:async e=>l({command:`cloudforce-one threat-signals articles get-content`,classification:{safeFlags:[`format`,`dry-run`]}},e,async()=>{let n={format:e.format};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles get-content`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/content`,pathParams:{"article-id":String(e[`article-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>S(`/accounts/${o}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/content${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));x(u.toString(`utf-8`))})};var cu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}`};function lu(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
265
265
 
266
- Retrieves a Threat Signals article with its summary, tags, indicator status and relevance to the account's Priority Intelligence Requirements.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const su={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:ou,handler:async e=>l({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(au,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Loaded`})})};var cu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles`,query:[`cursor`,`per_page`,`feed_id`,`article_id`,`read`,`tag_id`,`tag_category_id`,`tag`,`tag_category`,`include_total`,`search`,`published_after`,`published_before`,`fetched_after`,`fetched_before`,`feed_category`,`source_type`,`tag_applied_by`,`pir_id`,`min_relevance`,`sort`]};function lu(e){return e.usage(`$0 cloudforce-one threat-signals articles list
266
+ Retrieves a Threat Signals article with its summary, tags, indicator status and relevance to the account's Priority Intelligence Requirements.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uu={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:lu,handler:async e=>l({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(cu,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Loaded`})})};var du={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles`,query:[`cursor`,`per_page`,`feed_id`,`article_id`,`read`,`tag_id`,`tag_category_id`,`tag`,`tag_category`,`include_total`,`search`,`published_after`,`published_before`,`fetched_after`,`fetched_before`,`feed_category`,`source_type`,`tag_applied_by`,`pir_id`,`min_relevance`,`sort`]};function fu(e){return e.usage(`$0 cloudforce-one threat-signals articles list
267
267
 
268
- 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:`Number of articles per cursor page, from 1 to 100. Defaults to 20.`}).option(`feed-id`,{type:`string`,description:`Feed UUID filter. Omit to include articles from every account feed.`}).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:`Filter by read state. Accepts true, false, 1, or 0; omit to include read and unread articles.`}).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:`When true on the first page, count matching articles and return an exact total. Defaults to false; cursor pages do not recalculate totals.`}).option(`search`,{type:`string`,description:`NFC-normalized, trimmed literal substring filter on article titles; ASCII case-insensitive, from 1 to 500 characters.`}).option(`published-after`,{type:`string`,description:`Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`published-before`,{type:`string`,description:`Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`fetched-after`,{type:`string`,description:`Include articles fetched at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`fetched-before`,{type:`string`,description:`Include articles fetched at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`feed-category`,{type:`string`,description:`Exact feed-category filter after trimming. Omit to include every category.`}).option(`source-type`,{type:`string`,description:`Filter by curated or custom feed source. Omit to include both source types.`,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(`pir-id`,{type:`string`,description:`Beta. Active Priority Intelligence Requirement to report, filter, and sort relevance by. Omit to use each article's most relevant active PIR. Returns a 400 error unless the PIR is active.`}).option(`min-relevance`,{type:`string`,description:`Beta. Return only articles at or above this relevance band for pir_id, or for any active PIR when pir_id is omitted. Excludes articles that have not been scored.`,choices:[`low`,`medium`,`high`]}).option(`sort`,{type:`string`,description:`Sort by fetched_at, published_at, title, or relevance (beta). Prefix the field with - for descending order; defaults to -fetched_at. -relevance lists the most relevant articles first, by pir_id or by each article's most relevant active PIR, with unscored articles last.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uu={command:`list`,describe:`List Threat Signals articles`,builder:lu,handler:async e=>l({command:`cloudforce-one threat-signals articles list`,classification:{safeFlags:[`read`,`include-total`,`source-type`,`tag-applied-by`,`min-relevance`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],feed_id:e[`feed-id`],article_id:e[`article-id`],read:e.read,tag_id:e[`tag-id`],tag_category_id:e[`tag-category-id`],tag:e.tag,tag_category:e[`tag-category`],include_total:e[`include-total`],search:e.search,published_after:e[`published-after`],published_before:e[`published-before`],fetched_after:e[`fetched-after`],fetched_before:e[`fetched-before`],feed_category:e[`feed-category`],source_type:e[`source-type`],tag_applied_by:e[`tag-applied-by`],pir_id:e[`pir-id`],min_relevance:e[`min-relevance`],sort:e.sort};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(cu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var du={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}`,body:`json`};function fu(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
268
+ 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:`Number of articles per cursor page, from 1 to 100. Defaults to 20.`}).option(`feed-id`,{type:`string`,description:`Feed UUID filter. Omit to include articles from every account feed.`}).option(`article-id`,{type:`string`,array:!0,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:`Filter by read state. Accepts true, false, 1, or 0; omit to include read and unread articles.`}).option(`tag-id`,{type:`string`,array:!0,description:`Repeatable tag UUID filter. An article matches any selected tag.`}).option(`tag-category-id`,{type:`string`,array:!0,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:`When true on the first page, count matching articles and return an exact total. Defaults to false; cursor pages do not recalculate totals.`}).option(`search`,{type:`string`,description:`NFC-normalized, trimmed literal substring filter on article titles; ASCII case-insensitive, from 1 to 500 characters.`}).option(`published-after`,{type:`string`,description:`Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`published-before`,{type:`string`,description:`Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`fetched-after`,{type:`string`,description:`Include articles fetched at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`fetched-before`,{type:`string`,description:`Include articles fetched at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.`}).option(`feed-category`,{type:`string`,description:`Exact feed-category filter after trimming. Omit to include every category.`}).option(`source-type`,{type:`string`,description:`Filter by curated or custom feed source. Omit to include both source types.`,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(`pir-id`,{type:`string`,description:`Beta. Active Priority Intelligence Requirement to report, filter, and sort relevance by. Omit to use each article's most relevant active PIR. Returns a 400 error unless the PIR is active.`}).option(`min-relevance`,{type:`string`,description:`Beta. Return only articles at or above this relevance band for pir_id, or for any active PIR when pir_id is omitted. Excludes articles that have not been scored.`,choices:[`low`,`medium`,`high`]}).option(`sort`,{type:`string`,description:`Sort by fetched_at, published_at, title, or relevance (beta). Prefix the field with - for descending order; defaults to -fetched_at. -relevance lists the most relevant articles first, by pir_id or by each article's most relevant active PIR, with unscored articles last.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pu={command:`list`,describe:`List Threat Signals articles`,builder:fu,handler:async e=>l({command:`cloudforce-one threat-signals articles list`,classification:{safeFlags:[`read`,`include-total`,`source-type`,`tag-applied-by`,`min-relevance`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],feed_id:e[`feed-id`],article_id:e[`article-id`],read:e.read,tag_id:e[`tag-id`],tag_category_id:e[`tag-category-id`],tag:e.tag,tag_category:e[`tag-category`],include_total:e[`include-total`],search:e.search,published_after:e[`published-after`],published_before:e[`published-before`],fetched_after:e[`fetched-after`],fetched_before:e[`fetched-before`],feed_category:e[`feed-category`],source_type:e[`source-type`],tag_applied_by:e[`tag-applied-by`],pir_id:e[`pir-id`],min_relevance:e[`min-relevance`],sort:e.sort};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(du,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var mu={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}`,body:`json`};function hu(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
269
269
 
270
- Marks a Threat Signals article as read or unread.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`read`,{type:`boolean`,description:`True to mark the article read, false to mark unread.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pu={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:fu,handler:async e=>l({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({read:e.read}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(du,{body:t,account_id:l,article_id:e[`article-id`]}));o(r,{successLabel:`Updated`});return}if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let u=h({read:e.read}),d=await c(`Updating`,async()=>n.send(du,{body:u,account_id:l,article_id:e[`article-id`]}));o(d,{successLabel:`Updated`})})};var mu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills/${t.skill_id}/output`};function hu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
270
+ Marks a Threat Signals article as read or unread.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`read`,{type:`boolean`,description:`True to mark the article read, false to mark unread.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gu={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:hu,handler:async e=>l({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({read:e.read}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(mu,{body:t,account_id:l,article_id:e[`article-id`]}));o(r,{successLabel:`Updated`});return}if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let u=h({read:e.read}),d=await c(`Updating`,async()=>n.send(mu,{body:u,account_id:l,article_id:e[`article-id`]}));o(d,{successLabel:`Updated`})})};var _u={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills/${t.skill_id}/output`};function vu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
271
271
 
272
- Retrieves the stored output of a skill for a Threat Signals article. The custom_output field is parsed JSON when the stored output is valid JSON, otherwise the raw string.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default Skill ID (IOC-context: default-ioc-context-skill)`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gu={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:hu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills get-output`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/output`,pathParams:{"article-id":String(e[`article-id`]??``),"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(mu,{account_id:l,article_id:e[`article-id`],skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var _u={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills`};function vu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills list
272
+ Retrieves the stored output of a skill for a Threat Signals article. The custom_output field is parsed JSON when the stored output is valid JSON, otherwise the raw string.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default Skill ID (IOC-context: default-ioc-context-skill)`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yu={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:vu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills get-output`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/output`,pathParams:{"article-id":String(e[`article-id`]??``),"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(_u,{account_id:l,article_id:e[`article-id`],skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var bu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills`};function xu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills list
273
273
 
274
- 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. Free Threat Signals accounts cannot read Custom Skills.`).option(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yu={command:`list`,describe:`List Threat Signals article custom skills`,builder:vu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(_u,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Loaded`})})};var bu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills/${t.skill_id}/run`,body:`json`};function xu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills run <skill-id>
274
+ 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. Free Threat Signals accounts cannot read Custom Skills.`).option(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Su={command:`list`,describe:`List Threat Signals article custom skills`,builder:xu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(bu,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Loaded`})})};var Cu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills/${t.skill_id}/run`,body:`json`};function wu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills run <skill-id>
275
275
 
276
- Run an active Custom Skill assigned to the article's feed, or run a managed default skill. Requires a paid Threat Signals subscription and the Cloudforce One Write permission. Always persists output; rerunning overwrites the previous result. Does not expose diagnostic model data or accept server-preview inputs.`).positional(`skill-id`,{type:`string`,description:`UUID of an active Custom Skill that is assigned to the article's feed, or a managed default skill ID. Requires a paid Threat Signals subscription and the Cloudforce One Write permission. Always persists output; rerunning overwrites the previous result. No diagnostic or server-preview inputs.`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Threat Signals article 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)`})}const Su={command:`run <skill-id>`,describe:`Run and persist skill output for a Threat Signals article`,builder:xu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills run`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/run`,pathParams:{"article-id":String(e[`article-id`]??``),"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body),n=await c(`Creating`,async()=>l.send(bu,{body:t,account_id:u,article_id:e[`article-id`],skill_id:e[`skill-id`]}));o(n,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/skills/${encodeURIComponent(String(e[`skill-id`]))}/run`));o(d,{successLabel:`Created`})})},Cu={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(gu).command(yu).command(Su).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tags`,body:`json`};function Tu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
276
+ Run an active Custom Skill assigned to the article's feed, or run a managed default skill. Requires a paid Threat Signals subscription and the Cloudforce One Write permission. Always persists output; rerunning overwrites the previous result. Does not expose diagnostic model data or accept server-preview inputs.`).positional(`skill-id`,{type:`string`,description:`UUID of an active Custom Skill that is assigned to the article's feed, or a managed default skill ID. Requires a paid Threat Signals subscription and the Cloudforce One Write permission. Always persists output; rerunning overwrites the previous result. No diagnostic or server-preview inputs.`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Threat Signals article 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)`})}const Tu={command:`run <skill-id>`,describe:`Run and persist skill output for a Threat Signals article`,builder:wu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills run`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/run`,pathParams:{"article-id":String(e[`article-id`]??``),"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body),n=await c(`Creating`,async()=>l.send(Cu,{body:t,account_id:u,article_id:e[`article-id`],skill_id:e[`skill-id`]}));o(n,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/skills/${encodeURIComponent(String(e[`skill-id`]))}/run`));o(d,{successLabel:`Created`})})},Eu={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(yu).command(Su).command(Tu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Du={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tags`,body:`json`};function Ou(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
277
277
 
278
- Applies a tag from the account's tag catalog to a Threat Signals article.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`tag-id`,{type:`string`,description:`UUID of a tag from the account's catalog to apply to the article.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Eu={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:Tu,handler:async e=>l({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tags`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({tag_id:g(e[`tag-id`],`tag-id`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(wu,{body:t,account_id:l,article_id:e[`article-id`]}));o(r,{successLabel:`Created`});return}e[`tag-id`]===void 0&&(e[`tag-id`]=await v(`tag-id`,`UUID of a tag from the account's catalog to apply to the article.`));let u=h({tag_id:g(e[`tag-id`],`tag-id`,`text`)}),d=await c(`Creating`,async()=>n.send(wu,{body:u,account_id:l,article_id:e[`article-id`]}));o(d,{successLabel:`Created`})})};var Du={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tag`};function Ou(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
278
+ Applies a tag from the account's tag catalog to a Threat Signals article.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`tag-id`,{type:`string`,description:`UUID of a tag from the account's catalog to apply to the article.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ku={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:Ou,handler:async e=>l({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tags`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({tag_id:g(e[`tag-id`],`tag-id`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Du,{body:t,account_id:l,article_id:e[`article-id`]}));o(r,{successLabel:`Created`});return}e[`tag-id`]===void 0&&(e[`tag-id`]=await v(`tag-id`,`UUID of a tag from the account's catalog to apply to the article.`));let u=h({tag_id:g(e[`tag-id`],`tag-id`,`text`)}),d=await c(`Creating`,async()=>n.send(Du,{body:u,account_id:l,article_id:e[`article-id`]}));o(d,{successLabel:`Created`})})};var Au={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tag`};function ju(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
279
279
 
280
- Runs the default AI tagging skill on an article and replaces its AI-applied tags.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ku={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:Ou,handler:async e=>l({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tag`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Du,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Created`})})};var Au={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tags/${t.tag_id}`};function ju(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
280
+ Runs the default AI tagging skill on an article and replaces its AI-applied tags.`).positional(`article-id`,{type:`string`,description:`Threat Signals article UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mu={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:ju,handler:async e=>l({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tag`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Au,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Created`})})};var Nu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tags/${t.tag_id}`};function Pu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
281
281
 
282
- Removes a tag from a Threat Signals article.`).positional(`tag-id`,{type:`string`,description:`UUID of a tag from the account's catalog`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Threat Signals article 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 Mu={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:ju,handler:async e=>l({command:`cloudforce-one threat-signals articles tags remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``),"tag-id":String(e[`tag-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Au,{account_id:l,article_id:e[`article-id`],tag_id:e[`tag-id`]}));o(u,{successLabel:`Deleted`})})},Nu={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(Eu).command(ku).command(Mu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pu={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(Zl).command(eu).command(nu).command(su).command(iu).command(uu).command(pu).command(Cu).command(Nu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/categories`};function Iu(e){return e.usage(`$0 cloudforce-one threat-signals categories list
282
+ Removes a tag from a Threat Signals article.`).positional(`tag-id`,{type:`string`,description:`UUID of a tag from the account's catalog`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Threat Signals article 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 Fu={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:Pu,handler:async e=>l({command:`cloudforce-one threat-signals articles tags remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``),"tag-id":String(e[`tag-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Nu,{account_id:l,article_id:e[`article-id`],tag_id:e[`tag-id`]}));o(u,{successLabel:`Deleted`})})},Iu={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(ku).command(Mu).command(Fu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lu={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(eu).command(ru).command(au).command(uu).command(su).command(pu).command(gu).command(Eu).command(Iu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ru={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/categories`};function zu(e){return e.usage(`$0 cloudforce-one threat-signals categories list
283
283
 
284
- 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 Lu={command:`list`,describe:`List Threat Signals feed categories`,builder:Iu,handler:async e=>l({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/categories`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Fu,{account_id:l}));o(u,{successLabel:`Loaded`})})},Ru={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(Lu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds`,body:`json`,errors:{403:`ForbiddenError`,503:`ServiceUnavailableError`}};function Bu(e){return e.usage("$0 cloudforce-one threat-signals feeds create\n\nSubscribes the account to a custom or curated Threat Signals feed. Adding a custom feed when the account is at its custom-feed limit returns 403 with `errors[0].reason` `threat_signals_feed_limit`, and `errors[0].custom_feed_limit` and `errors[0].custom_feed_count` give the limit and current count. Curated feeds are not subject to this limit.").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=>g(e,`category-id`,`text`)).option(`curated-feed-id`,{type:`string`,description:`UUID of a curated feed to subscribe to. Provide exactly one of url or curated_feed_id. The account must have feed creation entitlement and not exceed feed allowance.`}).option(`display-name`,{type:`string`,description:`Override the feed's display name. Null clears it; omit to keep existing or derived value.`}).option(`enabled`,{type:`boolean`,description:`Whether to actively poll the feed. Default true.`,default:!0}).option(`poll-interval-s`,{type:`number`,description:`Polling interval in seconds (60-86400). Default 300s (5 minutes).`,default:300}).option(`title`,{type:`string`,description:`Override the feed's title. Null clears it; omit to keep existing or derived value.`}).option(`url`,{type:`string`,description:`HTTPS RSS feed URL. Provide exactly one of url or curated_feed_id. The account must have feed creation entitlement and not exceed feed allowance.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vu={command:`create`,describe:`Create Threat Signals feed`,builder:Bu,handler:async e=>l({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({category_id:e[`category-id`],curated_feed_id:g(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`),url:g(e.url,`url`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(zu,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=h({category_id:e[`category-id`],curated_feed_id:g(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`),url:g(e.url,`url`,`text`)}),d=await c(`Creating`,async()=>n.send(zu,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Hu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}`};function Uu(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
284
+ 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 Bu={command:`list`,describe:`List Threat Signals feed categories`,builder:zu,handler:async e=>l({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/categories`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ru,{account_id:l}));o(u,{successLabel:`Loaded`})})},Vu={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(Bu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds`,body:`json`,errors:{403:`ForbiddenError`,503:`ServiceUnavailableError`}};function Uu(e){return e.usage("$0 cloudforce-one threat-signals feeds create\n\nSubscribes the account to a custom or curated Threat Signals feed. Adding a custom feed when the account is at its custom-feed limit returns 403 with `errors[0].reason` `threat_signals_feed_limit`, and `errors[0].custom_feed_limit` and `errors[0].custom_feed_count` give the limit and current count. Curated feeds are not subject to this limit.").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=>g(e,`category-id`,`text`)).option(`curated-feed-id`,{type:`string`,description:`UUID of a curated feed to subscribe to. Provide exactly one of url or curated_feed_id. The account must have feed creation entitlement and not exceed feed allowance.`}).option(`display-name`,{type:`string`,description:`Override the feed's display name. Null clears it; omit to keep existing or derived value.`}).option(`enabled`,{type:`boolean`,description:`Whether to actively poll the feed. Default true.`,default:!0}).option(`poll-interval-s`,{type:`number`,description:`Polling interval in seconds (60-86400). Default 300s (5 minutes).`,default:300}).option(`title`,{type:`string`,description:`Override the feed's title. Null clears it; omit to keep existing or derived value.`}).option(`url`,{type:`string`,description:`HTTPS RSS feed URL. Provide exactly one of url or curated_feed_id. The account must have feed creation entitlement and not exceed feed allowance.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Wu={command:`create`,describe:`Create Threat Signals feed`,builder:Uu,handler:async e=>l({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({category_id:e[`category-id`],curated_feed_id:g(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`),url:g(e.url,`url`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Hu,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=h({category_id:e[`category-id`],curated_feed_id:g(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`),url:g(e.url,`url`,`text`)}),d=await c(`Creating`,async()=>n.send(Hu,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Gu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}`};function Ku(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
285
285
 
286
- Unsubscribes the account from a Threat Signals feed and deletes its articles.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,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 Wu={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:Uu,handler:async e=>l({command:`cloudforce-one threat-signals feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force,message:`This unsubscribes the account from the feed and permanently deletes its stored articles, including their extracted indicators, tags, and skill outputs.`}))return;let u=await c(`Deleting`,async()=>n.send(Hu,{account_id:l,feed_id:e[`feed-id`]}));o(u,{successLabel:`Deleted`})})};function Gu(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
286
+ Unsubscribes the account from a Threat Signals feed and deletes its articles.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,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 qu={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:Ku,handler:async e=>l({command:`cloudforce-one threat-signals feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force,message:`This unsubscribes the account from the feed and permanently deletes its stored articles, including their extracted indicators, tags, and skill outputs.`}))return;let u=await c(`Deleting`,async()=>n.send(Gu,{account_id:l,feed_id:e[`feed-id`]}));o(u,{successLabel:`Deleted`})})};function Ju(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
287
287
 
288
- Retrieves the feed document fetched by the most recent poll as text/plain by default or application/xml when format is xml.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,demandOption:!0}).option(`format`,{type:`string`,description:`Response format. Use xml for application/xml; omit it for the default text/plain response.`,choices:[`xml`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ku={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:Gu,handler:async e=>l({command:`cloudforce-one threat-signals feeds get-raw`,classification:{safeFlags:[`format`,`dry-run`]}},e,async()=>{let n={format:e.format};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds get-raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/raw`,pathParams:{"feed-id":String(e[`feed-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>S(`/accounts/${o}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(e[`feed-id`]))}/raw${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));x(u.toString(`utf-8`))})};var qu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds`,query:[`page`,`per_page`,`limit`,`sort`,`category`,`source_type`,`enabled`,`status`],errors:{503:`ServiceUnavailableError`}};function Ju(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
288
+ Retrieves the feed document fetched by the most recent poll as text/plain by default or application/xml when format is xml.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,demandOption:!0}).option(`format`,{type:`string`,description:`Response format. Use xml for application/xml; omit it for the default text/plain response.`,choices:[`xml`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yu={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:Ju,handler:async e=>l({command:`cloudforce-one threat-signals feeds get-raw`,classification:{safeFlags:[`format`,`dry-run`]}},e,async()=>{let n={format:e.format};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds get-raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/raw`,pathParams:{"feed-id":String(e[`feed-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>S(`/accounts/${o}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(e[`feed-id`]))}/raw${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));x(u.toString(`utf-8`))})};var Xu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds`,query:[`page`,`per_page`,`limit`,`sort`,`category`,`source_type`,`enabled`,`status`],errors:{503:`ServiceUnavailableError`}};function Zu(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
289
289
 
290
- Lists the account's Threat Signals feed subscriptions.`).option(`page`,{type:`number`,description:`1-based page number. Minimum 1; defaults to 1.`}).option(`per-page`,{type:`number`,description:`Number of feeds per page, from 1 to 100. Defaults to 20.`}).option(`limit`,{type:`number`,description:`Optional 1–100 alias for per_page. When provided, limit takes precedence.`}).option(`sort`,{type:`string`,description:`Sort by created_at, title, category, or url. Prefix the field with - for descending order; defaults to -created_at.`}).option(`category`,{type:`string`,description:`Exact feed-category filter, up to 100 characters. Omit to include all categories.`}).option(`source-type`,{type:`string`,description:`Filter by curated or custom feed source. Omit to include both source types.`,choices:[`curated`,`custom`]}).option(`enabled`,{type:`boolean`,description:`Filter by enabled state. Accepts true, false, 1, or 0; omit to include enabled and disabled feeds.`}).option(`status`,{type:`string`,description:`Exact stored polling-status filter, such as active or error. Omit to include every status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yu={command:`list`,describe:`List Threat Signals feeds`,builder:Ju,handler:async e=>l({command:`cloudforce-one threat-signals feeds list`,classification:{safeFlags:[`source-type`,`enabled`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],limit:e.limit,sort:e.sort,category:e.category,source_type:e[`source-type`],enabled:e.enabled,status:e.status};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(qu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Xu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/poll`,query:[`feed_id`]};function Zu(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
290
+ Lists the account's Threat Signals feed subscriptions.`).option(`page`,{type:`number`,description:`1-based page number. Minimum 1; defaults to 1.`}).option(`per-page`,{type:`number`,description:`Number of feeds per page, from 1 to 100. Defaults to 20.`}).option(`limit`,{type:`number`,description:`Optional 1–100 alias for per_page. When provided, limit takes precedence.`}).option(`sort`,{type:`string`,description:`Sort by created_at, title, category, or url. Prefix the field with - for descending order; defaults to -created_at.`}).option(`category`,{type:`string`,description:`Exact feed-category filter, up to 100 characters. Omit to include all categories.`}).option(`source-type`,{type:`string`,description:`Filter by curated or custom feed source. Omit to include both source types.`,choices:[`curated`,`custom`]}).option(`enabled`,{type:`boolean`,description:`Filter by enabled state. Accepts true, false, 1, or 0; omit to include enabled and disabled feeds.`}).option(`status`,{type:`string`,description:`Exact stored polling-status filter, such as active or error. Omit to include every status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qu={command:`list`,describe:`List Threat Signals feeds`,builder:Zu,handler:async e=>l({command:`cloudforce-one threat-signals feeds list`,classification:{safeFlags:[`source-type`,`enabled`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],limit:e.limit,sort:e.sort,category:e.category,source_type:e[`source-type`],enabled:e.enabled,status:e.status};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Xu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $u={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/poll`,query:[`feed_id`]};function ed(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
291
291
 
292
- Starts an immediate poll of one or all Threat Signals feeds.`).option(`feed-id`,{type:`string`,description:`UUID of a specific feed to poll, or "all" to poll all feeds. Omit or pass "all" for all feeds.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qu={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:Zu,handler:async e=>l({command:`cloudforce-one threat-signals feeds poll`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={feed_id:e[`feed-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals feeds poll`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/poll`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send(Xu,{account_id:u,...n}));o(d,{successLabel:`Created`})})};var $u={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}/skills`};function ed(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
292
+ Starts an immediate poll of one or all Threat Signals feeds.`).option(`feed-id`,{type:`string`,description:`UUID of a specific feed to poll, or "all" to poll all feeds. Omit or pass "all" for all feeds.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const td={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:ed,handler:async e=>l({command:`cloudforce-one threat-signals feeds poll`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={feed_id:e[`feed-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals feeds poll`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/poll`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send($u,{account_id:u,...n}));o(d,{successLabel:`Created`})})};var nd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}/skills`};function rd(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
293
293
 
294
- Retrieves active non-IOC-context Managed Default Skills followed by active Custom Skills assigned to the feed, with each entry's source. Free Threat Signals accounts receive only those Managed Default Skills.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const td={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:ed,handler:async e=>l({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/skills`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send($u,{account_id:l,feed_id:e[`feed-id`]}));o(u,{successLabel:`Loaded`})})};var nd={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}/skills`,body:`json`};function rd(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
294
+ Retrieves active non-IOC-context Managed Default Skills followed by active Custom Skills assigned to the feed, with each entry's source. Free Threat Signals accounts receive only those Managed Default Skills.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const id={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:rd,handler:async e=>l({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/skills`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(nd,{account_id:l,feed_id:e[`feed-id`]}));o(u,{successLabel:`Loaded`})})};var ad={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}/skills`,body:`json`};function od(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
295
295
 
296
- Replaces the ordered custom skills assigned to a Threat Signals feed. Requires a paid Threat Signals subscription.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,demandOption:!0}).option(`skill-ids`,{type:`string`,array:!0,description:`Ordered array of Custom Skill UUIDs (max 20). Replaces the feed's custom skill assignments. Free accounts cannot assign custom skills. Managed default skills are unaffected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const id={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:rd,handler:async e=>l({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds skills update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/skills`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({skill_ids:e[`skill-ids`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(nd,{body:t,account_id:l,feed_id:e[`feed-id`]}));o(r,{successLabel:`Updated`});return}if(e[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let u=h({skill_ids:e[`skill-ids`]}),d=await c(`Updating`,async()=>n.send(nd,{body:u,account_id:l,feed_id:e[`feed-id`]}));o(d,{successLabel:`Updated`})})},ad={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(td).command(id).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var od={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}`,body:`json`};function sd(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
296
+ Replaces the ordered custom skills assigned to a Threat Signals feed. Requires a paid Threat Signals subscription.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,demandOption:!0}).option(`skill-ids`,{type:`string`,array:!0,description:`Ordered array of Custom Skill UUIDs (max 20). Replaces the feed's custom skill assignments. Free accounts cannot assign custom skills. Managed default skills are unaffected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const sd={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:od,handler:async e=>l({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds skills update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/skills`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({skill_ids:e[`skill-ids`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ad,{body:t,account_id:l,feed_id:e[`feed-id`]}));o(r,{successLabel:`Updated`});return}if(e[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let u=h({skill_ids:e[`skill-ids`]}),d=await c(`Updating`,async()=>n.send(ad,{body:u,account_id:l,feed_id:e[`feed-id`]}));o(d,{successLabel:`Updated`})})},cd={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(id).command(sd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ld={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}`,body:`json`};function ud(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
297
297
 
298
- Updates a Threat Signals feed subscription.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,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=>g(e,`category-id`,`text`)).option(`display-name`,{type:`string`,description:`Override the feed's display name. Null clears it; omit to keep existing or derived value.`}).option(`enabled`,{type:`boolean`,description:`Whether to actively poll the feed. Omit to keep current value.`}).option(`poll-interval-s`,{type:`number`,description:`New polling interval in seconds (60-86400). Omit to keep current value.`}).option(`title`,{type:`string`,description:`Override the feed's title. Null clears it; omit to keep existing or derived value.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const cd={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:sd,handler:async e=>l({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({category_id:e[`category-id`],display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(od,{body:t,account_id:l,feed_id:e[`feed-id`]}));o(r,{successLabel:`Updated`});return}let u=h({category_id:e[`category-id`],display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`)}),d=await c(`Updating`,async()=>n.send(od,{body:u,account_id:l,feed_id:e[`feed-id`]}));o(d,{successLabel:`Updated`})})},ld={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(Vu).command(Wu).command(Ku).command(Yu).command(Qu).command(cd).command(ad).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ud={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/indicators`,query:[`feed_id`,`article_id`,`search`,`per_page`,`sort`,`include_total`,`cursor`]};function dd(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
298
+ Updates a Threat Signals feed subscription.`).positional(`feed-id`,{type:`string`,description:`UUID of the Threat Signals feed`,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=>g(e,`category-id`,`text`)).option(`display-name`,{type:`string`,description:`Override the feed's display name. Null clears it; omit to keep existing or derived value.`}).option(`enabled`,{type:`boolean`,description:`Whether to actively poll the feed. Omit to keep current value.`}).option(`poll-interval-s`,{type:`number`,description:`New polling interval in seconds (60-86400). Omit to keep current value.`}).option(`title`,{type:`string`,description:`Override the feed's title. Null clears it; omit to keep existing or derived value.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const dd={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:ud,handler:async e=>l({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({category_id:e[`category-id`],display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ld,{body:t,account_id:l,feed_id:e[`feed-id`]}));o(r,{successLabel:`Updated`});return}let u=h({category_id:e[`category-id`],display_name:g(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:g(e.title,`title`,`text`)}),d=await c(`Updating`,async()=>n.send(ld,{body:u,account_id:l,feed_id:e[`feed-id`]}));o(d,{successLabel:`Updated`})})},fd={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(Wu).command(qu).command(Yu).command(Qu).command(td).command(dd).command(cd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/indicators`,query:[`feed_id`,`article_id`,`search`,`per_page`,`sort`,`include_total`,`cursor`]};function md(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
299
299
 
300
- Lists indicators of compromise extracted from the account's Threat Signals articles.`).option(`feed-id`,{type:`string`,description:`Feed UUID filter. Omit to include indicators from every account feed.`}).option(`article-id`,{type:`string`,description:`Article UUID filter. Omit to include indicators from every article.`}).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:`Number of indicators per cursor page, from 1 to 100. Defaults to 20.`}).option(`sort`,{type:`string`,description:`Sort by id. Use id for ascending or -id for descending order; defaults to id.`}).option(`include-total`,{type:`boolean`,description:`When true on the first page, count matching indicators and return an exact total. Defaults to false; cursor pages do not recalculate totals.`}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `pagination.cursor`. When provided, page size, ordering, and filters come from the cursor. Sending `per_page`, `sort`, `include_total`, `feed_id`, `article_id`, or `search` alongside it returns a 400 `CursorFilterConflictError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fd={command:`list`,describe:`List Threat Signals article indicators`,builder:dd,handler:async e=>l({command:`cloudforce-one threat-signals indicators list`,classification:{safeFlags:[`include-total`,`dry-run`]}},e,async()=>{let n={feed_id:e[`feed-id`],article_id:e[`article-id`],search:e.search,per_page:e[`per-page`],sort:e.sort,include_total:e[`include-total`],cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ud,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},pd={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(fd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var md={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/search`,query:[`query`,`max_results`,`feed_id`]};function hd(e){return e.usage(`$0 cloudforce-one threat-signals search
300
+ Lists indicators of compromise extracted from the account's Threat Signals articles.`).option(`feed-id`,{type:`string`,description:`Feed UUID filter. Omit to include indicators from every account feed.`}).option(`article-id`,{type:`string`,description:`Article UUID filter. Omit to include indicators from every article.`}).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:`Number of indicators per cursor page, from 1 to 100. Defaults to 20.`}).option(`sort`,{type:`string`,description:`Sort by id. Use id for ascending or -id for descending order; defaults to id.`}).option(`include-total`,{type:`boolean`,description:`When true on the first page, count matching indicators and return an exact total. Defaults to false; cursor pages do not recalculate totals.`}).option(`cursor`,{type:`string`,description:"Opaque cursor from the previous response's `pagination.cursor`. When provided, page size, ordering, and filters come from the cursor. Sending `per_page`, `sort`, `include_total`, `feed_id`, `article_id`, or `search` alongside it returns a 400 `CursorFilterConflictError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hd={command:`list`,describe:`List Threat Signals article indicators`,builder:md,handler:async e=>l({command:`cloudforce-one threat-signals indicators list`,classification:{safeFlags:[`include-total`,`dry-run`]}},e,async()=>{let n={feed_id:e[`feed-id`],article_id:e[`article-id`],search:e.search,per_page:e[`per-page`],sort:e.sort,include_total:e[`include-total`],cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(pd,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},gd={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(hd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _d={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/search`,query:[`query`,`max_results`,`feed_id`]};function vd(e){return e.usage(`$0 cloudforce-one threat-signals search
301
301
 
302
- Searches the account's Threat Signals articles using keyword and semantic retrieval.`).option(`query`,{type:`string`,description:`Keyword and semantic article-search text, from 1 to 1000 characters.`,demandOption:!0}).option(`max-results`,{type:`string`,description:`Maximum search matches to request, an integer from 1 to 50. Defaults to 20 when omitted or empty; multiple matches from one article can produce fewer returned articles.`}).option(`feed-id`,{type:`string`,description:`Optional feed UUID that restricts results to articles from that feed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gd={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:hd,handler:async e=>l({command:`cloudforce-one threat-signals search`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={query:e.query,max_results:e[`max-results`],feed_id:e[`feed-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/search`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(md,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var _d={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills`,body:`json`};function vd(e){return e.usage(`$0 cloudforce-one threat-signals skills create
302
+ Searches the account's Threat Signals articles using keyword and semantic retrieval.`).option(`query`,{type:`string`,description:`Keyword and semantic article-search text, from 1 to 1000 characters.`,demandOption:!0}).option(`max-results`,{type:`string`,description:`Maximum search matches to request, an integer from 1 to 50. Defaults to 20 when omitted or empty; multiple matches from one article can produce fewer returned articles.`}).option(`feed-id`,{type:`string`,description:`Optional feed UUID that restricts results to articles from that feed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yd={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:vd,handler:async e=>l({command:`cloudforce-one threat-signals search`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={query:e.query,max_results:e[`max-results`],feed_id:e[`feed-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/search`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(_d,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var bd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills`,body:`json`};function xd(e){return e.usage(`$0 cloudforce-one threat-signals skills create
303
303
 
304
- Creates a Custom Skill for the account. Free Threat Signals accounts cannot create Custom Skills.`).option(`name`,{type:`string`,description:`Custom Skill name (1–100 characters).`}).option(`output-schema`,{type:`string`,description:`JSON Schema serialized as a string (max 4096 characters).`}).option(`prompt`,{type:`string`,description:`AI prompt (1–4000 characters) defining the skill's instructions.`}).option(`type`,{type:`string`,description:`Optional label; does not affect execution. Defaults to "summary".`,choices:[`summary`,`tags`],default:`summary`}).coerce(`type`,e=>g(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 yd={command:`create`,describe:`Create Threat Signals skill`,builder:vd,handler:async e=>l({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`),type:e.type}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(_d,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`Custom Skill name (1–100 characters).`)),e[`output-schema`]===void 0&&(e[`output-schema`]=await v(`output-schema`,`JSON Schema serialized as a string (max 4096 characters).`)),e.prompt===void 0&&(e.prompt=await v(`prompt`,`AI prompt (1–4000 characters) defining the skill's instructions.`));let u=h({name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`),type:e.type}),d=await c(`Creating`,async()=>n.send(_d,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var bd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`};function xd(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
304
+ Creates a Custom Skill for the account. Free Threat Signals accounts cannot create Custom Skills.`).option(`name`,{type:`string`,description:`Custom Skill name (1–100 characters).`}).option(`output-schema`,{type:`string`,description:`JSON Schema serialized as a string (max 4096 characters).`}).option(`prompt`,{type:`string`,description:`AI prompt (1–4000 characters) defining the skill's instructions.`}).option(`type`,{type:`string`,description:`Optional label; does not affect execution. Defaults to "summary".`,choices:[`summary`,`tags`],default:`summary`}).coerce(`type`,e=>g(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 Sd={command:`create`,describe:`Create Threat Signals skill`,builder:xd,handler:async e=>l({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`),type:e.type}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(bd,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`Custom Skill name (1–100 characters).`)),e[`output-schema`]===void 0&&(e[`output-schema`]=await v(`output-schema`,`JSON Schema serialized as a string (max 4096 characters).`)),e.prompt===void 0&&(e.prompt=await v(`prompt`,`AI prompt (1–4000 characters) defining the skill's instructions.`));let u=h({name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`),type:e.type}),d=await c(`Creating`,async()=>n.send(bd,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Cd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`};function wd(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
305
305
 
306
- Deletes a Custom Skill. The skill's stored outputs on articles are deleted with it. Managed Default Skills cannot be deleted. Free Threat Signals accounts cannot delete Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default 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 Sd={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:xd,handler:async e=>l({command:`cloudforce-one threat-signals skills delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force,message:`This permanently deletes the custom skill, removes it from every feed it is assigned to, and deletes the outputs it stored on articles.`}))return;let u=await c(`Deleting`,async()=>n.send(bd,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Deleted`})})};var Cd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`};function wd(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
306
+ Deletes a Custom Skill. The skill's stored outputs on articles are deleted with it. Managed Default Skills cannot be deleted. Free Threat Signals accounts cannot delete Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default 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 Td={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:wd,handler:async e=>l({command:`cloudforce-one threat-signals skills delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await b({force:!!e.force,message:`This permanently deletes the custom skill, removes it from every feed it is assigned to, and deletes the outputs it stored on articles.`}))return;let u=await c(`Deleting`,async()=>n.send(Cd,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Deleted`})})};var Ed={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`};function Dd(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
307
307
 
308
- Retrieves a Managed Default Skill or Custom Skill. Managed catalog definitions are readable. Free Threat Signals accounts cannot read Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Td={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:wd,handler:async e=>l({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Cd,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var Ed={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills`,query:[`page`,`per_page`]};function Dd(e){return e.usage(`$0 cloudforce-one threat-signals skills list
308
+ Retrieves a Managed Default Skill or Custom Skill. Managed catalog definitions are readable. Free Threat Signals accounts cannot read Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Od={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:Dd,handler:async e=>l({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ed,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var kd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills`,query:[`page`,`per_page`]};function Ad(e){return e.usage(`$0 cloudforce-one threat-signals skills list
309
309
 
310
- Lists active Managed Default Skills and Custom Skills. Free Threat Signals accounts see active managed defaults only, with custom_skills_available: false.`).option(`page`,{type:`number`,description:`Page number (≥ 1, default 1).`}).option(`per-page`,{type:`number`,description:`Results per page (1–100, default 20).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Od={command:`list`,describe:`List Threat Signals skills`,builder:Dd,handler:async e=>l({command:`cloudforce-one threat-signals skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ed,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var kd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}/tag-categories`};function Ad(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
310
+ Lists active Managed Default Skills and Custom Skills. Free Threat Signals accounts see active managed defaults only, with custom_skills_available: false.`).option(`page`,{type:`number`,description:`Page number (≥ 1, default 1).`}).option(`per-page`,{type:`number`,description:`Results per page (1–100, default 20).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jd={command:`list`,describe:`List Threat Signals skills`,builder:Ad,handler:async e=>l({command:`cloudforce-one threat-signals skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(kd,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Md={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}/tag-categories`};function Nd(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
311
311
 
312
- Retrieves the Tag Categories the managed default tagging skill may select tags from. This configures the managed default tagging skill, not Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Must be default-tagging-skill; configures the managed default tagging skill`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jd={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:Ad,handler:async e=>l({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(kd,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var Md={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}/tag-categories`,body:`json`};function Nd(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
312
+ Retrieves the Tag Categories the managed default tagging skill may select tags from. This configures the managed default tagging skill, not Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Must be default-tagging-skill; configures the managed default tagging skill`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pd={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:Nd,handler:async e=>l({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Md,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var Fd={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}/tag-categories`,body:`json`};function Id(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
313
313
 
314
- Replaces the Tag Categories the managed default tagging skill may select tags from. This configures the managed default tagging skill, not Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Must be default-tagging-skill; configures the managed default tagging skill`,demandOption:!0}).option(`category-uuids`,{type:`string`,array:!0,description:`Up to 100 unique tag category UUIDs that the managed default tagging skill may select tags from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pd={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:Nd,handler:async e=>l({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({category_uuids:e[`category-uuids`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Md,{body:t,account_id:l,skill_id:e[`skill-id`]}));o(r,{successLabel:`Updated`});return}if(e[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let u=h({category_uuids:e[`category-uuids`]}),d=await c(`Updating`,async()=>n.send(Md,{body:u,account_id:l,skill_id:e[`skill-id`]}));o(d,{successLabel:`Updated`})})},Fd={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(jd).command(Pd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Id={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`,body:`json`};function Ld(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
314
+ Replaces the Tag Categories the managed default tagging skill may select tags from. This configures the managed default tagging skill, not Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Must be default-tagging-skill; configures the managed default tagging skill`,demandOption:!0}).option(`category-uuids`,{type:`string`,array:!0,description:`Up to 100 unique tag category UUIDs that the managed default tagging skill may select tags from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ld={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:Id,handler:async e=>l({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({category_uuids:e[`category-uuids`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Fd,{body:t,account_id:l,skill_id:e[`skill-id`]}));o(r,{successLabel:`Updated`});return}if(e[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let u=h({category_uuids:e[`category-uuids`]}),d=await c(`Updating`,async()=>n.send(Fd,{body:u,account_id:l,skill_id:e[`skill-id`]}));o(d,{successLabel:`Updated`})})},Rd={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(Pd).command(Ld).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zd={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`,body:`json`};function Bd(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
315
315
 
316
- Updates a Custom Skill. Managed Default Skills cannot be updated. Free Threat Signals accounts cannot update Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default Skill ID`,demandOption:!0}).option(`skill-config`,{type:`string`,description:`Optional skill configuration (stored but not currently interpreted).`}).option(`is-active`,{type:`boolean`,description:`Whether the skill is active and eligible for feed assignment.`}).option(`name`,{type:`string`,description:`Custom Skill name (1–100 characters).`}).option(`output-schema`,{type:`string`,description:`JSON Schema serialized as a string (max 4096 characters).`}).option(`prompt`,{type:`string`,description:`AI prompt (1–4000 characters) defining the skill's instructions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Rd={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:Ld,handler:async e=>l({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({config:g(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Id,{body:t,account_id:l,skill_id:e[`skill-id`]}));o(r,{successLabel:`Updated`});return}let u=h({config:g(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`)}),d=await c(`Updating`,async()=>n.send(Id,{body:u,account_id:l,skill_id:e[`skill-id`]}));o(d,{successLabel:`Updated`})})},zd={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(yd).command(Sd).command(Td).command(Od).command(Rd).command(Fd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bd={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(gd).command(Pu).command(Ru).command(ld).command(pd).command(zd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Vd={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(ae).command(be).command(Bt).command(Hn).command(gi).command(Fi).command(Jl).command(Bd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Vd as default};
316
+ Updates a Custom Skill. Managed Default Skills cannot be updated. Free Threat Signals accounts cannot update Custom Skills.`).positional(`skill-id`,{type:`string`,description:`Custom Skill UUID or a Managed Default Skill ID`,demandOption:!0}).option(`skill-config`,{type:`string`,description:`Optional skill configuration (stored but not currently interpreted).`}).option(`is-active`,{type:`boolean`,description:`Whether the skill is active and eligible for feed assignment.`}).option(`name`,{type:`string`,description:`Custom Skill name (1–100 characters).`}).option(`output-schema`,{type:`string`,description:`JSON Schema serialized as a string (max 4096 characters).`}).option(`prompt`,{type:`string`,description:`AI prompt (1–4000 characters) defining the skill's instructions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vd={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:Bd,handler:async e=>l({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({config:g(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(zd,{body:t,account_id:l,skill_id:e[`skill-id`]}));o(r,{successLabel:`Updated`});return}let u=h({config:g(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:g(e.name,`name`,`text`),output_schema:g(e[`output-schema`],`output-schema`,`text`),prompt:g(e.prompt,`prompt`,`text`)}),d=await c(`Updating`,async()=>n.send(zd,{body:u,account_id:l,skill_id:e[`skill-id`]}));o(d,{successLabel:`Updated`})})},Hd={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(Sd).command(Td).command(Od).command(jd).command(Vd).command(Rd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ud={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(yd).command(Lu).command(Vu).command(fd).command(gd).command(Hd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wd={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(ae).command(be).command(Bt).command(Hn).command(gi).command(Fi).command(Zl).command(Ud).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Wd as default};