cf 1.0.0-beta.31 → 1.0.0-beta.32

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 (221) hide show
  1. package/dist/_meta/commands.json +1138 -70
  2. package/dist/_meta/schemas.json +1003 -54
  3. package/dist/{abuse-reports-B8vD22yf.mjs → abuse-reports-DYm1nDLb.mjs} +1 -1
  4. package/dist/{access-BkZlZPER.mjs → access-Be_7nPz4.mjs} +1 -1
  5. package/dist/{accounts-CG6_1Bfa.mjs → accounts-DXULGfnh.mjs} +1 -1
  6. package/dist/{acm-B5VvmBfE.mjs → acm-Btsz5gzV.mjs} +1 -1
  7. package/dist/{addressing-Db9Z1P-r.mjs → addressing-DBQ5dUBd.mjs} +1 -1
  8. package/dist/{agent-memory-nzAUPSmC.mjs → agent-memory-Df0q-68_.mjs} +1 -1
  9. package/dist/{ai-RTQ-iZFq.mjs → ai-CJfI9JI2.mjs} +1 -1
  10. package/dist/{ai-audit-BGipueRC.mjs → ai-audit-Dv37OLES.mjs} +1 -1
  11. package/dist/{ai-gateway-F2pW8d5j.mjs → ai-gateway-BRSUY1QZ.mjs} +5 -5
  12. package/dist/{ai-search-CKM-K1Hm.mjs → ai-search-Bxv4hDG9.mjs} +3 -3
  13. package/dist/{ai-security-CS2VJd4V.mjs → ai-security-ByNRXyJv.mjs} +1 -1
  14. package/dist/{alerting-DNqXDY_7.mjs → alerting-UkiCzqAq.mjs} +2 -4
  15. package/dist/{analytics-DM85HHka.mjs → analytics-B4Wq2vJx.mjs} +1 -1
  16. package/dist/{analytics-engine-CxnuZwEx.mjs → analytics-engine-BbwIXL0f.mjs} +1 -1
  17. package/dist/{api-security-BwLSP_5v.mjs → api-security-B6YETCDG.mjs} +1 -1
  18. package/dist/{argo-DZM2SJFd.mjs → argo-CHSOLyFh.mjs} +1 -1
  19. package/dist/{artifacts-CKbQsn4H.mjs → artifacts-1xMBpJLr.mjs} +1 -1
  20. package/dist/{audit-logs-CG76HATH.mjs → audit-logs-Cz__6-PH.mjs} +1 -1
  21. package/dist/auth-Byb5Y3o4.mjs +2 -0
  22. package/dist/{auth-NIRm11Ab.mjs → auth-CRq9OQKr.mjs} +1 -1
  23. package/dist/{auth-DBM4EcdJ.mjs → auth-CrBQca61.mjs} +1 -1
  24. package/dist/{auth-token-Cp_u44cF.mjs → auth-token-BEkR6ulS.mjs} +1 -1
  25. package/dist/{autoconfig-CQjvJ8Rp.mjs → autoconfig-BDEt9orA.mjs} +1 -1
  26. package/dist/{basin-catalog-BMKr8hFw.mjs → basin-catalog-DRVVY1Ff.mjs} +1 -1
  27. package/dist/{billing-LiyUCn9n.mjs → billing-CInp7pBa.mjs} +1 -1
  28. package/dist/{blocks-DdIA5quB.mjs → blocks-DGXsHh9X.mjs} +1 -1
  29. package/dist/{bot-management-ATqDTT08.mjs → bot-management--NcaqMij.mjs} +1 -1
  30. package/dist/{botnet-feed-Dk3eMSZo.mjs → botnet-feed-DbPZ3Wzl.mjs} +1 -1
  31. package/dist/{brand-protection-B82xx9X5.mjs → brand-protection-B3s-8soV.mjs} +1 -1
  32. package/dist/{browser-run-DEVs2X54.mjs → browser-run-B9hyiK7P.mjs} +1 -1
  33. package/dist/build-Bd56lS7c.mjs +2 -0
  34. package/dist/{build-D18S0p87.mjs → build-I3m3uZn6.mjs} +1 -1
  35. package/dist/{builds-kZaYZiQn.mjs → builds-D0mRyKe3.mjs} +1 -1
  36. package/dist/{cache-BSkT4mhb.mjs → cache-eKHZG4U7.mjs} +1 -1
  37. package/dist/{cf-QIG83e0V.mjs → cf-MAiSK--E.mjs} +1 -1
  38. package/dist/{chunk-DSGVRFIS-CeCM3XGQ.mjs → chunk-DSGVRFIS-L76IWWlr.mjs} +1 -1
  39. package/dist/{chunk-Q5KVZMHK-Bjvrcihk.mjs → chunk-Q5KVZMHK-CYhKv3kZ.mjs} +1 -1
  40. package/dist/{cli-dk6sJFtN.mjs → cli-hFt2ZEED.mjs} +1 -1
  41. package/dist/{client-side-security-90cX3xFX.mjs → client-side-security-BvIdcAtV.mjs} +1 -1
  42. package/dist/{cloud-connector-CtJhvxoD.mjs → cloud-connector-B-04mm0j.mjs} +1 -1
  43. package/dist/{cloudflared-DKh4JK7j.mjs → cloudflared-DynBXmdP.mjs} +1 -1
  44. package/dist/{cloudforce-one-DOf-Y51V.mjs → cloudforce-one-BAGybQNM.mjs} +139 -143
  45. package/dist/{command-DuCT0YaL.mjs → command-5bkZXAlq.mjs} +1 -1
  46. package/dist/{command-BORazCDG.mjs → command-BCECG198.mjs} +1 -1
  47. package/dist/{command-DPo7r1PT.mjs → command-BaFQsuac.mjs} +1 -1
  48. package/dist/{command-C2HYwGn_.mjs → command-BdnTjDyg.mjs} +1 -1
  49. package/dist/{command-BUYlzx4J.mjs → command-BkCc_9UI.mjs} +1 -1
  50. package/dist/{command-B6ustzcW.mjs → command-CQU92hcH.mjs} +1 -1
  51. package/dist/{command-QInwUVT5.mjs → command-CdB1DQZl.mjs} +1 -1
  52. package/dist/{command-MWbvYsQH.mjs → command-CoR-c8lP.mjs} +1 -1
  53. package/dist/{command-B2dfzTXs.mjs → command-D-a4KxcW.mjs} +1 -1
  54. package/dist/{command-aeKPI1bt.mjs → command-D6wod_eb.mjs} +1 -1
  55. package/dist/{command-BAzptjLF.mjs → command-DSPEpZHp.mjs} +1 -1
  56. package/dist/{command-BUbUtS1f.mjs → command-EG23K_k6.mjs} +1 -1
  57. package/dist/{command-V0dODmT-.mjs → command-Ux0DLWdC.mjs} +1 -1
  58. package/dist/{command-CTpn87uz.mjs → command-oko8tT2c.mjs} +1 -1
  59. package/dist/{completions-4aAl8vcF.mjs → completions-CdlqoV7q.mjs} +1 -1
  60. package/dist/{connector-interrupts-qEMhlWeV.mjs → connector-interrupts-D9iiu7ZU.mjs} +1 -1
  61. package/dist/{connector-telemetry-events-CdqnrxRp.mjs → connector-telemetry-events-C8ouyC4A.mjs} +1 -1
  62. package/dist/{connector-telemetry-snapshots-BRvmHAEM.mjs → connector-telemetry-snapshots-Ck9btYy7.mjs} +1 -1
  63. package/dist/{connectors-BqShaonQ.mjs → connectors-kGPYvin5.mjs} +1 -1
  64. package/dist/{containers-BNuGwLRK.mjs → containers-DIf9nmcC.mjs} +2 -2
  65. package/dist/{content-scan-02SOIW_1.mjs → content-scan-Cr0i9wJK.mjs} +1 -1
  66. package/dist/{context-CroqTqbk.mjs → context-DsVjrTbe.mjs} +1 -1
  67. package/dist/{cps-DvEG2eZl.mjs → cps-BHmMKg5Q.mjs} +1 -1
  68. package/dist/{csam-scanner-Bvklah8m.mjs → csam-scanner-DGTOi2EL.mjs} +1 -1
  69. package/dist/{custom-csrs-BVcDWpY-.mjs → custom-csrs-DpLkO9_M.mjs} +1 -1
  70. package/dist/{custom-hostnames-IgjZmeJc.mjs → custom-hostnames-beJnRWcQ.mjs} +1 -1
  71. package/dist/{custom-nameservers-0EYFPBz2.mjs → custom-nameservers-B1WtaEDH.mjs} +1 -1
  72. package/dist/{custom-pages-W2weASNg.mjs → custom-pages-BVXmc-u6.mjs} +1 -1
  73. package/dist/{d1-Df4t1noM.mjs → d1-DYQBKGMz.mjs} +1 -1
  74. package/dist/{delegate-CEaYc4br.mjs → delegate-4bIHEQ8-.mjs} +1 -1
  75. package/dist/delegate.mjs +1 -1
  76. package/dist/{deploy-CGx9aUuj.mjs → deploy-DEq6UKzb.mjs} +1 -1
  77. package/dist/{deploy-context-DzSmuU32.mjs → deploy-context-DJNsb7w-.mjs} +1 -1
  78. package/dist/{deploy-input-DA70GC4o.mjs → deploy-input-Bkll8tDW.mjs} +1 -1
  79. package/dist/{dev-BDls_bK6.mjs → dev-DIguZvJE.mjs} +1 -1
  80. package/dist/{diagnostics-C8V1G64d.mjs → diagnostics-DyCPKwXL.mjs} +1 -1
  81. package/dist/{disk-cache-D6xHBTAA.mjs → disk-cache-BVfJigfC.mjs} +1 -1
  82. package/dist/{dist-DwxlJ9Ms.mjs → dist-BoDdDWjK.mjs} +33 -33
  83. package/dist/{dls-BpU_jtuh.mjs → dls-BXGJug7c.mjs} +1 -1
  84. package/dist/{dns-BlgfnRkG.mjs → dns-Ev7l7p2X.mjs} +1 -1
  85. package/dist/{dns-firewall-DtkcaFQ0.mjs → dns-firewall-CrkTqlYI.mjs} +1 -1
  86. package/dist/{docs-BI2ZoYmm.mjs → docs-Dx9n33S3.mjs} +1 -1
  87. package/dist/{durable-objects-BPTzK6Xh.mjs → durable-objects-ChKP2Y6u.mjs} +1 -1
  88. package/dist/{email-auth-BSoYwLs1.mjs → email-auth-B-n1rKim.mjs} +1 -1
  89. package/dist/{email-routing-3AIhCb7w.mjs → email-routing-Dfs1g7hk.mjs} +1 -1
  90. package/dist/{email-security-INhnV4tT.mjs → email-security-B9wpMLHr.mjs} +1 -1
  91. package/dist/{email-sending-BJ3OLfN3.mjs → email-sending-DUyDi24R.mjs} +3 -3
  92. package/dist/{errors-CBngn9n1.mjs → errors-CUuKkONZ.mjs} +1 -1
  93. package/dist/{field-extractors-lSqk5ySb.mjs → field-extractors-B_R4gU51.mjs} +1 -1
  94. package/dist/{firewall-CdXsS4Cc.mjs → firewall-B5_DMZ5c.mjs} +1 -1
  95. package/dist/{flagship-CtnQ4Emf.mjs → flagship-D_jWMrT9.mjs} +1 -1
  96. package/dist/{fraud-CAZdLc_4.mjs → fraud-BPywqzR5.mjs} +1 -1
  97. package/dist/{google-tag-gateway-CBMNbgeM.mjs → google-tag-gateway-B8SGqWxf.mjs} +1 -1
  98. package/dist/{healthchecks-DdPEo0GC.mjs → healthchecks-C1NL0A-K.mjs} +1 -1
  99. package/dist/{hyperdrive-DxHbVnyO.mjs → hyperdrive-C1C_n591.mjs} +1 -1
  100. package/dist/{iam-CISZzLLr.mjs → iam-BWm6OeLJ.mjs} +1 -1
  101. package/dist/{images-DeMHqQHl.mjs → images-CU9B4ml9.mjs} +1 -1
  102. package/dist/index.mjs +1 -1
  103. package/dist/{init-DKADNnPy.mjs → init-DJGas0DL.mjs} +1 -1
  104. package/dist/{intel-BYvnwlXr.mjs → intel-COtK2F9g.mjs} +1 -1
  105. package/dist/{interactive-DCbIwYxy.mjs → interactive-CQ29h7qo.mjs} +1 -1
  106. package/dist/{ips-CS5SkxUL.mjs → ips-Dv5eyxgM.mjs} +1 -1
  107. package/dist/{k2-isJz0-93.mjs → k2-CdhxgeiI.mjs} +1 -1
  108. package/dist/{kv-Beih-nj_.mjs → kv-gNSTaGhd.mjs} +1 -1
  109. package/dist/{lazy-command-Dfv2jIGz.mjs → lazy-command-CJcN1Ze6.mjs} +1 -1
  110. package/dist/{leaked-credential-checks-CP_8DWAX.mjs → leaked-credential-checks-B222QFHE.mjs} +1 -1
  111. package/dist/{load-balancers-fhAs7LaH.mjs → load-balancers-CM-4BY5q.mjs} +1 -1
  112. package/dist/{login-BdTYP5Xw.mjs → login-Csb8Ld0x.mjs} +1 -1
  113. package/dist/login-bHCEjxRS.mjs +2 -0
  114. package/dist/{logpush-fHQiJ9eI.mjs → logpush-CmothcrK.mjs} +1 -1
  115. package/dist/{logs-Bquc4oxR.mjs → logs-CnKqBsDl.mjs} +1 -1
  116. package/dist/{magic-network-monitoring-DqQUEtPW.mjs → magic-network-monitoring-BEdRTgMa.mjs} +1 -1
  117. package/dist/{magic-transit-py-CXbOl.mjs → magic-transit-CXjc5Yo4.mjs} +1 -1
  118. package/dist/{managed-defense-nFm4rVCR.mjs → managed-defense-BuOxTHAO.mjs} +1 -1
  119. package/dist/{managed-transforms-2k6tV3U-.mjs → managed-transforms-BlqW4xkh.mjs} +1 -1
  120. package/dist/{mcp-BCtJ76cJ.mjs → mcp-ubFVHsP4.mjs} +1 -1
  121. package/dist/{mesh-D2V3ITA7.mjs → mesh-DQS7KfDF.mjs} +1 -1
  122. package/dist/{migrate-CqUzEP9-.mjs → migrate-fY24KHV_.mjs} +1 -1
  123. package/dist/{monetization-CQL4WEtz.mjs → monetization-CagZDoKh.mjs} +1 -1
  124. package/dist/{network-1oR1_5Ak.mjs → network-BB35dF4N.mjs} +1 -1
  125. package/dist/{network-interconnects-BKRa6OaY.mjs → network-interconnects-Dy4m1jMu.mjs} +2 -2
  126. package/dist/{o11y-B2hny1eT.mjs → o11y-Dmll3yib.mjs} +1 -1
  127. package/dist/{oauth-Dp9VNyOf.mjs → oauth-Dv7Wucj6.mjs} +1 -1
  128. package/dist/{oauth-CQiiWvag.mjs → oauth-NljTb7u9.mjs} +1 -1
  129. package/dist/observability-rtMYSCht.mjs +4 -0
  130. package/dist/{ohttp-gateway-B67P-f_M.mjs → ohttp-gateway-BM3nsC92.mjs} +1 -1
  131. package/dist/{organizations-Dk5cbMB5.mjs → organizations-Xus5102w.mjs} +1 -1
  132. package/dist/package-BJWSNfbc.mjs +2 -0
  133. package/dist/{page-rules-hRzoq6WZ.mjs → page-rules-BKoA5eaf.mjs} +1 -1
  134. package/dist/{pages-D_0y5Pbg.mjs → pages-CLhvyehs.mjs} +4 -4
  135. package/dist/{pay-per-crawl-C0ZDkVH8.mjs → pay-per-crawl-BLjKJl62.mjs} +1 -1
  136. package/dist/{pay-per-use-Z_LlZyxh.mjs → pay-per-use-FbddmVNv.mjs} +1 -1
  137. package/dist/{pipelines-B8-zUXTD.mjs → pipelines-BsJkvK-K.mjs} +1 -1
  138. package/dist/{precursor-vlW9-fma.mjs → precursor-oLj-WPJH.mjs} +1 -1
  139. package/dist/{previews-DZX0vwDU.mjs → previews-BRPPf7UU.mjs} +1 -1
  140. package/dist/{progress-DQfZZwit.mjs → progress-DItBn6ZV.mjs} +1 -1
  141. package/dist/{prompt-e6K5lhdE.mjs → prompt-BGz3DNLz.mjs} +1 -1
  142. package/dist/{queues-6WHCb5qi.mjs → queues-DAnbmO-t.mjs} +3 -3
  143. package/dist/{r2-C9xL1Rcg.mjs → r2-DNN91rtN.mjs} +1 -1
  144. package/dist/{radar-DN1PIWRf.mjs → radar-YWsfV39d.mjs} +1 -1
  145. package/dist/{raw-fetch-DXSBORQI.mjs → raw-fetch-CmI3Ol3q.mjs} +1 -1
  146. package/dist/{realtime-CcOSBEFJ.mjs → realtime-CfsgoOsd.mjs} +1 -1
  147. package/dist/{registrar-BjBA2lbF.mjs → registrar-N1c89kFV.mjs} +1 -1
  148. package/dist/{registrar-sandbox-DVeWO8gt.mjs → registrar-sandbox-D5lsoy-x.mjs} +1 -1
  149. package/dist/{reporting-cOY97XSy.mjs → reporting-CI5TLvj4.mjs} +1 -1
  150. package/dist/{request-headers-xtY5gOlq.mjs → request-headers-CUwBDAwI.mjs} +1 -1
  151. package/dist/{request-tracers-bHnQoIpS.mjs → request-tracers-DO63p3ou.mjs} +1 -1
  152. package/dist/{resource-sharing-CQMP1o3F.mjs → resource-sharing-CxdcY5n1.mjs} +1 -1
  153. package/dist/{rules-CrevxzXm.mjs → rules-DuuULmp2.mjs} +1 -1
  154. package/dist/{rulesets-DzGcmiGs.mjs → rulesets-3_8IWMfL.mjs} +1 -1
  155. package/dist/{rum-edoW7i0P.mjs → rum-DkfsMJa7.mjs} +1 -1
  156. package/dist/run-C9SxROBF.mjs +2 -0
  157. package/dist/{run-DhU17ztU.mjs → run-DAK_kbUa.mjs} +1 -1
  158. package/dist/{schema-cache-BFMBra5w.mjs → schema-cache-BcbUfb3D.mjs} +1 -1
  159. package/dist/{scim-BC31cTiV.mjs → scim-DCR6AQp5.mjs} +1 -1
  160. package/dist/{secrets-store-DJlRawQ0.mjs → secrets-store-C3v0_Us9.mjs} +1 -1
  161. package/dist/{security-insights-jHGuq15c.mjs → security-insights-0el4fk-S.mjs} +4 -2
  162. package/dist/security-txt-CcsEaOm5.mjs +8 -0
  163. package/dist/{session-Py5R3Tdx.mjs → session-CgJ6kB79.mjs} +1 -1
  164. package/dist/{shared-C50J5uEm.mjs → shared-DjaJ-SCM.mjs} +1 -1
  165. package/dist/{smart-shield-YI9Y6xhz.mjs → smart-shield-BxTEZqtZ.mjs} +1 -1
  166. package/dist/{snippets-SKlEbP3W.mjs → snippets-CH4PcqCg.mjs} +1 -1
  167. package/dist/{spawn-BXaiweDp.mjs → spawn-B681PPG2.mjs} +2 -2
  168. package/dist/{spectrum-CFl8kTtP.mjs → spectrum-DconVKYG.mjs} +1 -1
  169. package/dist/{speed-DekTJTgw.mjs → speed-Euqtk0Vc.mjs} +1 -1
  170. package/dist/{sql-tkIoPSbE.mjs → sql-UNZoawTj.mjs} +1 -1
  171. package/dist/{src-COKSSJwa.mjs → src-CSSFtpQM.mjs} +5 -5
  172. package/dist/{ssl-DRGNVUlP.mjs → ssl-CGWF2ZSz.mjs} +9 -9
  173. package/dist/startup-profile-ajl_yZx2.mjs +2 -0
  174. package/dist/{startup-profile-CyIelqtC.mjs → startup-profile-ne34QxOx.mjs} +1 -1
  175. package/dist/{state-BI_wSuID.mjs → state-BFClIYM_.mjs} +1 -1
  176. package/dist/state-V1KLVkd6.mjs +2 -0
  177. package/dist/{static-assets-pAj1uSDU.mjs → static-assets-CWo7dxyW.mjs} +164 -164
  178. package/dist/{stream-WHdFw1o1.mjs → stream-B3tkAx82.mjs} +1 -1
  179. package/dist/{tags-CNEWjoac.mjs → tags-CKnt6RT6.mjs} +9 -9
  180. package/dist/telemetry-B3S5OfOn.mjs +2 -0
  181. package/dist/{telemetry-BCQMv5dO.mjs → telemetry-COJrOM3V.mjs} +1 -1
  182. package/dist/{tenant-custom-nameservers-BCJoh-yz.mjs → tenant-custom-nameservers-BdVLeMsA.mjs} +1 -1
  183. package/dist/{tenants-Coo3-wTg.mjs → tenants-C8Emd5Ou.mjs} +1 -1
  184. package/dist/{tunnels-Cy3byznJ.mjs → tunnels-vUfvvRWt.mjs} +15 -13
  185. package/dist/{turnstile-DvkuMuTq.mjs → turnstile-D-6e0ShA.mjs} +1 -1
  186. package/dist/ui-YBIkZLZt.mjs +2 -0
  187. package/dist/{update-check-Buyg_Zyb.mjs → update-check-BW_N6gX4.mjs} +1 -1
  188. package/dist/{update-check-CV30Z3FO.mjs → update-check-CvzNuZHG.mjs} +1 -1
  189. package/dist/update-check-worker.mjs +1 -1
  190. package/dist/{url-normalization-DJzp3oJN.mjs → url-normalization-Bfj-1zgi.mjs} +1 -1
  191. package/dist/{url-scanner-C28ADWWB.mjs → url-scanner-CcZzqvrj.mjs} +1 -1
  192. package/dist/{user-CiFGo-51.mjs → user-CYHyVzic.mjs} +1 -1
  193. package/dist/{vectorize-DZ-VBQjl.mjs → vectorize-69UvmqNI.mjs} +1 -1
  194. package/dist/version-5uL0ecbB.mjs +2 -0
  195. package/dist/{waiting-rooms-mLG31NWt.mjs → waiting-rooms-Dj92gXpa.mjs} +1 -1
  196. package/dist/{web-assets-Caubyaqz.mjs → web-assets-vbQ0MSCd.mjs} +1 -1
  197. package/dist/{web3-Ctcb6rxj.mjs → web3-0Sz4gIto.mjs} +1 -1
  198. package/dist/{whoami-DBZfITBb.mjs → whoami-C4xRnPxf.mjs} +3 -3
  199. package/dist/whoami-wYc70ks4.mjs +2 -0
  200. package/dist/{workers-ClK3WFQg.mjs → workers-BQM8pUYu.mjs} +2 -2
  201. package/dist/{workers-for-platforms-D6fknsnw.mjs → workers-for-platforms-BfXIqCm4.mjs} +1 -1
  202. package/dist/{workers-vpc-B7wRAn-K.mjs → workers-vpc-CR3tfj4I.mjs} +1 -1
  203. package/dist/{workflows-B0UzguVf.mjs → workflows-DpQgBIHz.mjs} +1 -1
  204. package/dist/{wrangler-migration-u2oXOk-L.mjs → wrangler-migration-ChTsuUHx.mjs} +57 -57
  205. package/dist/{zaraz-p9rNptt3.mjs → zaraz-BPOBM0-W.mjs} +1 -1
  206. package/dist/{zero-trust-Dw5CvLQD.mjs → zero-trust-Cridhy7G.mjs} +21 -17
  207. package/dist/{zones-DzPc0thm.mjs → zones-BIKClc2S.mjs} +3 -3
  208. package/package.json +12 -12
  209. package/dist/auth-BBUZyJJx.mjs +0 -2
  210. package/dist/build-CjqOmQjC.mjs +0 -2
  211. package/dist/login-Bux329zM.mjs +0 -2
  212. package/dist/observability-ByzMkD8L.mjs +0 -4
  213. package/dist/package-CcmyQJFT.mjs +0 -2
  214. package/dist/run-B6k0nZU4.mjs +0 -2
  215. package/dist/security-txt-D1vV2ySL.mjs +0 -8
  216. package/dist/startup-profile-Dif7XOsU.mjs +0 -2
  217. package/dist/state-xUh3Z77T.mjs +0 -2
  218. package/dist/telemetry-CruYXv5e.mjs +0 -2
  219. package/dist/ui-CA_2sliN.mjs +0 -2
  220. package/dist/version--BAAeBma.mjs +0 -2
  221. package/dist/whoami-rfo2jx0r.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-NIRm11Ab.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{n as i,t as a}from"./input-validation-D7z60HJH.mjs";import{a as o,t as s}from"./context-CroqTqbk.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./progress-DQfZZwit.mjs";import{t as d}from"./run-DhU17ztU.mjs";import"./telemetry-CruYXv5e.mjs";import"./api-Dnt6lRJG.mjs";import{a as f,c as p,i as m,o as h,r as g,t as _}from"./body-parser-HN91kAf0.mjs";import{a as v,i as y,n as b}from"./prompt-e6K5lhdE.mjs";import{t as x}from"./body-unions-QFGGUlIr.mjs";import{n as S,t as C}from"./raw-fetch-DXSBORQI.mjs";function ee(e){return e.usage(`$0 cloudforce-one binary-storage create
2
+ import{i as e,n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{n as i,t as a}from"./input-validation-D7z60HJH.mjs";import{a as o,t as s}from"./context-DsVjrTbe.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./progress-DItBn6ZV.mjs";import{t as d}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import"./api-Dnt6lRJG.mjs";import{a as f,c as p,i as m,o as h,r as g,t as _}from"./body-parser-HN91kAf0.mjs";import{a as v,i as y,n as b}from"./prompt-BGz3DNLz.mjs";import{t as x}from"./body-unions-QFGGUlIr.mjs";import{n as S,t as C}from"./raw-fetch-CmI3Ol3q.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 n=>d({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:n.body,file:n.file}});return}if(n.body===void 0&&n.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let d=await t(n),f=n.local?c:await s();if(n.accountId=f,n.file!==void 0||n.body!==void 0){let t=new FormData;if(n.file!==void 0){let e=a(n.file);t.append(`file`,new Blob([e]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&t.append(`file`,n.body);let r=await u(`Creating`,async()=>e(d,`POST`,`/accounts/${f}/cloudforce-one/binary`,{body:t}));l(r,{successLabel:`Created`})}else if(n.body!==void 0){let t=i(n.body,`body`,`binary`),r=await u(`Creating`,async()=>e(d,`POST`,`/accounts/${f}/cloudforce-one/binary`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));l(r,{successLabel:`Created`})}})};var ne={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/binary/${e.hash}`,response:!1,errors:{400:`BadRequestError`}};function re(e){return e.usage(`$0 cloudforce-one binary-storage get <hash>
5
5
 
@@ -13,13 +13,11 @@ List all domains registered for credential monitoring.`).option(`page`,{type:`nu
13
13
 
14
14
  Get credential matches for the account's monitored domains.`).option(`domain`,{type:`string`,description:`Filter by domain (exact match)`}).option(`username`,{type:`string`,description:`Filter by username (partial match)`}).option(`page`,{type:`number`,description:`Page number`}).option(`per-page`,{type:`number`,description:`Items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`list`,describe:`List credential matches`,builder:_e,handler:async e=>d({command:`cloudforce-one credential-monitor matches list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={domain:e.domain,username:e.username,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one credential-monitor matches list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/credential-monitor/matches`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ge,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},ye={command:`matches`,describe:`Operations for credential-monitor.matches`,builder:e=>e.command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`credential-monitor`,describe:`Operations for credential-monitor`,builder:e=>e.command(he).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xe={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/constants`,response:!1};function Se(e){return e.usage(`$0 cloudforce-one priority-intelligence constants get
15
15
 
16
- Requirements is the existing free-form PIR method. Interests is the experimental structured-interest method, evaluated independently from requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get`,describe:`Get PIR constants (methods, dimensions, and TLP values)`,builder:Se,handler:async e=>d({command:`cloudforce-one priority-intelligence constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/constants`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(xe,{account_id:i}));l(a,{successLabel:`Loaded`})})},we={command:`constants`,describe:`Operations for priority-intelligence.constants`,builder:e=>e.command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Te={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence`,body:`json`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Ee(e){return e.usage(`$0 cloudforce-one priority-intelligence create
17
-
18
- Creates a new PIR for the account. The cfone.priority_intelligence_requirement_limit entitlement sets how many PIRs can be active; drafts do not count, but the account can hold at most five times that many PIRs in total. An active PIR requires a query.`).option(`dataset-scope-type`,{type:`string`,description:`The dataset_scope.type field`,choices:[`default`,`datasets`]}).coerce(`dataset-scope-type`,e=>i(e,`dataset-scope-type`,`text`)).option(`dataset-scope-dataset-ids`,{type:`string`,array:!0,description:`The dataset_scope.dataset_ids field`}).option(`digest-interval-hours`,{type:`number`,description:"Hours between digests: 6, 12, or 24. Used only when `notification_mode` is `digest`.",default:24}).option(`intent-clauses`,{type:`string`,description:`The intent.clauses field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"actors": [string], "attacker_countries": [string], "categories": [string], "cves": [string], "keywords": [string], ...more}].`}).option(`intent-exclusions-actors`,{type:`string`,array:!0,description:`The intent.exclusions.actors field`}).option(`intent-exclusions-attacker-countries`,{type:`string`,array:!0,description:`The intent.exclusions.attacker_countries field`}).option(`intent-exclusions-categories`,{type:`string`,array:!0,description:`The intent.exclusions.categories field`}).option(`intent-exclusions-cves`,{type:`string`,array:!0,description:`The intent.exclusions.cves field`}).option(`intent-exclusions-keywords`,{type:`string`,array:!0,description:`The intent.exclusions.keywords field`}).option(`intent-exclusions-target-countries`,{type:`string`,array:!0,description:`The intent.exclusions.target_countries field`}).option(`intent-exclusions-target-industries`,{type:`string`,array:!0,description:`The intent.exclusions.target_industries field`}).option(`intent-exclusions-techniques`,{type:`string`,array:!0,description:`The intent.exclusions.techniques field`}).option(`intent-indicators`,{type:`string`,array:!0,description:`The intent.indicators field`}).option(`intent-unsupported-terms`,{type:`string`,array:!0,description:`The intent.unsupported_terms field`}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`model`,{type:`string`,description:`The model field`}).option(`notification-mode`,{type:`string`,description:"`none` or `digest`. Notifications are opt-in. `immediate` is reserved and currently rejected.",choices:[`none`,`immediate`,`digest`],default:`none`}).coerce(`notification-mode`,e=>i(e,`notification-mode`,`text`)).option(`priority`,{type:`number`,description:`The priority field`,default:0}).option(`query-branches`,{type:`string`,description:'Event List `searchBranches`: filters within a branch are ANDed, branches are ORed. Provide as a JSON array of arrays or @path/to/file.json. Shape: [[({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)]].'}).option(`query-version`,{type:`number`,description:`Ignored. Accepted so a PIR read from the API can be sent back unchanged.`}).option(`query-source`,{type:`string`,description:`The query_source field`,choices:[`generated`,`edited`]}).coerce(`query-source`,e=>i(e,`query-source`,`text`)).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`status`,{type:`string`,description:"`draft`: not monitored. `active`: monitored, unless `pause_reason` is set. Setting `active` on a PIR with a `pause_reason` resumes it. Moving a PIR back to `draft` and activating it again starts matching afresh with a 30-day backfill.",choices:[`draft`,`active`],default:`draft`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`tlp`,{type:`string`,description:`The tlp field`,default:`amber`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`dataset-scope-type`,`dataset-scope-dataset-ids`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`dataset-scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --dataset-scope-* flag is set`)}return!0}).check(e=>{let t=[`intent-clauses`,`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`,`intent-indicators`,`intent-unsupported-terms`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-clauses`,`intent-indicators`,`intent-unsupported-terms`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-* flag is set`)}return!0}).check(e=>{let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-exclusions-* flag is set`)}return!0}).check(e=>{let t=[`query-branches`,`query-version`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`query-branches`].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 --query-* flag is set`)}return!0})}const De=[{path:[`dataset_scope`],selector:`type`,variants:[{values:[`default`],schema:{type:`object`,properties:{type:{enum:[`default`]}},required:[`type`],additionalProperties:!1}},{values:[`datasets`],schema:{type:`object`,properties:{dataset_ids:{type:`array`,items:{type:`string`},maxItems:50},type:{enum:[`datasets`]}},required:[`dataset_ids`,`type`],additionalProperties:!1}}]}],Oe={command:`create`,describe:`Create a priority intelligence requirement`,builder:Ee,handler:async e=>d({command:`cloudforce-one priority-intelligence create`,classification:{safeFlags:[`dataset-scope-type`,`notification-mode`,`query-source`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},bodyKind:`json`,body:e.body===void 0?x(_({dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)}),De):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Te,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.requirement===void 0&&(e.requirement=await v(`requirement`,`The requirement field`));let p=_({dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)});x(p,De);let m=await u(`Creating`,async()=>a.send(Te,{body:p,account_id:d}));l(m,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/${e.priority_id}`,response:!1,errors:{404:`NotFoundError`}};function Ae(e){return e.usage(`$0 cloudforce-one priority-intelligence delete <priority-id>
16
+ Requirements is the existing free-form PIR method. Interests is the experimental structured-interest method, evaluated independently from requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get`,describe:`Get PIR constants (methods, dimensions, and TLP values)`,builder:Se,handler:async e=>d({command:`cloudforce-one priority-intelligence constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/constants`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(xe,{account_id:i}));l(a,{successLabel:`Loaded`})})},we={command:`constants`,describe:`Operations for priority-intelligence.constants`,builder:e=>e.command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Te={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence`,body:`json`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Ee(e){return e.usage("$0 cloudforce-one priority-intelligence create\n\nCreates a new PIR for the account. The cfone.priority_intelligence_requirement_limit entitlement sets how many PIRs can be active; drafts do not count, but the account can hold at most five times that many PIRs in total. A free-form PIR has a `requirement`, and an active one requires a query. A structured PIR has a `definition` instead; its requirement and event query are generated, and the response includes them in `resolved`.").option(`based-on-profile-revision`,{type:`number`,description:`The based_on.profile_revision field`}).option(`based-on-topic-fingerprint`,{type:`string`,description:`The based_on.topic_fingerprint field`}).option(`dataset-scope-type`,{type:`string`,description:`The dataset_scope.type field`,choices:[`default`,`datasets`]}).coerce(`dataset-scope-type`,e=>i(e,`dataset-scope-type`,`text`)).option(`dataset-scope-dataset-ids`,{type:`string`,array:!0,description:`The dataset_scope.dataset_ids field`}).option(`definition-additional-criteria`,{type:`string`,description:`The definition.additional_criteria field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"band": "highly" | "somewhat" | "not", "id": string, "text": string}].`}).option(`definition-criterion-selections-add`,{type:`string`,array:!0,description:`The definition.criterion_selections.add field`}).option(`definition-criterion-selections-remove`,{type:`string`,array:!0,description:`The definition.criterion_selections.remove field`}).option(`definition-mode`,{type:`string`,description:`The definition.mode field`,choices:[`managed`,`custom`]}).coerce(`definition-mode`,e=>i(e,`definition-mode`,`text`)).option(`definition-question-mode`,{type:`string`,description:`The definition.question.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-question-mode`,e=>i(e,`definition-question-mode`,`text`)).option(`definition-question-value`,{type:`string`,description:`The definition.question.value field`}).option(`definition-schema-version`,{type:`number`,description:`The definition.schema_version field`}).option(`definition-selections-actor-notes`,{type:`string`,description:`The definition.selections.actor_notes field`}).option(`definition-selections-actor-types-mode`,{type:`string`,description:`The definition.selections.actor_types.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-actor-types-mode`,e=>i(e,`definition-selections-actor-types-mode`,`text`)).option(`definition-selections-actor-types-value`,{type:`string`,array:!0,description:`The definition.selections.actor_types.value field`}).option(`definition-selections-actors-add`,{type:`string`,array:!0,description:`The definition.selections.actors.add field`}).option(`definition-selections-actors-remove`,{type:`string`,array:!0,description:`The definition.selections.actors.remove field`}).option(`definition-selections-attributed-countries`,{type:`string`,array:!0,description:`The definition.selections.attributed_countries field`}).option(`definition-selections-countries-mode`,{type:`string`,description:`The definition.selections.countries.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-countries-mode`,e=>i(e,`definition-selections-countries-mode`,`text`)).option(`definition-selections-countries-value`,{type:`string`,array:!0,description:`The definition.selections.countries.value field`}).option(`definition-selections-cves`,{type:`string`,array:!0,description:`The definition.selections.cves field`}).option(`definition-selections-excluded-actors`,{type:`string`,array:!0,description:`The definition.selections.excluded_actors field`}).option(`definition-selections-key-suppliers-mode`,{type:`string`,description:`The definition.selections.key_suppliers.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-key-suppliers-mode`,e=>i(e,`definition-selections-key-suppliers-mode`,`text`)).option(`definition-selections-key-suppliers-value`,{type:`string`,description:`The definition.selections.key_suppliers.value field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "domains"?: [string]}]. ? marks optional keys.`}).option(`definition-selections-malware-tools`,{type:`string`,array:!0,description:`The definition.selections.malware_tools field`}).option(`definition-selections-motivations-mode`,{type:`string`,description:`The definition.selections.motivations.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-motivations-mode`,e=>i(e,`definition-selections-motivations-mode`,`text`)).option(`definition-selections-motivations-value`,{type:`string`,array:!0,description:`The definition.selections.motivations.value field`}).option(`definition-selections-peers-mode`,{type:`string`,description:`The definition.selections.peers.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-peers-mode`,e=>i(e,`definition-selections-peers-mode`,`text`)).option(`definition-selections-peers-value`,{type:`string`,description:`The definition.selections.peers.value field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "domains"?: [string]}]. ? marks optional keys.`}).option(`definition-selections-sectors-mode`,{type:`string`,description:`The definition.selections.sectors.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-sectors-mode`,e=>i(e,`definition-selections-sectors-mode`,`text`)).option(`definition-selections-sectors-value`,{type:`string`,array:!0,description:`The definition.selections.sectors.value field`}).option(`definition-selections-targets-mode`,{type:`string`,description:`The definition.selections.targets.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-targets-mode`,e=>i(e,`definition-selections-targets-mode`,`text`)).option(`definition-selections-targets-value`,{type:`string`,array:!0,description:`The definition.selections.targets.value field`}).option(`definition-selections-technique-ids`,{type:`string`,array:!0,description:`The definition.selections.technique_ids field`}).option(`definition-selections-technologies-mode`,{type:`string`,description:`The definition.selections.technologies.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-technologies-mode`,e=>i(e,`definition-selections-technologies-mode`,`text`)).option(`definition-selections-technologies-value`,{type:`string`,array:!0,description:`The definition.selections.technologies.value field`}).option(`definition-title-mode`,{type:`string`,description:`The definition.title.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-title-mode`,e=>i(e,`definition-title-mode`,`text`)).option(`definition-title-value`,{type:`string`,description:`The definition.title.value field`}).option(`definition-topic-id`,{type:`string`,description:`The definition.topic_id field`}).option(`definition-relevance-criteria`,{type:`string`,description:`The definition.relevance_criteria field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"band": "highly" | "somewhat" | "not", "id": string, "text": string}].`}).option(`digest-interval-hours`,{type:`number`,description:"Hours between digests: 6, 12, or 24. Used only when `notification_mode` is `digest`.",default:24}).option(`intent-clauses`,{type:`string`,description:`The intent.clauses field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"actors": [string], "attacker_countries": [string], "categories": [string], "cves": [string], "keywords": [string], ...more}].`}).option(`intent-exclusions-actors`,{type:`string`,array:!0,description:`The intent.exclusions.actors field`}).option(`intent-exclusions-attacker-countries`,{type:`string`,array:!0,description:`The intent.exclusions.attacker_countries field`}).option(`intent-exclusions-categories`,{type:`string`,array:!0,description:`The intent.exclusions.categories field`}).option(`intent-exclusions-cves`,{type:`string`,array:!0,description:`The intent.exclusions.cves field`}).option(`intent-exclusions-keywords`,{type:`string`,array:!0,description:`The intent.exclusions.keywords field`}).option(`intent-exclusions-target-countries`,{type:`string`,array:!0,description:`The intent.exclusions.target_countries field`}).option(`intent-exclusions-target-industries`,{type:`string`,array:!0,description:`The intent.exclusions.target_industries field`}).option(`intent-exclusions-techniques`,{type:`string`,array:!0,description:`The intent.exclusions.techniques field`}).option(`intent-indicators`,{type:`string`,array:!0,description:`The intent.indicators field`}).option(`intent-unsupported-terms`,{type:`string`,array:!0,description:`The intent.unsupported_terms field`}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`model`,{type:`string`,description:`The model field`}).option(`notification-mode`,{type:`string`,description:"`none` or `digest`. Notifications are opt-in. `immediate` is reserved and currently rejected.",choices:[`none`,`immediate`,`digest`],default:`none`}).coerce(`notification-mode`,e=>i(e,`notification-mode`,`text`)).option(`priority`,{type:`number`,description:`The priority field`,default:0}).option(`query-branches`,{type:`string`,description:'Event List `searchBranches`: filters within a branch are ANDed, branches are ORed. Provide as a JSON array of arrays or @path/to/file.json. Shape: [[({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)]].'}).option(`query-version`,{type:`number`,description:`Ignored. Accepted so a PIR read from the API can be sent back unchanged.`}).option(`query-source`,{type:`string`,description:`The query_source field`,choices:[`generated`,`edited`]}).coerce(`query-source`,e=>i(e,`query-source`,`text`)).option(`requirement`,{type:`string`,description:"Free-form requirement. Required unless `definition` is sent."}).option(`status`,{type:`string`,description:"`draft`: not monitored. `active`: monitored, unless `pause_reason` is set. Setting `active` on a PIR with a `pause_reason` resumes it. Moving a PIR back to `draft` and activating it again starts matching afresh with a 30-day backfill.",choices:[`draft`,`active`],default:`draft`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`tlp`,{type:`string`,description:`The tlp field`,default:`amber`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`definition-additional-criteria`,[`definition-relevance-criteria`]).implies(`definition-additional-criteria`,[`definition-topic-id`]).conflicts(`definition-criterion-selections-add`,[`definition-relevance-criteria`]).implies(`definition-criterion-selections-add`,[`definition-topic-id`]).conflicts(`definition-criterion-selections-remove`,[`definition-relevance-criteria`]).implies(`definition-criterion-selections-remove`,[`definition-topic-id`]).conflicts(`definition-question-mode`,[`definition-relevance-criteria`]).implies(`definition-question-mode`,[`definition-topic-id`]).conflicts(`definition-question-value`,[`definition-relevance-criteria`]).implies(`definition-question-value`,[`definition-question-mode`,`definition-topic-id`]).implies(`definition-selections-actor-types-value`,[`definition-selections-actor-types-mode`]).implies(`definition-selections-countries-value`,[`definition-selections-countries-mode`]).implies(`definition-selections-key-suppliers-value`,[`definition-selections-key-suppliers-mode`]).implies(`definition-selections-motivations-value`,[`definition-selections-motivations-mode`]).implies(`definition-selections-peers-value`,[`definition-selections-peers-mode`]).implies(`definition-selections-sectors-value`,[`definition-selections-sectors-mode`]).implies(`definition-selections-targets-value`,[`definition-selections-targets-mode`]).implies(`definition-selections-technologies-value`,[`definition-selections-technologies-mode`]).conflicts(`definition-title-mode`,[`definition-relevance-criteria`]).implies(`definition-title-mode`,[`definition-topic-id`]).conflicts(`definition-title-value`,[`definition-relevance-criteria`]).implies(`definition-title-value`,[`definition-title-mode`,`definition-topic-id`]).conflicts(`definition-topic-id`,[`definition-relevance-criteria`]).conflicts(`definition-relevance-criteria`,[`definition-additional-criteria`,`definition-criterion-selections-add`,`definition-criterion-selections-remove`,`definition-question-mode`,`definition-question-value`,`definition-title-mode`,`definition-title-value`,`definition-topic-id`]).check(e=>{let t=[`based-on-profile-revision`,`based-on-topic-fingerprint`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`based-on-profile-revision`,`based-on-topic-fingerprint`].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 --based-on-* flag is set`)}return!0}).check(e=>{let t=[`dataset-scope-type`,`dataset-scope-dataset-ids`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`dataset-scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --dataset-scope-* flag is set`)}return!0}).check(e=>{let t=(/* @__PURE__ */ `definition-additional-criteria.definition-criterion-selections-add.definition-criterion-selections-remove.definition-mode.definition-question-mode.definition-question-value.definition-schema-version.definition-selections-actor-notes.definition-selections-actor-types-mode.definition-selections-actor-types-value.definition-selections-actors-add.definition-selections-actors-remove.definition-selections-attributed-countries.definition-selections-countries-mode.definition-selections-countries-value.definition-selections-cves.definition-selections-excluded-actors.definition-selections-key-suppliers-mode.definition-selections-key-suppliers-value.definition-selections-malware-tools.definition-selections-motivations-mode.definition-selections-motivations-value.definition-selections-peers-mode.definition-selections-peers-value.definition-selections-sectors-mode.definition-selections-sectors-value.definition-selections-targets-mode.definition-selections-targets-value.definition-selections-technique-ids.definition-selections-technologies-mode.definition-selections-technologies-value.definition-title-mode.definition-title-value.definition-topic-id.definition-relevance-criteria`.split(`.`)).some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`definition-mode`,`definition-schema-version`].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 --definition-* flag is set`)}return!0}).check(e=>{let t=[`intent-clauses`,`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`,`intent-indicators`,`intent-unsupported-terms`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-clauses`,`intent-indicators`,`intent-unsupported-terms`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-* flag is set`)}return!0}).check(e=>{let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-exclusions-* flag is set`)}return!0}).check(e=>{let t=[`query-branches`,`query-version`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`query-branches`].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 --query-* flag is set`)}return!0})}const De=[{path:[`dataset_scope`],selector:`type`,variants:[{values:[`default`],schema:{type:`object`,properties:{type:{enum:[`default`]}},required:[`type`],additionalProperties:!1}},{values:[`datasets`],schema:{type:`object`,properties:{dataset_ids:{type:`array`,items:{type:`string`},maxItems:50},type:{enum:[`datasets`]}},required:[`dataset_ids`,`type`],additionalProperties:!1}}]},{path:[`definition`],selector:`mode`,variants:[{values:[`managed`],schema:{type:`object`,properties:{additional_criteria:{type:`array`,items:{type:`object`,properties:{band:{enum:[`highly`,`somewhat`,`not`]},id:{type:`string`},text:{type:`string`}},required:[`band`,`id`,`text`],additionalProperties:!1},maxItems:20},criterion_selections:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},mode:{enum:[`managed`]},question:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`string`}},required:[`mode`,`value`],additionalProperties:!1}]},schema_version:{enum:[1]},selections:{type:`object`,properties:{actor_notes:{type:`string`},actor_types:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`nation-state`,`crime-syndicate`,`criminal`,`activist`,`hacker`,`insider-disgruntled`,`insider-accidental`,`spy`,`terrorist`,`competitor`,`sensationalist`]},maxItems:11}},required:[`mode`,`value`],additionalProperties:!1}]},actors:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},attributed_countries:{type:`array`,items:{type:`string`},maxItems:50},countries:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]},cves:{type:`array`,items:{type:`string`},maxItems:50},excluded_actors:{type:`array`,items:{type:`string`},maxItems:50},key_suppliers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},malware_tools:{type:`array`,items:{type:`string`},maxItems:50},motivations:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`personal-gain`,`organizational-gain`,`ideology`,`dominance`,`notoriety`,`coercion`,`revenge`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},peers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},sectors:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:/* @__PURE__ */ `aerospace.agriculture.automotive.chemical.commercial.communications.construction.defense.education.energy.entertainment.financial-services.government-local.government-national.government-public-services.government-regional.healthcare.hospitality-leisure.infrastructure.insurance.manufacturing.mining.non-profit.pharmaceuticals.professional-services.retail.technology.telecommunications.transportation.utilities`.split(`.`)},maxItems:10}},required:[`mode`,`value`],additionalProperties:!1}]},targets:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`organization`,`customers`,`employees`,`executives`,`partners`,`events`,`products-infrastructure`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},technique_ids:{type:`array`,items:{type:`string`},maxItems:50},technologies:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]}},required:[],additionalProperties:!1},title:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`string`}},required:[`mode`,`value`],additionalProperties:!1}]},topic_id:{type:`string`}},required:[`mode`,`schema_version`,`topic_id`],additionalProperties:!1}},{values:[`custom`],schema:{type:`object`,properties:{mode:{enum:[`custom`]},question:{type:`string`},relevance_criteria:{type:`array`,items:{type:`object`,properties:{band:{enum:[`highly`,`somewhat`,`not`]},id:{type:`string`},text:{type:`string`}},required:[`band`,`id`,`text`],additionalProperties:!1},maxItems:30},schema_version:{enum:[1]},selections:{type:`object`,properties:{actor_notes:{type:`string`},actor_types:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`nation-state`,`crime-syndicate`,`criminal`,`activist`,`hacker`,`insider-disgruntled`,`insider-accidental`,`spy`,`terrorist`,`competitor`,`sensationalist`]},maxItems:11}},required:[`mode`,`value`],additionalProperties:!1}]},actors:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},attributed_countries:{type:`array`,items:{type:`string`},maxItems:50},countries:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]},cves:{type:`array`,items:{type:`string`},maxItems:50},excluded_actors:{type:`array`,items:{type:`string`},maxItems:50},key_suppliers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},malware_tools:{type:`array`,items:{type:`string`},maxItems:50},motivations:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`personal-gain`,`organizational-gain`,`ideology`,`dominance`,`notoriety`,`coercion`,`revenge`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},peers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},sectors:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:/* @__PURE__ */ `aerospace.agriculture.automotive.chemical.commercial.communications.construction.defense.education.energy.entertainment.financial-services.government-local.government-national.government-public-services.government-regional.healthcare.hospitality-leisure.infrastructure.insurance.manufacturing.mining.non-profit.pharmaceuticals.professional-services.retail.technology.telecommunications.transportation.utilities`.split(`.`)},maxItems:10}},required:[`mode`,`value`],additionalProperties:!1}]},targets:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`organization`,`customers`,`employees`,`executives`,`partners`,`events`,`products-infrastructure`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},technique_ids:{type:`array`,items:{type:`string`},maxItems:50},technologies:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]}},required:[],additionalProperties:!1},title:{type:`string`}},required:[`mode`,`question`,`relevance_criteria`,`schema_version`,`title`],additionalProperties:!1}}]}],Oe={command:`create`,describe:`Create a priority intelligence requirement`,builder:Ee,handler:async e=>d({command:`cloudforce-one priority-intelligence create`,classification:{safeFlags:[`dataset-scope-type`,`definition-mode`,`definition-question-mode`,`definition-selections-actor-types-mode`,`definition-selections-countries-mode`,`definition-selections-key-suppliers-mode`,`definition-selections-motivations-mode`,`definition-selections-peers-mode`,`definition-selections-sectors-mode`,`definition-selections-targets-mode`,`definition-selections-technologies-mode`,`definition-title-mode`,`notification-mode`,`query-source`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},bodyKind:`json`,body:e.body===void 0?x(_({based_on:{profile_revision:e[`based-on-profile-revision`],topic_fingerprint:i(e[`based-on-topic-fingerprint`],`based-on-topic-fingerprint`,`text`)},dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},definition:{additional_criteria:h(e[`definition-additional-criteria`],`definition-additional-criteria`),criterion_selections:{add:e[`definition-criterion-selections-add`],remove:e[`definition-criterion-selections-remove`]},mode:e[`definition-mode`],question:{mode:e[`definition-question-mode`],value:i(e[`definition-question-value`],`definition-question-value`,`text`)},schema_version:e[`definition-schema-version`],selections:{actor_notes:i(e[`definition-selections-actor-notes`],`definition-selections-actor-notes`,`text`),actor_types:{mode:e[`definition-selections-actor-types-mode`],value:e[`definition-selections-actor-types-value`]},actors:{add:e[`definition-selections-actors-add`],remove:e[`definition-selections-actors-remove`]},attributed_countries:e[`definition-selections-attributed-countries`],countries:{mode:e[`definition-selections-countries-mode`],value:e[`definition-selections-countries-value`]},cves:e[`definition-selections-cves`],excluded_actors:e[`definition-selections-excluded-actors`],key_suppliers:{mode:e[`definition-selections-key-suppliers-mode`],value:h(e[`definition-selections-key-suppliers-value`],`definition-selections-key-suppliers-value`)},malware_tools:e[`definition-selections-malware-tools`],motivations:{mode:e[`definition-selections-motivations-mode`],value:e[`definition-selections-motivations-value`]},peers:{mode:e[`definition-selections-peers-mode`],value:h(e[`definition-selections-peers-value`],`definition-selections-peers-value`)},sectors:{mode:e[`definition-selections-sectors-mode`],value:e[`definition-selections-sectors-value`]},targets:{mode:e[`definition-selections-targets-mode`],value:e[`definition-selections-targets-value`]},technique_ids:e[`definition-selections-technique-ids`],technologies:{mode:e[`definition-selections-technologies-mode`],value:e[`definition-selections-technologies-value`]}},title:{mode:e[`definition-title-mode`],value:i(e[`definition-title-value`],`definition-title-value`,`text`)},topic_id:i(e[`definition-topic-id`],`definition-topic-id`,`text`),relevance_criteria:h(e[`definition-relevance-criteria`],`definition-relevance-criteria`)},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)}),De):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Te,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}let p=_({based_on:{profile_revision:e[`based-on-profile-revision`],topic_fingerprint:i(e[`based-on-topic-fingerprint`],`based-on-topic-fingerprint`,`text`)},dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},definition:{additional_criteria:h(e[`definition-additional-criteria`],`definition-additional-criteria`),criterion_selections:{add:e[`definition-criterion-selections-add`],remove:e[`definition-criterion-selections-remove`]},mode:e[`definition-mode`],question:{mode:e[`definition-question-mode`],value:i(e[`definition-question-value`],`definition-question-value`,`text`)},schema_version:e[`definition-schema-version`],selections:{actor_notes:i(e[`definition-selections-actor-notes`],`definition-selections-actor-notes`,`text`),actor_types:{mode:e[`definition-selections-actor-types-mode`],value:e[`definition-selections-actor-types-value`]},actors:{add:e[`definition-selections-actors-add`],remove:e[`definition-selections-actors-remove`]},attributed_countries:e[`definition-selections-attributed-countries`],countries:{mode:e[`definition-selections-countries-mode`],value:e[`definition-selections-countries-value`]},cves:e[`definition-selections-cves`],excluded_actors:e[`definition-selections-excluded-actors`],key_suppliers:{mode:e[`definition-selections-key-suppliers-mode`],value:h(e[`definition-selections-key-suppliers-value`],`definition-selections-key-suppliers-value`)},malware_tools:e[`definition-selections-malware-tools`],motivations:{mode:e[`definition-selections-motivations-mode`],value:e[`definition-selections-motivations-value`]},peers:{mode:e[`definition-selections-peers-mode`],value:h(e[`definition-selections-peers-value`],`definition-selections-peers-value`)},sectors:{mode:e[`definition-selections-sectors-mode`],value:e[`definition-selections-sectors-value`]},targets:{mode:e[`definition-selections-targets-mode`],value:e[`definition-selections-targets-value`]},technique_ids:e[`definition-selections-technique-ids`],technologies:{mode:e[`definition-selections-technologies-mode`],value:e[`definition-selections-technologies-value`]}},title:{mode:e[`definition-title-mode`],value:i(e[`definition-title-value`],`definition-title-value`,`text`)},topic_id:i(e[`definition-topic-id`],`definition-topic-id`,`text`),relevance_criteria:h(e[`definition-relevance-criteria`],`definition-relevance-criteria`)},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)});x(p,De);let m=await u(`Creating`,async()=>a.send(Te,{body:p,account_id:d}));l(m,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/${e.priority_id}`,response:!1,errors:{404:`NotFoundError`}};function Ae(e){return e.usage(`$0 cloudforce-one priority-intelligence delete <priority-id>
19
17
 
20
18
  Soft-deletes a PIR. The PIR will no longer count against quota.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const je={command:`delete <priority-id>`,describe:`Delete a priority intelligence requirement`,builder:Ae,handler:async e=>d({command:`cloudforce-one priority-intelligence delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(ke,{account_id:i,priority_id:e[`priority-id`]}));l(a,{successLabel:`Deleted`})})};var w={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/filters/generate`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`,502:`BadGatewayError`,503:`ServiceUnavailableError`}};function Me(e){return e.usage("$0 cloudforce-one priority-intelligence filters generate\n\nTranslates a natural-language Priority Intelligence Requirement into Threat Events `searchBranches` with Workers AI. Terms that cannot be expressed as event filters are returned in `unresolved_terms`. Nothing is stored or executed.").option(`requirement`,{type:`string`,description:`Natural-language Priority Intelligence Requirement.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ne={command:`generate`,describe:`Generate event filters from a PIR`,builder:Me,handler:async e=>d({command:`cloudforce-one priority-intelligence filters generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence filters generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/filters/generate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({requirement:i(e.requirement,`requirement`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(w,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.requirement===void 0&&(e.requirement=await v(`requirement`,`Natural-language Priority Intelligence Requirement.`));let f=_({requirement:i(e.requirement,`requirement`,`text`)}),p=await u(`Creating`,async()=>a.send(w,{body:f,account_id:d}));l(p,{successLabel:`Created`})})},Pe={command:`filters`,describe:`Operations for priority-intelligence.filters`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fe={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/${e.priority_id}`,response:!1,errors:{404:`NotFoundError`}};function Ie(e){return e.usage(`$0 cloudforce-one priority-intelligence get <priority-id>
21
19
 
22
- Returns a single free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:Ie,handler:async e=>d({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Fe,{account_id:i,priority_id:e[`priority-id`]}));l(a,{successLabel:`Loaded`})})};var T={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/interests/backtests`,body:`json`,response:!1,errors:{400:`BadRequestError`}};function Re(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests create
20
+ Returns a single Priority Intelligence Requirement for the authenticated account. For a structured PIR, \`resolved\` has its current generated requirement and event query, which follow later topic and profile changes.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:Ie,handler:async e=>d({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Fe,{account_id:i,priority_id:e[`priority-id`]}));l(a,{successLabel:`Loaded`})})};var T={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/interests/backtests`,body:`json`,response:!1,errors:{400:`BadRequestError`}};function Re(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests create
23
21
 
24
22
  Uses bounded full-span top-N candidates and daily event-date buckets. Results are conservative rather than an exact historical replay.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`backtest-days`,{type:`number`,description:`The backtest_days field`,default:30}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`create`,describe:`Backtest account-interest change detection`,builder:Re,handler:async e=>d({command:`cloudforce-one priority-intelligence interests backtests create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence interests backtests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({as_of:i(e[`as-of`],`as-of`,`text`),backtest_days:e[`backtest-days`],candidate_limit:e[`candidate-limit`],dataset_ids:e[`dataset-ids`],emerging_min_current_count:e[`emerging-min-current-count`],established_min_absolute_delta:e[`established-min-absolute-delta`],established_min_prior_count:e[`established-min-prior-count`],established_min_relative_delta:e[`established-min-relative-delta`],window_days:e[`window-days`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(T,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}let f=_({as_of:i(e[`as-of`],`as-of`,`text`),backtest_days:e[`backtest-days`],candidate_limit:e[`candidate-limit`],dataset_ids:e[`dataset-ids`],emerging_min_current_count:e[`emerging-min-current-count`],established_min_absolute_delta:e[`established-min-absolute-delta`],established_min_prior_count:e[`established-min-prior-count`],established_min_relative_delta:e[`established-min-relative-delta`],window_days:e[`window-days`]}),p=await u(`Creating`,async()=>a.send(T,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Be={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/interests/backtests/${e.backtest_id}`,response:!1,errors:{404:`NotFoundError`}};function Ve(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests get <backtest-id>
25
23
 
@@ -43,276 +41,274 @@ Returns the PIR's matches per UTC day of when each matched event was added to it
43
41
 
44
42
  Deletes the account's organization profile. Succeeds when the account has no profile.`).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 Dt={command:`delete`,describe:`Delete the organization profile`,builder:Et,handler:async e=>d({command:`cloudforce-one priority-intelligence profile delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence profile delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/profile`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Tt,{account_id:i}));l(a,{successLabel:`Deleted`})})};var Ot={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/profile`,response:!1};function kt(e){return e.usage(`$0 cloudforce-one priority-intelligence profile get
45
43
 
46
- Returns the account's organization profile, which all of its Priority Intelligence Requirements share to judge how relevant intelligence is to the organization. \`result\` is null when the account has no profile.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const At={command:`get`,describe:`Get the organization profile`,builder:kt,handler:async e=>d({command:`cloudforce-one priority-intelligence profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/profile`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ot,{account_id:i}));l(a,{successLabel:`Loaded`})})};var A={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/profile`,body:`json`,response:!1,errors:{400:`BadRequestError`}};function jt(e){return e.usage(`$0 cloudforce-one priority-intelligence profile update
47
-
48
- Creates or replaces the account's organization profile: who the organization is, such as its name, brands, domains, sector, regions, key systems and suppliers. All of the account's Priority Intelligence Requirements share it. An account has at most one profile, and it does not count against the PIR quota.`).option(`organization-profile`,{type:`string`,description:`Who the organization is: its name, brands, domains, sector, regions, key systems and suppliers. Shared by all of the account's PIRs to judge how relevant intelligence is to the organization.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mt={command:`update`,describe:`Create or replace the organization profile`,builder:jt,handler:async e=>d({command:`cloudforce-one priority-intelligence profile update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({profile:i(e[`organization-profile`],`organization-profile`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>a.send(A,{body:e,account_id:d}));l(t,{successLabel:`Updated`});return}e[`organization-profile`]===void 0&&(e[`organization-profile`]=await v(`organization-profile`,`Who the organization is: its name, brands, domains, sector, regions, key systems and suppliers. Shared by all of the account's PIRs to judge how relevant intelligence is to the organization.`));let f=_({profile:i(e[`organization-profile`],`organization-profile`,`text`)}),p=await u(`Updating`,async()=>a.send(A,{body:f,account_id:d}));l(p,{successLabel:`Updated`})})},Nt={command:`profile`,describe:`Operations for priority-intelligence.profile`,builder:e=>e.command(Dt).command(At).command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pt={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/quota`,response:!1};function Ft(e){return e.usage("$0 cloudforce-one priority-intelligence quota create\n\nReturns the account's PIR quota. `quota` and `remaining` count active PIRs against the entitlement limit; moving a PIR to draft or deleting it frees its slot. `total_quota` and `total_remaining` count every PIR, drafts included, against five times the limit. Anniversary dates are informational.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const It={command:`create`,describe:`Get PIR quota for an account`,builder:Ft,handler:async e=>d({command:`cloudforce-one priority-intelligence quota create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence quota create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/quota`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Pt,{account_id:i}));l(a,{successLabel:`Created`})})},Lt={command:`quota`,describe:`Operations for priority-intelligence.quota`,builder:e=>e.command(It).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/${e.priority_id}`,body:`json`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`}};function Rt(e){return e.usage(`$0 cloudforce-one priority-intelligence update <priority-id>
44
+ Returns the account's organization profile, which all of its Priority Intelligence Requirements share to judge how relevant intelligence is to the organization. \`result\` is null when the account has no profile.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const At={command:`get`,describe:`Get the organization profile`,builder:kt,handler:async e=>d({command:`cloudforce-one priority-intelligence profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/profile`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ot,{account_id:i}));l(a,{successLabel:`Loaded`})})};var jt={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/profile`,body:`json`,response:!1,errors:{400:`BadRequestError`,409:`ConflictError`}};function Mt(e){return e.usage("$0 cloudforce-one priority-intelligence profile update\n\nCreates or replaces the account's organization profile: who the organization is, such as its name, brands, domains, sector, regions, key systems and suppliers. All of the account's Priority Intelligence Requirements share it. An account has at most one profile, and it does not count against the PIR quota. Send structured `organization` facts, which structured PIRs inherit and from which the profile text is generated, or free `profile` text. `revision` must match the stored profile's, or 0 when there is none; it is required with `organization`. Free `profile` text cannot replace structured facts; delete the profile first to switch back.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Nt={command:`update`,describe:`Create or replace the organization profile`,builder:Mt,handler:async n=>d({command:`cloudforce-one priority-intelligence profile update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/profile`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:g(n.body)});return}let i=n.body===void 0?void 0:g(n.body),a=await t(n),d=n.local?c:await s();if(n.accountId=d,n.body!==void 0){let e=i,t=await u(`Updating`,async()=>a.send(jt,{body:e,account_id:d}));l(t,{successLabel:`Updated`});return}let f=await u(`Updating`,async()=>e(a,`PUT`,`/accounts/${d}/cloudforce-one/v2/priority-intelligence/profile`));l(f,{successLabel:`Updated`})})},Pt={command:`profile`,describe:`Operations for priority-intelligence.profile`,builder:e=>e.command(Dt).command(At).command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ft={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/quota`,response:!1};function It(e){return e.usage("$0 cloudforce-one priority-intelligence quota create\n\nReturns the account's PIR quota. `quota` and `remaining` count active PIRs against the entitlement limit; moving a PIR to draft or deleting it frees its slot. `total_quota` and `total_remaining` count every PIR, drafts included, against five times the limit. Anniversary dates are informational.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lt={command:`create`,describe:`Get PIR quota for an account`,builder:It,handler:async e=>d({command:`cloudforce-one priority-intelligence quota create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence quota create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/quota`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Ft,{account_id:i}));l(a,{successLabel:`Created`})})},Rt={command:`quota`,describe:`Operations for priority-intelligence.quota`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/resolve`,body:`json`,response:!1,errors:{400:`BadRequestError`}};function zt(e){return e.usage("$0 cloudforce-one priority-intelligence resolve\n\nReturns the requirement and event query that saving `definition` would generate, using the account's current organization profile and topic. `resolved.issues` lists problems that would block saving, and `resolved.notices` inputs that would be ignored. Search events with `resolved.event_plan.branches`: a beta value for running searches, not a stable contract, which changes whenever a topic's event rules change. Show `resolved.event_plan.rules[].explanation` to explain matches. Send `resolved.based_on` with the save so it fails with 409 if the profile or topic changes in between. Nothing is saved, and no model is called.").option(`definition-additional-criteria`,{type:`string`,description:`The definition.additional_criteria field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"band": "highly" | "somewhat" | "not", "id": string, "text": string}].`}).option(`definition-criterion-selections-add`,{type:`string`,array:!0,description:`The definition.criterion_selections.add field`}).option(`definition-criterion-selections-remove`,{type:`string`,array:!0,description:`The definition.criterion_selections.remove field`}).option(`definition-mode`,{type:`string`,description:`The definition.mode field`,choices:[`managed`,`custom`]}).coerce(`definition-mode`,e=>i(e,`definition-mode`,`text`)).option(`definition-question-mode`,{type:`string`,description:`The definition.question.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-question-mode`,e=>i(e,`definition-question-mode`,`text`)).option(`definition-question-value`,{type:`string`,description:`The definition.question.value field`}).option(`definition-schema-version`,{type:`number`,description:`The definition.schema_version field`}).option(`definition-selections-actor-notes`,{type:`string`,description:`The definition.selections.actor_notes field`}).option(`definition-selections-actor-types-mode`,{type:`string`,description:`The definition.selections.actor_types.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-actor-types-mode`,e=>i(e,`definition-selections-actor-types-mode`,`text`)).option(`definition-selections-actor-types-value`,{type:`string`,array:!0,description:`The definition.selections.actor_types.value field`}).option(`definition-selections-actors-add`,{type:`string`,array:!0,description:`The definition.selections.actors.add field`}).option(`definition-selections-actors-remove`,{type:`string`,array:!0,description:`The definition.selections.actors.remove field`}).option(`definition-selections-attributed-countries`,{type:`string`,array:!0,description:`The definition.selections.attributed_countries field`}).option(`definition-selections-countries-mode`,{type:`string`,description:`The definition.selections.countries.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-countries-mode`,e=>i(e,`definition-selections-countries-mode`,`text`)).option(`definition-selections-countries-value`,{type:`string`,array:!0,description:`The definition.selections.countries.value field`}).option(`definition-selections-cves`,{type:`string`,array:!0,description:`The definition.selections.cves field`}).option(`definition-selections-excluded-actors`,{type:`string`,array:!0,description:`The definition.selections.excluded_actors field`}).option(`definition-selections-key-suppliers-mode`,{type:`string`,description:`The definition.selections.key_suppliers.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-key-suppliers-mode`,e=>i(e,`definition-selections-key-suppliers-mode`,`text`)).option(`definition-selections-key-suppliers-value`,{type:`string`,description:`The definition.selections.key_suppliers.value field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "domains"?: [string]}]. ? marks optional keys.`}).option(`definition-selections-malware-tools`,{type:`string`,array:!0,description:`The definition.selections.malware_tools field`}).option(`definition-selections-motivations-mode`,{type:`string`,description:`The definition.selections.motivations.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-motivations-mode`,e=>i(e,`definition-selections-motivations-mode`,`text`)).option(`definition-selections-motivations-value`,{type:`string`,array:!0,description:`The definition.selections.motivations.value field`}).option(`definition-selections-peers-mode`,{type:`string`,description:`The definition.selections.peers.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-peers-mode`,e=>i(e,`definition-selections-peers-mode`,`text`)).option(`definition-selections-peers-value`,{type:`string`,description:`The definition.selections.peers.value field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "domains"?: [string]}]. ? marks optional keys.`}).option(`definition-selections-sectors-mode`,{type:`string`,description:`The definition.selections.sectors.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-sectors-mode`,e=>i(e,`definition-selections-sectors-mode`,`text`)).option(`definition-selections-sectors-value`,{type:`string`,array:!0,description:`The definition.selections.sectors.value field`}).option(`definition-selections-targets-mode`,{type:`string`,description:`The definition.selections.targets.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-targets-mode`,e=>i(e,`definition-selections-targets-mode`,`text`)).option(`definition-selections-targets-value`,{type:`string`,array:!0,description:`The definition.selections.targets.value field`}).option(`definition-selections-technique-ids`,{type:`string`,array:!0,description:`The definition.selections.technique_ids field`}).option(`definition-selections-technologies-mode`,{type:`string`,description:`The definition.selections.technologies.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-technologies-mode`,e=>i(e,`definition-selections-technologies-mode`,`text`)).option(`definition-selections-technologies-value`,{type:`string`,array:!0,description:`The definition.selections.technologies.value field`}).option(`definition-title-mode`,{type:`string`,description:`The definition.title.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-title-mode`,e=>i(e,`definition-title-mode`,`text`)).option(`definition-title-value`,{type:`string`,description:`The definition.title.value field`}).option(`definition-topic-id`,{type:`string`,description:`The definition.topic_id field`}).option(`definition-relevance-criteria`,{type:`string`,description:`The definition.relevance_criteria field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"band": "highly" | "somewhat" | "not", "id": string, "text": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`definition-additional-criteria`,[`definition-relevance-criteria`]).implies(`definition-additional-criteria`,[`definition-topic-id`]).conflicts(`definition-criterion-selections-add`,[`definition-relevance-criteria`]).implies(`definition-criterion-selections-add`,[`definition-topic-id`]).conflicts(`definition-criterion-selections-remove`,[`definition-relevance-criteria`]).implies(`definition-criterion-selections-remove`,[`definition-topic-id`]).conflicts(`definition-question-mode`,[`definition-relevance-criteria`]).implies(`definition-question-mode`,[`definition-topic-id`]).conflicts(`definition-question-value`,[`definition-relevance-criteria`]).implies(`definition-question-value`,[`definition-question-mode`,`definition-topic-id`]).implies(`definition-selections-actor-types-value`,[`definition-selections-actor-types-mode`]).implies(`definition-selections-countries-value`,[`definition-selections-countries-mode`]).implies(`definition-selections-key-suppliers-value`,[`definition-selections-key-suppliers-mode`]).implies(`definition-selections-motivations-value`,[`definition-selections-motivations-mode`]).implies(`definition-selections-peers-value`,[`definition-selections-peers-mode`]).implies(`definition-selections-sectors-value`,[`definition-selections-sectors-mode`]).implies(`definition-selections-targets-value`,[`definition-selections-targets-mode`]).implies(`definition-selections-technologies-value`,[`definition-selections-technologies-mode`]).conflicts(`definition-title-mode`,[`definition-relevance-criteria`]).implies(`definition-title-mode`,[`definition-topic-id`]).conflicts(`definition-title-value`,[`definition-relevance-criteria`]).implies(`definition-title-value`,[`definition-title-mode`,`definition-topic-id`]).conflicts(`definition-topic-id`,[`definition-relevance-criteria`]).conflicts(`definition-relevance-criteria`,[`definition-additional-criteria`,`definition-criterion-selections-add`,`definition-criterion-selections-remove`,`definition-question-mode`,`definition-question-value`,`definition-title-mode`,`definition-title-value`,`definition-topic-id`])}const j=[{path:[`definition`],selector:`mode`,variants:[{values:[`managed`],schema:{type:`object`,properties:{additional_criteria:{type:`array`,items:{type:`object`,properties:{band:{enum:[`highly`,`somewhat`,`not`]},id:{type:`string`},text:{type:`string`}},required:[`band`,`id`,`text`],additionalProperties:!1},maxItems:20},criterion_selections:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},mode:{enum:[`managed`]},question:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`string`}},required:[`mode`,`value`],additionalProperties:!1}]},schema_version:{enum:[1]},selections:{type:`object`,properties:{actor_notes:{type:`string`},actor_types:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`nation-state`,`crime-syndicate`,`criminal`,`activist`,`hacker`,`insider-disgruntled`,`insider-accidental`,`spy`,`terrorist`,`competitor`,`sensationalist`]},maxItems:11}},required:[`mode`,`value`],additionalProperties:!1}]},actors:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},attributed_countries:{type:`array`,items:{type:`string`},maxItems:50},countries:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]},cves:{type:`array`,items:{type:`string`},maxItems:50},excluded_actors:{type:`array`,items:{type:`string`},maxItems:50},key_suppliers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},malware_tools:{type:`array`,items:{type:`string`},maxItems:50},motivations:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`personal-gain`,`organizational-gain`,`ideology`,`dominance`,`notoriety`,`coercion`,`revenge`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},peers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},sectors:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:/* @__PURE__ */ `aerospace.agriculture.automotive.chemical.commercial.communications.construction.defense.education.energy.entertainment.financial-services.government-local.government-national.government-public-services.government-regional.healthcare.hospitality-leisure.infrastructure.insurance.manufacturing.mining.non-profit.pharmaceuticals.professional-services.retail.technology.telecommunications.transportation.utilities`.split(`.`)},maxItems:10}},required:[`mode`,`value`],additionalProperties:!1}]},targets:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`organization`,`customers`,`employees`,`executives`,`partners`,`events`,`products-infrastructure`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},technique_ids:{type:`array`,items:{type:`string`},maxItems:50},technologies:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]}},required:[],additionalProperties:!1},title:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`string`}},required:[`mode`,`value`],additionalProperties:!1}]},topic_id:{type:`string`}},required:[`mode`,`schema_version`,`topic_id`],additionalProperties:!1}},{values:[`custom`],schema:{type:`object`,properties:{mode:{enum:[`custom`]},question:{type:`string`},relevance_criteria:{type:`array`,items:{type:`object`,properties:{band:{enum:[`highly`,`somewhat`,`not`]},id:{type:`string`},text:{type:`string`}},required:[`band`,`id`,`text`],additionalProperties:!1},maxItems:30},schema_version:{enum:[1]},selections:{type:`object`,properties:{actor_notes:{type:`string`},actor_types:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`nation-state`,`crime-syndicate`,`criminal`,`activist`,`hacker`,`insider-disgruntled`,`insider-accidental`,`spy`,`terrorist`,`competitor`,`sensationalist`]},maxItems:11}},required:[`mode`,`value`],additionalProperties:!1}]},actors:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},attributed_countries:{type:`array`,items:{type:`string`},maxItems:50},countries:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]},cves:{type:`array`,items:{type:`string`},maxItems:50},excluded_actors:{type:`array`,items:{type:`string`},maxItems:50},key_suppliers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},malware_tools:{type:`array`,items:{type:`string`},maxItems:50},motivations:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`personal-gain`,`organizational-gain`,`ideology`,`dominance`,`notoriety`,`coercion`,`revenge`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},peers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},sectors:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:/* @__PURE__ */ `aerospace.agriculture.automotive.chemical.commercial.communications.construction.defense.education.energy.entertainment.financial-services.government-local.government-national.government-public-services.government-regional.healthcare.hospitality-leisure.infrastructure.insurance.manufacturing.mining.non-profit.pharmaceuticals.professional-services.retail.technology.telecommunications.transportation.utilities`.split(`.`)},maxItems:10}},required:[`mode`,`value`],additionalProperties:!1}]},targets:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`organization`,`customers`,`employees`,`executives`,`partners`,`events`,`products-infrastructure`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},technique_ids:{type:`array`,items:{type:`string`},maxItems:50},technologies:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]}},required:[],additionalProperties:!1},title:{type:`string`}},required:[`mode`,`question`,`relevance_criteria`,`schema_version`,`title`],additionalProperties:!1}}]}],Bt={command:`resolve`,describe:`Resolve structured PIR answers without saving`,builder:zt,handler:async e=>d({command:`cloudforce-one priority-intelligence resolve`,classification:{safeFlags:[`definition-mode`,`definition-question-mode`,`definition-selections-actor-types-mode`,`definition-selections-countries-mode`,`definition-selections-key-suppliers-mode`,`definition-selections-motivations-mode`,`definition-selections-peers-mode`,`definition-selections-sectors-mode`,`definition-selections-targets-mode`,`definition-selections-technologies-mode`,`definition-title-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence resolve`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/resolve`,pathParams:{},bodyKind:`json`,body:e.body===void 0?x(_({definition:{additional_criteria:h(e[`definition-additional-criteria`],`definition-additional-criteria`),criterion_selections:{add:e[`definition-criterion-selections-add`],remove:e[`definition-criterion-selections-remove`]},mode:e[`definition-mode`],question:{mode:e[`definition-question-mode`],value:i(e[`definition-question-value`],`definition-question-value`,`text`)},schema_version:e[`definition-schema-version`],selections:{actor_notes:i(e[`definition-selections-actor-notes`],`definition-selections-actor-notes`,`text`),actor_types:{mode:e[`definition-selections-actor-types-mode`],value:e[`definition-selections-actor-types-value`]},actors:{add:e[`definition-selections-actors-add`],remove:e[`definition-selections-actors-remove`]},attributed_countries:e[`definition-selections-attributed-countries`],countries:{mode:e[`definition-selections-countries-mode`],value:e[`definition-selections-countries-value`]},cves:e[`definition-selections-cves`],excluded_actors:e[`definition-selections-excluded-actors`],key_suppliers:{mode:e[`definition-selections-key-suppliers-mode`],value:h(e[`definition-selections-key-suppliers-value`],`definition-selections-key-suppliers-value`)},malware_tools:e[`definition-selections-malware-tools`],motivations:{mode:e[`definition-selections-motivations-mode`],value:e[`definition-selections-motivations-value`]},peers:{mode:e[`definition-selections-peers-mode`],value:h(e[`definition-selections-peers-value`],`definition-selections-peers-value`)},sectors:{mode:e[`definition-selections-sectors-mode`],value:e[`definition-selections-sectors-value`]},targets:{mode:e[`definition-selections-targets-mode`],value:e[`definition-selections-targets-value`]},technique_ids:e[`definition-selections-technique-ids`],technologies:{mode:e[`definition-selections-technologies-mode`],value:e[`definition-selections-technologies-value`]}},title:{mode:e[`definition-title-mode`],value:i(e[`definition-title-value`],`definition-title-value`,`text`)},topic_id:i(e[`definition-topic-id`],`definition-topic-id`,`text`),relevance_criteria:h(e[`definition-relevance-criteria`],`definition-relevance-criteria`)}}),j):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(A,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`definition-mode`]===void 0&&(e[`definition-mode`]=await y(`definition-mode`,`The definition.mode field`,[`managed`,`custom`])),e[`definition-schema-version`]===void 0)throw Error(`--definition-schema-version is required (or pass --body with this field set).`);let f=_({definition:{additional_criteria:h(e[`definition-additional-criteria`],`definition-additional-criteria`),criterion_selections:{add:e[`definition-criterion-selections-add`],remove:e[`definition-criterion-selections-remove`]},mode:e[`definition-mode`],question:{mode:e[`definition-question-mode`],value:i(e[`definition-question-value`],`definition-question-value`,`text`)},schema_version:e[`definition-schema-version`],selections:{actor_notes:i(e[`definition-selections-actor-notes`],`definition-selections-actor-notes`,`text`),actor_types:{mode:e[`definition-selections-actor-types-mode`],value:e[`definition-selections-actor-types-value`]},actors:{add:e[`definition-selections-actors-add`],remove:e[`definition-selections-actors-remove`]},attributed_countries:e[`definition-selections-attributed-countries`],countries:{mode:e[`definition-selections-countries-mode`],value:e[`definition-selections-countries-value`]},cves:e[`definition-selections-cves`],excluded_actors:e[`definition-selections-excluded-actors`],key_suppliers:{mode:e[`definition-selections-key-suppliers-mode`],value:h(e[`definition-selections-key-suppliers-value`],`definition-selections-key-suppliers-value`)},malware_tools:e[`definition-selections-malware-tools`],motivations:{mode:e[`definition-selections-motivations-mode`],value:e[`definition-selections-motivations-value`]},peers:{mode:e[`definition-selections-peers-mode`],value:h(e[`definition-selections-peers-value`],`definition-selections-peers-value`)},sectors:{mode:e[`definition-selections-sectors-mode`],value:e[`definition-selections-sectors-value`]},targets:{mode:e[`definition-selections-targets-mode`],value:e[`definition-selections-targets-value`]},technique_ids:e[`definition-selections-technique-ids`],technologies:{mode:e[`definition-selections-technologies-mode`],value:e[`definition-selections-technologies-value`]}},title:{mode:e[`definition-title-mode`],value:i(e[`definition-title-value`],`definition-title-value`,`text`)},topic_id:i(e[`definition-topic-id`],`definition-topic-id`,`text`),relevance_criteria:h(e[`definition-relevance-criteria`],`definition-relevance-criteria`)}});x(f,j);let p=await u(`Creating`,async()=>a.send(A,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Vt={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/topics`};function Ht(e){return e.usage(`$0 cloudforce-one priority-intelligence topics list
49
45
 
50
- Updates a Priority Intelligence Requirement for the authenticated account. Changing the query increments its version; editing the requirement without saving a query marks the query stale. Activating a draft needs a free slot in the active PIR quota; setting \`active\` on a PIR the matcher paused resumes it without one.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`confirm-query`,{type:`boolean`,description:"Write-only. `true` confirms the query still fits the requirement, clearing `query_stale` without changing the query or its version. Requires a query."}).option(`dataset-scope-type`,{type:`string`,description:`The dataset_scope.type field`,choices:[`default`,`datasets`]}).coerce(`dataset-scope-type`,e=>i(e,`dataset-scope-type`,`text`)).option(`dataset-scope-dataset-ids`,{type:`string`,array:!0,description:`The dataset_scope.dataset_ids field`}).option(`digest-interval-hours`,{type:`number`,description:"Hours between digests: 6, 12, or 24. Used only when `notification_mode` is `digest`."}).option(`intent-clauses`,{type:`string`,description:`The intent.clauses field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"actors": [string], "attacker_countries": [string], "categories": [string], "cves": [string], "keywords": [string], ...more}].`}).option(`intent-exclusions-actors`,{type:`string`,array:!0,description:`The intent.exclusions.actors field`}).option(`intent-exclusions-attacker-countries`,{type:`string`,array:!0,description:`The intent.exclusions.attacker_countries field`}).option(`intent-exclusions-categories`,{type:`string`,array:!0,description:`The intent.exclusions.categories field`}).option(`intent-exclusions-cves`,{type:`string`,array:!0,description:`The intent.exclusions.cves field`}).option(`intent-exclusions-keywords`,{type:`string`,array:!0,description:`The intent.exclusions.keywords field`}).option(`intent-exclusions-target-countries`,{type:`string`,array:!0,description:`The intent.exclusions.target_countries field`}).option(`intent-exclusions-target-industries`,{type:`string`,array:!0,description:`The intent.exclusions.target_industries field`}).option(`intent-exclusions-techniques`,{type:`string`,array:!0,description:`The intent.exclusions.techniques field`}).option(`intent-indicators`,{type:`string`,array:!0,description:`The intent.indicators field`}).option(`intent-unsupported-terms`,{type:`string`,array:!0,description:`The intent.unsupported_terms field`}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`model`,{type:`string`,description:`The model field`}).option(`notification-mode`,{type:`string`,description:"`none` or `digest`. Notifications are opt-in. `immediate` is reserved and currently rejected.",choices:[`none`,`immediate`,`digest`]}).coerce(`notification-mode`,e=>i(e,`notification-mode`,`text`)).option(`priority`,{type:`number`,description:`The priority field`}).option(`query-branches`,{type:`string`,description:'Event List `searchBranches`: filters within a branch are ANDed, branches are ORed. Provide as a JSON array of arrays or @path/to/file.json. Shape: [[({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)]].'}).option(`query-version`,{type:`number`,description:`Ignored. Accepted so a PIR read from the API can be sent back unchanged.`}).option(`query-source`,{type:`string`,description:`The query_source field`,choices:[`generated`,`edited`]}).coerce(`query-source`,e=>i(e,`query-source`,`text`)).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`status`,{type:`string`,description:"`draft`: not monitored. `active`: monitored, unless `pause_reason` is set. Setting `active` on a PIR with a `pause_reason` resumes it. Moving a PIR back to `draft` and activating it again starts matching afresh with a 30-day backfill.",choices:[`draft`,`active`]}).coerce(`status`,e=>i(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`dataset-scope-type`,`dataset-scope-dataset-ids`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`dataset-scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --dataset-scope-* flag is set`)}return!0}).check(e=>{let t=[`intent-clauses`,`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`,`intent-indicators`,`intent-unsupported-terms`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-clauses`,`intent-indicators`,`intent-unsupported-terms`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-* flag is set`)}return!0}).check(e=>{let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-exclusions-* flag is set`)}return!0}).check(e=>{let t=[`query-branches`,`query-version`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`query-branches`].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 --query-* flag is set`)}return!0})}const M=[{path:[`dataset_scope`],selector:`type`,variants:[{values:[`default`],schema:{type:`object`,properties:{type:{enum:[`default`]}},required:[`type`],additionalProperties:!1}},{values:[`datasets`],schema:{type:`object`,properties:{dataset_ids:{type:`array`,items:{type:`string`},maxItems:50},type:{enum:[`datasets`]}},required:[`dataset_ids`,`type`],additionalProperties:!1}}]}],zt={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:Rt,handler:async e=>d({command:`cloudforce-one priority-intelligence update`,classification:{safeFlags:[`confirm-query`,`dataset-scope-type`,`notification-mode`,`query-source`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`json`,body:e.body===void 0?x(_({confirm_query:e[`confirm-query`],dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)}),M):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(j,{body:t,account_id:d,priority_id:e[`priority-id`]}));l(r,{successLabel:`Updated`});return}let p=_({confirm_query:e[`confirm-query`],dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)});x(p,M);let m=await u(`Updating`,async()=>a.send(j,{body:p,account_id:d,priority_id:e[`priority-id`]}));l(m,{successLabel:`Updated`})})},Bt={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(Oe).command(je).command(Le).command(lt).command(zt).command(we).command(Pe).command(ot).command(wt).command(Nt).command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Vt(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
46
+ Returns the managed topics a structured PIR can follow, with their default question, relevance criteria, suggested actors and event rules. Suggested actors the account cannot see are left out. Topics change centrally; PIRs follow a topic's defaults wherever the customer has not changed them. Also returns \`organization_types\` for the organization profile form.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ut={command:`list`,describe:`List managed PIR topics`,builder:Ht,handler:async e=>d({command:`cloudforce-one priority-intelligence topics list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one priority-intelligence topics list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/topics`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Vt,{account_id:i}));l(a,{successLabel:`Loaded`})})},Wt={command:`topics`,describe:`Operations for priority-intelligence.topics`,builder:e=>e.command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/priority-intelligence/${e.priority_id}`,body:`json`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`}};function Gt(e){return e.usage("$0 cloudforce-one priority-intelligence update <priority-id>\n\nUpdates a Priority Intelligence Requirement for the authenticated account. Changing the query increments its version; editing the requirement without saving a query marks the query stale. Activating a draft needs a free slot in the active PIR quota; setting `active` on a PIR the matcher paused resumes it without one. Updates to a structured PIR must send its `revision` and change its answers through `definition`; its requirement, title and query are generated.").positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`based-on-profile-revision`,{type:`number`,description:`The based_on.profile_revision field`}).option(`based-on-topic-fingerprint`,{type:`string`,description:`The based_on.topic_fingerprint field`}).option(`confirm-query`,{type:`boolean`,description:"Write-only. `true` confirms the query still fits the requirement, clearing `query_stale` without changing the query or its version. Requires a query."}).option(`dataset-scope-type`,{type:`string`,description:`The dataset_scope.type field`,choices:[`default`,`datasets`]}).coerce(`dataset-scope-type`,e=>i(e,`dataset-scope-type`,`text`)).option(`dataset-scope-dataset-ids`,{type:`string`,array:!0,description:`The dataset_scope.dataset_ids field`}).option(`definition-additional-criteria`,{type:`string`,description:`The definition.additional_criteria field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"band": "highly" | "somewhat" | "not", "id": string, "text": string}].`}).option(`definition-criterion-selections-add`,{type:`string`,array:!0,description:`The definition.criterion_selections.add field`}).option(`definition-criterion-selections-remove`,{type:`string`,array:!0,description:`The definition.criterion_selections.remove field`}).option(`definition-mode`,{type:`string`,description:`The definition.mode field`,choices:[`managed`,`custom`]}).coerce(`definition-mode`,e=>i(e,`definition-mode`,`text`)).option(`definition-question-mode`,{type:`string`,description:`The definition.question.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-question-mode`,e=>i(e,`definition-question-mode`,`text`)).option(`definition-question-value`,{type:`string`,description:`The definition.question.value field`}).option(`definition-schema-version`,{type:`number`,description:`The definition.schema_version field`}).option(`definition-selections-actor-notes`,{type:`string`,description:`The definition.selections.actor_notes field`}).option(`definition-selections-actor-types-mode`,{type:`string`,description:`The definition.selections.actor_types.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-actor-types-mode`,e=>i(e,`definition-selections-actor-types-mode`,`text`)).option(`definition-selections-actor-types-value`,{type:`string`,array:!0,description:`The definition.selections.actor_types.value field`}).option(`definition-selections-actors-add`,{type:`string`,array:!0,description:`The definition.selections.actors.add field`}).option(`definition-selections-actors-remove`,{type:`string`,array:!0,description:`The definition.selections.actors.remove field`}).option(`definition-selections-attributed-countries`,{type:`string`,array:!0,description:`The definition.selections.attributed_countries field`}).option(`definition-selections-countries-mode`,{type:`string`,description:`The definition.selections.countries.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-countries-mode`,e=>i(e,`definition-selections-countries-mode`,`text`)).option(`definition-selections-countries-value`,{type:`string`,array:!0,description:`The definition.selections.countries.value field`}).option(`definition-selections-cves`,{type:`string`,array:!0,description:`The definition.selections.cves field`}).option(`definition-selections-excluded-actors`,{type:`string`,array:!0,description:`The definition.selections.excluded_actors field`}).option(`definition-selections-key-suppliers-mode`,{type:`string`,description:`The definition.selections.key_suppliers.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-key-suppliers-mode`,e=>i(e,`definition-selections-key-suppliers-mode`,`text`)).option(`definition-selections-key-suppliers-value`,{type:`string`,description:`The definition.selections.key_suppliers.value field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "domains"?: [string]}]. ? marks optional keys.`}).option(`definition-selections-malware-tools`,{type:`string`,array:!0,description:`The definition.selections.malware_tools field`}).option(`definition-selections-motivations-mode`,{type:`string`,description:`The definition.selections.motivations.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-motivations-mode`,e=>i(e,`definition-selections-motivations-mode`,`text`)).option(`definition-selections-motivations-value`,{type:`string`,array:!0,description:`The definition.selections.motivations.value field`}).option(`definition-selections-peers-mode`,{type:`string`,description:`The definition.selections.peers.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-peers-mode`,e=>i(e,`definition-selections-peers-mode`,`text`)).option(`definition-selections-peers-value`,{type:`string`,description:`The definition.selections.peers.value field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "domains"?: [string]}]. ? marks optional keys.`}).option(`definition-selections-sectors-mode`,{type:`string`,description:`The definition.selections.sectors.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-sectors-mode`,e=>i(e,`definition-selections-sectors-mode`,`text`)).option(`definition-selections-sectors-value`,{type:`string`,array:!0,description:`The definition.selections.sectors.value field`}).option(`definition-selections-targets-mode`,{type:`string`,description:`The definition.selections.targets.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-targets-mode`,e=>i(e,`definition-selections-targets-mode`,`text`)).option(`definition-selections-targets-value`,{type:`string`,array:!0,description:`The definition.selections.targets.value field`}).option(`definition-selections-technique-ids`,{type:`string`,array:!0,description:`The definition.selections.technique_ids field`}).option(`definition-selections-technologies-mode`,{type:`string`,description:`The definition.selections.technologies.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-selections-technologies-mode`,e=>i(e,`definition-selections-technologies-mode`,`text`)).option(`definition-selections-technologies-value`,{type:`string`,array:!0,description:`The definition.selections.technologies.value field`}).option(`definition-title-mode`,{type:`string`,description:`The definition.title.mode field`,choices:[`inherit`,`replace`]}).coerce(`definition-title-mode`,e=>i(e,`definition-title-mode`,`text`)).option(`definition-title-value`,{type:`string`,description:`The definition.title.value field`}).option(`definition-topic-id`,{type:`string`,description:`The definition.topic_id field`}).option(`definition-relevance-criteria`,{type:`string`,description:`The definition.relevance_criteria field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"band": "highly" | "somewhat" | "not", "id": string, "text": string}].`}).option(`digest-interval-hours`,{type:`number`,description:"Hours between digests: 6, 12, or 24. Used only when `notification_mode` is `digest`."}).option(`intent-clauses`,{type:`string`,description:`The intent.clauses field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"actors": [string], "attacker_countries": [string], "categories": [string], "cves": [string], "keywords": [string], ...more}].`}).option(`intent-exclusions-actors`,{type:`string`,array:!0,description:`The intent.exclusions.actors field`}).option(`intent-exclusions-attacker-countries`,{type:`string`,array:!0,description:`The intent.exclusions.attacker_countries field`}).option(`intent-exclusions-categories`,{type:`string`,array:!0,description:`The intent.exclusions.categories field`}).option(`intent-exclusions-cves`,{type:`string`,array:!0,description:`The intent.exclusions.cves field`}).option(`intent-exclusions-keywords`,{type:`string`,array:!0,description:`The intent.exclusions.keywords field`}).option(`intent-exclusions-target-countries`,{type:`string`,array:!0,description:`The intent.exclusions.target_countries field`}).option(`intent-exclusions-target-industries`,{type:`string`,array:!0,description:`The intent.exclusions.target_industries field`}).option(`intent-exclusions-techniques`,{type:`string`,array:!0,description:`The intent.exclusions.techniques field`}).option(`intent-indicators`,{type:`string`,array:!0,description:`The intent.indicators field`}).option(`intent-unsupported-terms`,{type:`string`,array:!0,description:`The intent.unsupported_terms field`}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`model`,{type:`string`,description:`The model field`}).option(`notification-mode`,{type:`string`,description:"`none` or `digest`. Notifications are opt-in. `immediate` is reserved and currently rejected.",choices:[`none`,`immediate`,`digest`]}).coerce(`notification-mode`,e=>i(e,`notification-mode`,`text`)).option(`priority`,{type:`number`,description:`The priority field`}).option(`query-branches`,{type:`string`,description:'Event List `searchBranches`: filters within a branch are ANDed, branches are ORed. Provide as a JSON array of arrays or @path/to/file.json. Shape: [[({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)]].'}).option(`query-version`,{type:`number`,description:`Ignored. Accepted so a PIR read from the API can be sent back unchanged.`}).option(`query-source`,{type:`string`,description:`The query_source field`,choices:[`generated`,`edited`]}).coerce(`query-source`,e=>i(e,`query-source`,`text`)).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`revision`,{type:`number`,description:"The `revision` the change is based on. Required for structured PIRs; a different stored revision returns 409."}).option(`status`,{type:`string`,description:"`draft`: not monitored. `active`: monitored, unless `pause_reason` is set. Setting `active` on a PIR with a `pause_reason` resumes it. Moving a PIR back to `draft` and activating it again starts matching afresh with a 30-day backfill.",choices:[`draft`,`active`]}).coerce(`status`,e=>i(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`definition-additional-criteria`,[`definition-relevance-criteria`]).implies(`definition-additional-criteria`,[`definition-topic-id`]).conflicts(`definition-criterion-selections-add`,[`definition-relevance-criteria`]).implies(`definition-criterion-selections-add`,[`definition-topic-id`]).conflicts(`definition-criterion-selections-remove`,[`definition-relevance-criteria`]).implies(`definition-criterion-selections-remove`,[`definition-topic-id`]).conflicts(`definition-question-mode`,[`definition-relevance-criteria`]).implies(`definition-question-mode`,[`definition-topic-id`]).conflicts(`definition-question-value`,[`definition-relevance-criteria`]).implies(`definition-question-value`,[`definition-question-mode`,`definition-topic-id`]).implies(`definition-selections-actor-types-value`,[`definition-selections-actor-types-mode`]).implies(`definition-selections-countries-value`,[`definition-selections-countries-mode`]).implies(`definition-selections-key-suppliers-value`,[`definition-selections-key-suppliers-mode`]).implies(`definition-selections-motivations-value`,[`definition-selections-motivations-mode`]).implies(`definition-selections-peers-value`,[`definition-selections-peers-mode`]).implies(`definition-selections-sectors-value`,[`definition-selections-sectors-mode`]).implies(`definition-selections-targets-value`,[`definition-selections-targets-mode`]).implies(`definition-selections-technologies-value`,[`definition-selections-technologies-mode`]).conflicts(`definition-title-mode`,[`definition-relevance-criteria`]).implies(`definition-title-mode`,[`definition-topic-id`]).conflicts(`definition-title-value`,[`definition-relevance-criteria`]).implies(`definition-title-value`,[`definition-title-mode`,`definition-topic-id`]).conflicts(`definition-topic-id`,[`definition-relevance-criteria`]).conflicts(`definition-relevance-criteria`,[`definition-additional-criteria`,`definition-criterion-selections-add`,`definition-criterion-selections-remove`,`definition-question-mode`,`definition-question-value`,`definition-title-mode`,`definition-title-value`,`definition-topic-id`]).check(e=>{let t=[`based-on-profile-revision`,`based-on-topic-fingerprint`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`based-on-profile-revision`,`based-on-topic-fingerprint`].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 --based-on-* flag is set`)}return!0}).check(e=>{let t=[`dataset-scope-type`,`dataset-scope-dataset-ids`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`dataset-scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --dataset-scope-* flag is set`)}return!0}).check(e=>{let t=(/* @__PURE__ */ `definition-additional-criteria.definition-criterion-selections-add.definition-criterion-selections-remove.definition-mode.definition-question-mode.definition-question-value.definition-schema-version.definition-selections-actor-notes.definition-selections-actor-types-mode.definition-selections-actor-types-value.definition-selections-actors-add.definition-selections-actors-remove.definition-selections-attributed-countries.definition-selections-countries-mode.definition-selections-countries-value.definition-selections-cves.definition-selections-excluded-actors.definition-selections-key-suppliers-mode.definition-selections-key-suppliers-value.definition-selections-malware-tools.definition-selections-motivations-mode.definition-selections-motivations-value.definition-selections-peers-mode.definition-selections-peers-value.definition-selections-sectors-mode.definition-selections-sectors-value.definition-selections-targets-mode.definition-selections-targets-value.definition-selections-technique-ids.definition-selections-technologies-mode.definition-selections-technologies-value.definition-title-mode.definition-title-value.definition-topic-id.definition-relevance-criteria`.split(`.`)).some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`definition-mode`,`definition-schema-version`].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 --definition-* flag is set`)}return!0}).check(e=>{let t=[`intent-clauses`,`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`,`intent-indicators`,`intent-unsupported-terms`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-clauses`,`intent-indicators`,`intent-unsupported-terms`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-* flag is set`)}return!0}).check(e=>{let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`intent-exclusions-actors`,`intent-exclusions-attacker-countries`,`intent-exclusions-categories`,`intent-exclusions-cves`,`intent-exclusions-keywords`,`intent-exclusions-target-countries`,`intent-exclusions-target-industries`,`intent-exclusions-techniques`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-exclusions-* flag is set`)}return!0}).check(e=>{let t=[`query-branches`,`query-version`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`query-branches`].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 --query-* flag is set`)}return!0})}const N=[{path:[`dataset_scope`],selector:`type`,variants:[{values:[`default`],schema:{type:`object`,properties:{type:{enum:[`default`]}},required:[`type`],additionalProperties:!1}},{values:[`datasets`],schema:{type:`object`,properties:{dataset_ids:{type:`array`,items:{type:`string`},maxItems:50},type:{enum:[`datasets`]}},required:[`dataset_ids`,`type`],additionalProperties:!1}}]},{path:[`definition`],selector:`mode`,variants:[{values:[`managed`],schema:{type:`object`,properties:{additional_criteria:{type:`array`,items:{type:`object`,properties:{band:{enum:[`highly`,`somewhat`,`not`]},id:{type:`string`},text:{type:`string`}},required:[`band`,`id`,`text`],additionalProperties:!1},maxItems:20},criterion_selections:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},mode:{enum:[`managed`]},question:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`string`}},required:[`mode`,`value`],additionalProperties:!1}]},schema_version:{enum:[1]},selections:{type:`object`,properties:{actor_notes:{type:`string`},actor_types:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`nation-state`,`crime-syndicate`,`criminal`,`activist`,`hacker`,`insider-disgruntled`,`insider-accidental`,`spy`,`terrorist`,`competitor`,`sensationalist`]},maxItems:11}},required:[`mode`,`value`],additionalProperties:!1}]},actors:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},attributed_countries:{type:`array`,items:{type:`string`},maxItems:50},countries:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]},cves:{type:`array`,items:{type:`string`},maxItems:50},excluded_actors:{type:`array`,items:{type:`string`},maxItems:50},key_suppliers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},malware_tools:{type:`array`,items:{type:`string`},maxItems:50},motivations:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`personal-gain`,`organizational-gain`,`ideology`,`dominance`,`notoriety`,`coercion`,`revenge`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},peers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},sectors:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:/* @__PURE__ */ `aerospace.agriculture.automotive.chemical.commercial.communications.construction.defense.education.energy.entertainment.financial-services.government-local.government-national.government-public-services.government-regional.healthcare.hospitality-leisure.infrastructure.insurance.manufacturing.mining.non-profit.pharmaceuticals.professional-services.retail.technology.telecommunications.transportation.utilities`.split(`.`)},maxItems:10}},required:[`mode`,`value`],additionalProperties:!1}]},targets:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`organization`,`customers`,`employees`,`executives`,`partners`,`events`,`products-infrastructure`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},technique_ids:{type:`array`,items:{type:`string`},maxItems:50},technologies:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]}},required:[],additionalProperties:!1},title:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`string`}},required:[`mode`,`value`],additionalProperties:!1}]},topic_id:{type:`string`}},required:[`mode`,`schema_version`,`topic_id`],additionalProperties:!1}},{values:[`custom`],schema:{type:`object`,properties:{mode:{enum:[`custom`]},question:{type:`string`},relevance_criteria:{type:`array`,items:{type:`object`,properties:{band:{enum:[`highly`,`somewhat`,`not`]},id:{type:`string`},text:{type:`string`}},required:[`band`,`id`,`text`],additionalProperties:!1},maxItems:30},schema_version:{enum:[1]},selections:{type:`object`,properties:{actor_notes:{type:`string`},actor_types:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`nation-state`,`crime-syndicate`,`criminal`,`activist`,`hacker`,`insider-disgruntled`,`insider-accidental`,`spy`,`terrorist`,`competitor`,`sensationalist`]},maxItems:11}},required:[`mode`,`value`],additionalProperties:!1}]},actors:{type:`object`,properties:{add:{type:`array`,items:{type:`string`},maxItems:50},remove:{type:`array`,items:{type:`string`},maxItems:50}},required:[],additionalProperties:!1},attributed_countries:{type:`array`,items:{type:`string`},maxItems:50},countries:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]},cves:{type:`array`,items:{type:`string`},maxItems:50},excluded_actors:{type:`array`,items:{type:`string`},maxItems:50},key_suppliers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},malware_tools:{type:`array`,items:{type:`string`},maxItems:50},motivations:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`personal-gain`,`organizational-gain`,`ideology`,`dominance`,`notoriety`,`coercion`,`revenge`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},peers:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`object`,properties:{domains:{type:`array`,items:{type:`string`},maxItems:20},name:{type:`string`}},required:[`name`],additionalProperties:!1},maxItems:20}},required:[`mode`,`value`],additionalProperties:!1}]},sectors:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:/* @__PURE__ */ `aerospace.agriculture.automotive.chemical.commercial.communications.construction.defense.education.energy.entertainment.financial-services.government-local.government-national.government-public-services.government-regional.healthcare.hospitality-leisure.infrastructure.insurance.manufacturing.mining.non-profit.pharmaceuticals.professional-services.retail.technology.telecommunications.transportation.utilities`.split(`.`)},maxItems:10}},required:[`mode`,`value`],additionalProperties:!1}]},targets:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{enum:[`organization`,`customers`,`employees`,`executives`,`partners`,`events`,`products-infrastructure`]},maxItems:7}},required:[`mode`,`value`],additionalProperties:!1}]},technique_ids:{type:`array`,items:{type:`string`},maxItems:50},technologies:{anyOf:[{type:`object`,properties:{mode:{enum:[`inherit`]}},required:[`mode`],additionalProperties:!1},{type:`object`,properties:{mode:{enum:[`replace`]},value:{type:`array`,items:{type:`string`},maxItems:50}},required:[`mode`,`value`],additionalProperties:!1}]}},required:[],additionalProperties:!1},title:{type:`string`}},required:[`mode`,`question`,`relevance_criteria`,`schema_version`,`title`],additionalProperties:!1}}]}],Kt={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:Gt,handler:async e=>d({command:`cloudforce-one priority-intelligence update`,classification:{safeFlags:[`confirm-query`,`dataset-scope-type`,`definition-mode`,`definition-question-mode`,`definition-selections-actor-types-mode`,`definition-selections-countries-mode`,`definition-selections-key-suppliers-mode`,`definition-selections-motivations-mode`,`definition-selections-peers-mode`,`definition-selections-sectors-mode`,`definition-selections-targets-mode`,`definition-selections-technologies-mode`,`definition-title-mode`,`notification-mode`,`query-source`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one priority-intelligence update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`json`,body:e.body===void 0?x(_({based_on:{profile_revision:e[`based-on-profile-revision`],topic_fingerprint:i(e[`based-on-topic-fingerprint`],`based-on-topic-fingerprint`,`text`)},confirm_query:e[`confirm-query`],dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},definition:{additional_criteria:h(e[`definition-additional-criteria`],`definition-additional-criteria`),criterion_selections:{add:e[`definition-criterion-selections-add`],remove:e[`definition-criterion-selections-remove`]},mode:e[`definition-mode`],question:{mode:e[`definition-question-mode`],value:i(e[`definition-question-value`],`definition-question-value`,`text`)},schema_version:e[`definition-schema-version`],selections:{actor_notes:i(e[`definition-selections-actor-notes`],`definition-selections-actor-notes`,`text`),actor_types:{mode:e[`definition-selections-actor-types-mode`],value:e[`definition-selections-actor-types-value`]},actors:{add:e[`definition-selections-actors-add`],remove:e[`definition-selections-actors-remove`]},attributed_countries:e[`definition-selections-attributed-countries`],countries:{mode:e[`definition-selections-countries-mode`],value:e[`definition-selections-countries-value`]},cves:e[`definition-selections-cves`],excluded_actors:e[`definition-selections-excluded-actors`],key_suppliers:{mode:e[`definition-selections-key-suppliers-mode`],value:h(e[`definition-selections-key-suppliers-value`],`definition-selections-key-suppliers-value`)},malware_tools:e[`definition-selections-malware-tools`],motivations:{mode:e[`definition-selections-motivations-mode`],value:e[`definition-selections-motivations-value`]},peers:{mode:e[`definition-selections-peers-mode`],value:h(e[`definition-selections-peers-value`],`definition-selections-peers-value`)},sectors:{mode:e[`definition-selections-sectors-mode`],value:e[`definition-selections-sectors-value`]},targets:{mode:e[`definition-selections-targets-mode`],value:e[`definition-selections-targets-value`]},technique_ids:e[`definition-selections-technique-ids`],technologies:{mode:e[`definition-selections-technologies-mode`],value:e[`definition-selections-technologies-value`]}},title:{mode:e[`definition-title-mode`],value:i(e[`definition-title-value`],`definition-title-value`,`text`)},topic_id:i(e[`definition-topic-id`],`definition-topic-id`,`text`),relevance_criteria:h(e[`definition-relevance-criteria`],`definition-relevance-criteria`)},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),revision:e.revision,status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)}),N):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(M,{body:t,account_id:d,priority_id:e[`priority-id`]}));l(r,{successLabel:`Updated`});return}let p=_({based_on:{profile_revision:e[`based-on-profile-revision`],topic_fingerprint:i(e[`based-on-topic-fingerprint`],`based-on-topic-fingerprint`,`text`)},confirm_query:e[`confirm-query`],dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},definition:{additional_criteria:h(e[`definition-additional-criteria`],`definition-additional-criteria`),criterion_selections:{add:e[`definition-criterion-selections-add`],remove:e[`definition-criterion-selections-remove`]},mode:e[`definition-mode`],question:{mode:e[`definition-question-mode`],value:i(e[`definition-question-value`],`definition-question-value`,`text`)},schema_version:e[`definition-schema-version`],selections:{actor_notes:i(e[`definition-selections-actor-notes`],`definition-selections-actor-notes`,`text`),actor_types:{mode:e[`definition-selections-actor-types-mode`],value:e[`definition-selections-actor-types-value`]},actors:{add:e[`definition-selections-actors-add`],remove:e[`definition-selections-actors-remove`]},attributed_countries:e[`definition-selections-attributed-countries`],countries:{mode:e[`definition-selections-countries-mode`],value:e[`definition-selections-countries-value`]},cves:e[`definition-selections-cves`],excluded_actors:e[`definition-selections-excluded-actors`],key_suppliers:{mode:e[`definition-selections-key-suppliers-mode`],value:h(e[`definition-selections-key-suppliers-value`],`definition-selections-key-suppliers-value`)},malware_tools:e[`definition-selections-malware-tools`],motivations:{mode:e[`definition-selections-motivations-mode`],value:e[`definition-selections-motivations-value`]},peers:{mode:e[`definition-selections-peers-mode`],value:h(e[`definition-selections-peers-value`],`definition-selections-peers-value`)},sectors:{mode:e[`definition-selections-sectors-mode`],value:e[`definition-selections-sectors-value`]},targets:{mode:e[`definition-selections-targets-mode`],value:e[`definition-selections-targets-value`]},technique_ids:e[`definition-selections-technique-ids`],technologies:{mode:e[`definition-selections-technologies-mode`],value:e[`definition-selections-technologies-value`]}},title:{mode:e[`definition-title-mode`],value:i(e[`definition-title-value`],`definition-title-value`,`text`)},topic_id:i(e[`definition-topic-id`],`definition-topic-id`,`text`),relevance_criteria:h(e[`definition-relevance-criteria`],`definition-relevance-criteria`)},digest_interval_hours:e[`digest-interval-hours`],intent:{clauses:h(e[`intent-clauses`],`intent-clauses`),exclusions:{actors:e[`intent-exclusions-actors`],attacker_countries:e[`intent-exclusions-attacker-countries`],categories:e[`intent-exclusions-categories`],cves:e[`intent-exclusions-cves`],keywords:e[`intent-exclusions-keywords`],target_countries:e[`intent-exclusions-target-countries`],target_industries:e[`intent-exclusions-target-industries`],techniques:e[`intent-exclusions-techniques`]},indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:i(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{branches:f(e[`query-branches`],`query-branches`),version:e[`query-version`]},query_source:e[`query-source`],requirement:i(e.requirement,`requirement`,`text`),revision:e.revision,status:e.status,title:i(e.title,`title`,`text`),tlp:i(e.tlp,`tlp`,`text`)});x(p,N);let m=await u(`Updating`,async()=>a.send(M,{body:p,account_id:d,priority_id:e[`priority-id`]}));l(m,{successLabel:`Updated`})})},qt={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(Oe).command(je).command(Le).command(lt).command(Bt).command(Kt).command(we).command(Pe).command(ot).command(wt).command(Pt).command(Rt).command(Wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jt(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
51
47
 
52
- Download a file asset from R2 storage. Customer can only download from their own account.`).positional(`asset-id`,{type:`string`,description:`Asset UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Ht={command:`download <asset-id>`,describe:`Download asset (Customer)`,builder:Vt,handler:async e=>d({command:`cloudforce-one requests assets download`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests assets download`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/${e[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(e[`asset-id`]))}/download`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"asset-id":String(e[`asset-id`]??``)},bodyKind:`none`});return}await t(e);let n=e.local?c:await s();e.accountId=n;let i=await u(`Loading`,async()=>C(`/accounts/${n}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/assets/${encodeURIComponent(String(e[`asset-id`]))}/download`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));S(e.text===!0?i.toString(`utf-8`):i)})};var Ut={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/assets/list`};function Wt(e){return e.usage(`$0 cloudforce-one requests assets list
48
+ Download a file asset from R2 storage. Customer can only download from their own account.`).positional(`asset-id`,{type:`string`,description:`Asset UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Yt={command:`download <asset-id>`,describe:`Download asset (Customer)`,builder:Jt,handler:async e=>d({command:`cloudforce-one requests assets download`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests assets download`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/${e[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(e[`asset-id`]))}/download`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"asset-id":String(e[`asset-id`]??``)},bodyKind:`none`});return}await t(e);let n=e.local?c:await s();e.accountId=n;let i=await u(`Loading`,async()=>C(`/accounts/${n}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/assets/${encodeURIComponent(String(e[`asset-id`]))}/download`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));S(e.text===!0?i.toString(`utf-8`):i)})};var Xt={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/assets/list`};function Zt(e){return e.usage(`$0 cloudforce-one requests assets list
53
49
 
54
- List all file assets for a request. Customer can only list assets from their own account.`).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gt={command:`list`,describe:`List assets in request (Customer)`,builder:Wt,handler:async e=>d({command:`cloudforce-one requests assets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/list`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ut,{account_id:i,project_type:e[`project-type`],request_id:e[`request-id`]}));l(a,{successLabel:`Loaded`})})};var Kt={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/assets/upload`,pathParams:[`account_id`,`project_type`,`request_id`],body:`form`};function qt(e){return e.usage(`$0 cloudforce-one requests assets upload <request-id>
50
+ List all file assets for a request. Customer can only list assets from their own account.`).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qt={command:`list`,describe:`List assets in request (Customer)`,builder:Zt,handler:async e=>d({command:`cloudforce-one requests assets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/list`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Xt,{account_id:i,project_type:e[`project-type`],request_id:e[`request-id`]}));l(a,{successLabel:`Loaded`})})};var $t={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/assets/upload`,pathParams:[`account_id`,`project_type`,`request_id`],body:`form`};function en(e){return e.usage(`$0 cloudforce-one requests assets upload <request-id>
55
51
 
56
- Upload a file asset to R2 storage and associate it with a request. Customer can only upload to their own account.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`description`,{type:`string`,description:`Optional description of the asset`}).option(`metadata`,{type:`string`,description:`Optional JSON string of key-value pairs (e.g., '{"key1":"value1"}')`}).option(`source`,{type:`string`,description:"Literal content or @path/to/file for the `source` form field. The file to upload (can also use 'file')"})}const Jt={command:`upload <request-id>`,describe:`Upload asset to request (Customer)`,builder:qt,handler:async n=>d({command:`cloudforce-one requests assets upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one requests assets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${n[`project-type`]==null?`<project-type>`:encodeURIComponent(String(n[`project-type`]))}/${n[`request-id`]==null?`<request-id>`:encodeURIComponent(String(n[`request-id`]))}/assets/upload`,pathParams:{"project-type":String(n[`project-type`]??``),"request-id":String(n[`request-id`]??``)},bodyKind:`multipart`,body:{body:n.body,file:n.file,description:n.description,metadata:n.metadata,source:n.source}});return}let d=await t(n),f=n.local?c:await s();if(n.accountId=f,n.file!==void 0||n.body!==void 0||n.description!==void 0||n.metadata!==void 0||n.source!==void 0){let t=new FormData;if(n.file!==void 0){let e=a(n.file);t.append(`file`,new Blob([e]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&t.append(`file`,n.body);if(n.description!==void 0&&t.append(`description`,String(i(n.description,`description`,`text`)??``)),n.metadata!==void 0&&t.append(`metadata`,String(i(n.metadata,`metadata`,`text`)??``)),n.source!==void 0){let e=String(n.source);if(e.startsWith(`@`)){let n=e.slice(1),r=i(e,`source`,`binary`);t.append(`source`,new Blob([r]),n.split(/[\\/]/).filter(Boolean).pop())}else t.append(`source`,new Blob([e]),`source`)}let r=await u(`Creating`,async()=>e(d,`POST`,`/accounts/${f}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/assets/upload`,{body:t}));l(r,{successLabel:`Created`});return}if(n.body!==void 0){let t=i(n.body,`body`,`binary`),r=await u(`Creating`,async()=>e(d,`POST`,`/accounts/${f}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/assets/upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));l(r,{successLabel:`Created`});return}let p=await u(`Creating`,async()=>d.send(Kt,{account_id:f,project_type:n[`project-type`],request_id:n[`request-id`]}));l(p,{successLabel:`Created`})})},Yt={command:`assets`,describe:`Operations for requests.assets`,builder:e=>e.command(Ht).command(Gt).command(Jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xt={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/constants`};function Zt(e){return e.usage(`$0 cloudforce-one requests constants get <project-type>
52
+ Upload a file asset to R2 storage and associate it with a request. Customer can only upload to their own account.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`description`,{type:`string`,description:`Optional description of the asset`}).option(`metadata`,{type:`string`,description:`Optional JSON string of key-value pairs (e.g., '{"key1":"value1"}')`}).option(`source`,{type:`string`,description:"Literal content or @path/to/file for the `source` form field. The file to upload (can also use 'file')"})}const tn={command:`upload <request-id>`,describe:`Upload asset to request (Customer)`,builder:en,handler:async n=>d({command:`cloudforce-one requests assets upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one requests assets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${n[`project-type`]==null?`<project-type>`:encodeURIComponent(String(n[`project-type`]))}/${n[`request-id`]==null?`<request-id>`:encodeURIComponent(String(n[`request-id`]))}/assets/upload`,pathParams:{"project-type":String(n[`project-type`]??``),"request-id":String(n[`request-id`]??``)},bodyKind:`multipart`,body:{body:n.body,file:n.file,description:n.description,metadata:n.metadata,source:n.source}});return}let d=await t(n),f=n.local?c:await s();if(n.accountId=f,n.file!==void 0||n.body!==void 0||n.description!==void 0||n.metadata!==void 0||n.source!==void 0){let t=new FormData;if(n.file!==void 0){let e=a(n.file);t.append(`file`,new Blob([e]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&t.append(`file`,n.body);if(n.description!==void 0&&t.append(`description`,String(i(n.description,`description`,`text`)??``)),n.metadata!==void 0&&t.append(`metadata`,String(i(n.metadata,`metadata`,`text`)??``)),n.source!==void 0){let e=String(n.source);if(e.startsWith(`@`)){let n=e.slice(1),r=i(e,`source`,`binary`);t.append(`source`,new Blob([r]),n.split(/[\\/]/).filter(Boolean).pop())}else t.append(`source`,new Blob([e]),`source`)}let r=await u(`Creating`,async()=>e(d,`POST`,`/accounts/${f}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/assets/upload`,{body:t}));l(r,{successLabel:`Created`});return}if(n.body!==void 0){let t=i(n.body,`body`,`binary`),r=await u(`Creating`,async()=>e(d,`POST`,`/accounts/${f}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/assets/upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));l(r,{successLabel:`Created`});return}let p=await u(`Creating`,async()=>d.send($t,{account_id:f,project_type:n[`project-type`],request_id:n[`request-id`]}));l(p,{successLabel:`Created`})})},nn={command:`assets`,describe:`Operations for requests.assets`,builder:e=>e.command(Yt).command(Qt).command(tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var rn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/constants`};function an(e){return e.usage(`$0 cloudforce-one requests constants get <project-type>
57
53
 
58
- Returns available priorities, statuses, and TLP levels for request workflows`).positional(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qt={command:`get <project-type>`,describe:`Get request constants`,builder:Zt,handler:async e=>d({command:`cloudforce-one requests constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/constants`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Xt,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},$t={command:`constants`,describe:`Operations for requests.constants`,builder:e=>e.command(Qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var en={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}`,query:[`page`,`pageSize`,`status`,`search`,`createdBy`,`assignee`,`requestType`,`priority`,`tlp`,`id`,`readableId`,`summary`,`accountId`,`metadata`,`orderBy`,`order`]};function tn(e){return e.usage(`$0 cloudforce-one requests get-request-list <project-type>
54
+ Returns available priorities, statuses, and TLP levels for request workflows`).positional(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const on={command:`get <project-type>`,describe:`Get request constants`,builder:an,handler:async e=>d({command:`cloudforce-one requests constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/constants`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(rn,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},sn={command:`constants`,describe:`Operations for requests.constants`,builder:e=>e.command(on).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}`,query:[`page`,`pageSize`,`status`,`search`,`createdBy`,`assignee`,`requestType`,`priority`,`tlp`,`id`,`readableId`,`summary`,`accountId`,`metadata`,`orderBy`,`order`]};function ln(e){return e.usage(`$0 cloudforce-one requests get-request-list <project-type>
59
55
 
60
- Retrieves a paginated list of RFIs with filtering and sorting options.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`status`,{type:`string`,description:`Status filter. Projects with a narrowed dashboard vocabulary accept only their customer-facing values.`}).option(`search`,{type:`string`,description:`Search`}).option(`created-by`,{type:`string`,description:"Filter by creator email. NOTE: For the `legal-response` project type this query parameter is **rejected with HTTP 400** — the server derives the filter from the authenticated user's JWT automatically and does not accept a client-supplied value. Requests to `legal-response` with no valid JWT identity are rejected with HTTP 401."}).option(`assignee`,{type:`string`,description:`Assignee`}).option(`request-type`,{type:`string`,description:`RequestType`}).option(`priority`,{type:`string`,description:`Priority`}).option(`tlp`,{type:`string`,description:`Tlp`}).option(`id`,{type:`string`,description:`ID`}).option(`readable-id`,{type:`string`,description:`ReadableId`}).option(`summary`,{type:`string`,description:`Summary`}).option(`filter-account-id`,{type:`string`,description:`AccountId`}).option(`metadata`,{type:`string`,description:`JSON string object of metadata filters. Supports two formats: 1) Simple values for exact match (backward compatible): {"status": "open"} 2) Operator objects for advanced filtering: {"identifiers": {"operator": "contains_line", "value": "blah.com"}}. Available operators: 'eq' (exact match, default), 'contains' (substring match), 'contains_line' (match complete line in newline-separated text). Date fields are automatically normalized to YYYY-MM-DD format.`}).option(`order-by`,{type:`string`,description:`Sort field. SOC Communications support customer-safe latest_activity ordering.`}).option(`order`,{type:`string`,description:`Order`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nn={command:`get-request-list <project-type>`,describe:`List RFIs`,builder:tn,handler:async e=>d({command:`cloudforce-one requests get-request-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],status:e.status,search:e.search,createdBy:e[`created-by`],assignee:e.assignee,requestType:e[`request-type`],priority:e.priority,tlp:e.tlp,id:e.id,readableId:e[`readable-id`],summary:e.summary,accountId:e[`filter-account-id`],metadata:e.metadata,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests get-request-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}`,pathParams:{"project-type":String(e[`project-type`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(en,{account_id:a,project_type:e[`project-type`],...n}));l(d,{successLabel:`Loaded`})})};var rn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function an(e){return e.usage(`$0 cloudforce-one requests get-request-read <request-id>
56
+ Retrieves a paginated list of RFIs with filtering and sorting options.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`status`,{type:`string`,description:`Status filter. Projects with a narrowed dashboard vocabulary accept only their customer-facing values.`}).option(`search`,{type:`string`,description:`Search`}).option(`created-by`,{type:`string`,description:"Filter by creator email. NOTE: For the `legal-response` project type this query parameter is **rejected with HTTP 400** — the server derives the filter from the authenticated user's JWT automatically and does not accept a client-supplied value. Requests to `legal-response` with no valid JWT identity are rejected with HTTP 401."}).option(`assignee`,{type:`string`,description:`Assignee`}).option(`request-type`,{type:`string`,description:`RequestType`}).option(`priority`,{type:`string`,description:`Priority`}).option(`tlp`,{type:`string`,description:`Tlp`}).option(`id`,{type:`string`,description:`ID`}).option(`readable-id`,{type:`string`,description:`ReadableId`}).option(`summary`,{type:`string`,description:`Summary`}).option(`filter-account-id`,{type:`string`,description:`AccountId`}).option(`metadata`,{type:`string`,description:`JSON string object of metadata filters. Supports two formats: 1) Simple values for exact match (backward compatible): {"status": "open"} 2) Operator objects for advanced filtering: {"identifiers": {"operator": "contains_line", "value": "blah.com"}}. Available operators: 'eq' (exact match, default), 'contains' (substring match), 'contains_line' (match complete line in newline-separated text). Date fields are automatically normalized to YYYY-MM-DD format.`}).option(`order-by`,{type:`string`,description:`Sort field. SOC Communications support customer-safe latest_activity ordering.`}).option(`order`,{type:`string`,description:`Order`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const un={command:`get-request-list <project-type>`,describe:`List RFIs`,builder:ln,handler:async e=>d({command:`cloudforce-one requests get-request-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],status:e.status,search:e.search,createdBy:e[`created-by`],assignee:e.assignee,requestType:e[`request-type`],priority:e.priority,tlp:e.tlp,id:e.id,readableId:e[`readable-id`],summary:e.summary,accountId:e[`filter-account-id`],metadata:e.metadata,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests get-request-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}`,pathParams:{"project-type":String(e[`project-type`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(cn,{account_id:a,project_type:e[`project-type`],...n}));l(d,{successLabel:`Loaded`})})};var dn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function fn(e){return e.usage(`$0 cloudforce-one requests get-request-read <request-id>
61
57
 
62
- Retrieves a specific RFI by its UUID with related data.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const on={command:`get-request-read <request-id>`,describe:`Get an RFI by ID`,builder:an,handler:async e=>d({command:`cloudforce-one requests get-request-read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests get-request-read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(rn,{account_id:i,project_type:e[`project-type`],request_id:e[`request-id`]}));l(a,{successLabel:`Loaded`})})};var sn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/legal-response/access-check`,errors:{401:`UnauthorizedError`}};function cn(e){return e.usage(`$0 cloudforce-one requests legal-response access-check
58
+ Retrieves a specific RFI by its UUID with related data.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pn={command:`get-request-read <request-id>`,describe:`Get an RFI by ID`,builder:fn,handler:async e=>d({command:`cloudforce-one requests get-request-read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests get-request-read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(dn,{account_id:i,project_type:e[`project-type`],request_id:e[`request-id`]}));l(a,{successLabel:`Loaded`})})};var mn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/legal-response/access-check`,errors:{401:`UnauthorizedError`}};function hn(e){return e.usage(`$0 cloudforce-one requests legal-response access-check
63
59
 
64
- Returns whether the JWT-authenticated user's email is on the legal-response allowlist. This endpoint is purely informational for UI gating; actual access enforcement is performed by \`legalResponseMiddleware\` on real legal-response endpoints. Read-only — no Durable Object writes are performed.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ln={command:`access-check`,describe:`Check if current user is allowlisted for Legal Response`,builder:cn,handler:async e=>d({command:`cloudforce-one requests legal-response access-check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one requests legal-response access-check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/legal-response/access-check`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(sn,{account_id:i}));l(a,{successLabel:`Loaded`})})},un={command:`legal-response`,describe:`Operations for requests.legal-response`,builder:e=>e.command(ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dn(e){return e.usage(`$0 cloudforce-one requests messages create <request-id>
60
+ Returns whether the JWT-authenticated user's email is on the legal-response allowlist. This endpoint is purely informational for UI gating; actual access enforcement is performed by \`legalResponseMiddleware\` on real legal-response endpoints. Read-only — no Durable Object writes are performed.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gn={command:`access-check`,describe:`Check if current user is allowlisted for Legal Response`,builder:hn,handler:async e=>d({command:`cloudforce-one requests legal-response access-check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one requests legal-response access-check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/legal-response/access-check`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(mn,{account_id:i}));l(a,{successLabel:`Loaded`})})},_n={command:`legal-response`,describe:`Operations for requests.legal-response`,builder:e=>e.command(gn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vn(e){return e.usage(`$0 cloudforce-one requests messages create <request-id>
65
61
 
66
- Creates a customer dashboard message on an RFI request. Messages are always published on send. Workflow-enabled projects require Idempotency-Key and atomically record message activity and any policy transition. For token-billed project types, substantive follow-on messages consume message tokens and are subject to quarterly quota enforcement.`).positional(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`author-id`,{type:`string`,description:`The author_id field`}).option(`author-name`,{type:`string`,description:`The author_name field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`,default:!1}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`],default:`red`}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fn={command:`create <request-id>`,describe:`Create a customer follow-on message on an RFI request`,builder:dn,handler:async n=>d({command:`cloudforce-one requests messages create`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},n,async()=>{let a={};if(n[`idempotency-key`]!==void 0&&(a[`Idempotency-Key`]=String(n[`idempotency-key`])),n.dryRun){let e=await o();r({command:`cf cloudforce-one requests messages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${n[`project-type`]==null?`<project-type>`:encodeURIComponent(String(n[`project-type`]))}/${n[`request-id`]==null?`<request-id>`:encodeURIComponent(String(n[`request-id`]))}/messages/new`,pathParams:{"project-type":String(n[`project-type`]??``),"request-id":String(n[`request-id`]??``)},bodyKind:`json`,body:n.body===void 0?_({attachment_asset_ids:n[`attachment-asset-ids`],author_id:i(n[`author-id`],`author-id`,`text`),author_name:i(n[`author-name`],`author-name`,`text`),content:i(n.content,`content`,`text`),publish:n.publish,tlp:n.tlp}):g(n.body)});return}let d=n.body===void 0?void 0:g(n.body),f=await t(n),m=n.local?c:await s();if(n.accountId=m,n.body!==void 0){let t=d,r=await u(`Creating`,async()=>e(f,`POST`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/new`,{body:t,headers:Object.keys(a).length>0?a:void 0}));l(r,{successLabel:`Created`});return}n.content===void 0&&(n.content=await v(`content`,`The content field`));let h={};n[`attachment-asset-ids`]!==void 0&&p(h,[`attachment_asset_ids`],n[`attachment-asset-ids`]),n[`author-id`]!==void 0&&p(h,[`author_id`],i(n[`author-id`],`author-id`,`text`)),n[`author-name`]!==void 0&&p(h,[`author_name`],i(n[`author-name`],`author-name`,`text`)),n.content!==void 0&&p(h,[`content`],i(n.content,`content`,`text`)),n.publish!==void 0&&p(h,[`publish`],n.publish),n.tlp!==void 0&&p(h,[`tlp`],n.tlp);let y=await u(`Creating`,async()=>e(f,`POST`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/new`,{body:h,headers:Object.keys(a).length>0?a:void 0}));l(y,{successLabel:`Created`})})};var pn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/messages/${e.message_id}`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function mn(e){return e.usage(`$0 cloudforce-one requests messages get <message-id>
62
+ Creates a customer dashboard message on an RFI request. Messages are always published on send. Workflow-enabled projects require Idempotency-Key and atomically record message activity and any policy transition. For token-billed project types, substantive follow-on messages consume message tokens and are subject to quarterly quota enforcement.`).positional(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`author-id`,{type:`string`,description:`The author_id field`}).option(`author-name`,{type:`string`,description:`The author_name field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`,default:!1}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`],default:`red`}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yn={command:`create <request-id>`,describe:`Create a customer follow-on message on an RFI request`,builder:vn,handler:async n=>d({command:`cloudforce-one requests messages create`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},n,async()=>{let a={};if(n[`idempotency-key`]!==void 0&&(a[`Idempotency-Key`]=String(n[`idempotency-key`])),n.dryRun){let e=await o();r({command:`cf cloudforce-one requests messages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${n[`project-type`]==null?`<project-type>`:encodeURIComponent(String(n[`project-type`]))}/${n[`request-id`]==null?`<request-id>`:encodeURIComponent(String(n[`request-id`]))}/messages/new`,pathParams:{"project-type":String(n[`project-type`]??``),"request-id":String(n[`request-id`]??``)},bodyKind:`json`,body:n.body===void 0?_({attachment_asset_ids:n[`attachment-asset-ids`],author_id:i(n[`author-id`],`author-id`,`text`),author_name:i(n[`author-name`],`author-name`,`text`),content:i(n.content,`content`,`text`),publish:n.publish,tlp:n.tlp}):g(n.body)});return}let d=n.body===void 0?void 0:g(n.body),f=await t(n),m=n.local?c:await s();if(n.accountId=m,n.body!==void 0){let t=d,r=await u(`Creating`,async()=>e(f,`POST`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/new`,{body:t,headers:Object.keys(a).length>0?a:void 0}));l(r,{successLabel:`Created`});return}n.content===void 0&&(n.content=await v(`content`,`The content field`));let h={};n[`attachment-asset-ids`]!==void 0&&p(h,[`attachment_asset_ids`],n[`attachment-asset-ids`]),n[`author-id`]!==void 0&&p(h,[`author_id`],i(n[`author-id`],`author-id`,`text`)),n[`author-name`]!==void 0&&p(h,[`author_name`],i(n[`author-name`],`author-name`,`text`)),n.content!==void 0&&p(h,[`content`],i(n.content,`content`,`text`)),n.publish!==void 0&&p(h,[`publish`],n.publish),n.tlp!==void 0&&p(h,[`tlp`],n.tlp);let y=await u(`Creating`,async()=>e(f,`POST`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/new`,{body:h,headers:Object.keys(a).length>0?a:void 0}));l(y,{successLabel:`Created`})})};var bn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/messages/${e.message_id}`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function xn(e){return e.usage(`$0 cloudforce-one requests messages get <message-id>
67
63
 
68
- Returns the details for a specific message belonging to an RFI request.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hn={command:`get <message-id>`,describe:`Read a single message for an RFI request`,builder:mn,handler:async e=>d({command:`cloudforce-one requests messages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests messages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(pn,{account_id:i,project_type:e[`project-type`],request_id:e[`request-id`],message_id:e[`message-id`]}));l(a,{successLabel:`Loaded`})})};var gn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/messages`,query:[`page`,`per_page`],errors:{404:`NotFoundError`,500:`InternalServerError`}};function _n(e){return e.usage(`$0 cloudforce-one requests messages list
64
+ Returns the details for a specific message belonging to an RFI request.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sn={command:`get <message-id>`,describe:`Read a single message for an RFI request`,builder:xn,handler:async e=>d({command:`cloudforce-one requests messages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests messages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(bn,{account_id:i,project_type:e[`project-type`],request_id:e[`request-id`],message_id:e[`message-id`]}));l(a,{successLabel:`Loaded`})})};var Cn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}/messages`,query:[`page`,`per_page`],errors:{404:`NotFoundError`,500:`InternalServerError`}};function wn(e){return e.usage(`$0 cloudforce-one requests messages list
69
65
 
70
- Retrieves the published, non-deleted messages visible to the agent for an RFI request, with pagination.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`page`,{type:`string`,description:`Page`}).option(`per-page`,{type:`string`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vn={command:`list`,describe:`List messages for an RFI request`,builder:_n,handler:async e=>d({command:`cloudforce-one requests messages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(gn,{account_id:a,project_type:e[`project-type`],request_id:e[`request-id`],...n}));l(d,{successLabel:`Loaded`})})};function yn(e){return e.usage(`$0 cloudforce-one requests messages update <message-id>
66
+ Retrieves the published, non-deleted messages visible to the agent for an RFI request, with pagination.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`page`,{type:`string`,description:`Page`}).option(`per-page`,{type:`string`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tn={command:`list`,describe:`List messages for an RFI request`,builder:wn,handler:async e=>d({command:`cloudforce-one requests messages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Cn,{account_id:a,project_type:e[`project-type`],request_id:e[`request-id`],...n}));l(d,{successLabel:`Loaded`})})};function En(e){return e.usage(`$0 cloudforce-one requests messages update <message-id>
71
67
 
72
- Updates an existing message, typically to publish a draft by setting publish=true. Workflow-enabled publication requires Idempotency-Key and atomically records message activity and any policy transition.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const bn={command:`update <message-id>`,describe:`Update/publish a message for an RFI request`,builder:yn,handler:async n=>d({command:`cloudforce-one requests messages update`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},n,async()=>{let a={};if(n[`idempotency-key`]!==void 0&&(a[`Idempotency-Key`]=String(n[`idempotency-key`])),n.dryRun){let e=await o();r({command:`cf cloudforce-one requests messages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${n[`project-type`]==null?`<project-type>`:encodeURIComponent(String(n[`project-type`]))}/${n[`request-id`]==null?`<request-id>`:encodeURIComponent(String(n[`request-id`]))}/messages/${n[`message-id`]==null?`<message-id>`:encodeURIComponent(String(n[`message-id`]))}`,pathParams:{"project-type":String(n[`project-type`]??``),"request-id":String(n[`request-id`]??``),"message-id":String(n[`message-id`]??``)},bodyKind:`json`,body:n.body===void 0?_({attachment_asset_ids:n[`attachment-asset-ids`],content:i(n.content,`content`,`text`),publish:n.publish,tlp:n.tlp}):g(n.body)});return}let d=n.body===void 0?void 0:g(n.body),f=await t(n),m=n.local?c:await s();if(n.accountId=m,n.body!==void 0){let t=d,r=await u(`Updating`,async()=>e(f,`PUT`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/${encodeURIComponent(String(n[`message-id`]))}`,{body:t,headers:Object.keys(a).length>0?a:void 0}));l(r,{successLabel:`Updated`});return}if(n.content===void 0&&(n.content=await v(`content`,`The content field`)),n.publish===void 0)throw Error(`--publish is required (or pass --body with this field set).`);n.tlp===void 0&&(n.tlp=await y(`tlp`,`The tlp field`,[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]));let h={};n[`attachment-asset-ids`]!==void 0&&p(h,[`attachment_asset_ids`],n[`attachment-asset-ids`]),n.content!==void 0&&p(h,[`content`],i(n.content,`content`,`text`)),n.publish!==void 0&&p(h,[`publish`],n.publish),n.tlp!==void 0&&p(h,[`tlp`],n.tlp);let b=await u(`Updating`,async()=>e(f,`PUT`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/${encodeURIComponent(String(n[`message-id`]))}`,{body:h,headers:Object.keys(a).length>0?a:void 0}));l(b,{successLabel:`Updated`})})},xn={command:`messages`,describe:`Operations for requests.messages`,builder:e=>e.command(fn).command(hn).command(vn).command(bn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Sn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/metadata`,query:[`request_type`,`country`],errors:{401:`UnauthorizedError`}};function Cn(e){return e.usage(`$0 cloudforce-one requests metadata list
68
+ Updates an existing message, typically to publish a draft by setting publish=true. Workflow-enabled publication requires Idempotency-Key and atomically records message activity and any policy transition.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Dn={command:`update <message-id>`,describe:`Update/publish a message for an RFI request`,builder:En,handler:async n=>d({command:`cloudforce-one requests messages update`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},n,async()=>{let a={};if(n[`idempotency-key`]!==void 0&&(a[`Idempotency-Key`]=String(n[`idempotency-key`])),n.dryRun){let e=await o();r({command:`cf cloudforce-one requests messages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${n[`project-type`]==null?`<project-type>`:encodeURIComponent(String(n[`project-type`]))}/${n[`request-id`]==null?`<request-id>`:encodeURIComponent(String(n[`request-id`]))}/messages/${n[`message-id`]==null?`<message-id>`:encodeURIComponent(String(n[`message-id`]))}`,pathParams:{"project-type":String(n[`project-type`]??``),"request-id":String(n[`request-id`]??``),"message-id":String(n[`message-id`]??``)},bodyKind:`json`,body:n.body===void 0?_({attachment_asset_ids:n[`attachment-asset-ids`],content:i(n.content,`content`,`text`),publish:n.publish,tlp:n.tlp}):g(n.body)});return}let d=n.body===void 0?void 0:g(n.body),f=await t(n),m=n.local?c:await s();if(n.accountId=m,n.body!==void 0){let t=d,r=await u(`Updating`,async()=>e(f,`PUT`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/${encodeURIComponent(String(n[`message-id`]))}`,{body:t,headers:Object.keys(a).length>0?a:void 0}));l(r,{successLabel:`Updated`});return}if(n.content===void 0&&(n.content=await v(`content`,`The content field`)),n.publish===void 0)throw Error(`--publish is required (or pass --body with this field set).`);n.tlp===void 0&&(n.tlp=await y(`tlp`,`The tlp field`,[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]));let h={};n[`attachment-asset-ids`]!==void 0&&p(h,[`attachment_asset_ids`],n[`attachment-asset-ids`]),n.content!==void 0&&p(h,[`content`],i(n.content,`content`,`text`)),n.publish!==void 0&&p(h,[`publish`],n.publish),n.tlp!==void 0&&p(h,[`tlp`],n.tlp);let b=await u(`Updating`,async()=>e(f,`PUT`,`/accounts/${m}/cloudforce-one/v2/requests/${encodeURIComponent(String(n[`project-type`]))}/${encodeURIComponent(String(n[`request-id`]))}/messages/${encodeURIComponent(String(n[`message-id`]))}`,{body:h,headers:Object.keys(a).length>0?a:void 0}));l(b,{successLabel:`Updated`})})},On={command:`messages`,describe:`Operations for requests.messages`,builder:e=>e.command(yn).command(Sn).command(Tn).command(Dn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var kn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/metadata`,query:[`request_type`,`country`],errors:{401:`UnauthorizedError`}};function An(e){return e.usage(`$0 cloudforce-one requests metadata list
73
69
 
74
- Get custom metadata fields available for the specified project type`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-type`,{type:`string`,description:`Filter fields to those applicable to this request type. Fields without request type restrictions are always included.`}).option(`country`,{type:`string`,description:`Exclude fields restricted for this alpha-2 country code`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wn={command:`list`,describe:`List metadata fields for an RFI type`,builder:Cn,handler:async e=>d({command:`cloudforce-one requests metadata list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={request_type:e[`request-type`],country:e.country};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests metadata list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/metadata`,pathParams:{"project-type":String(e[`project-type`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Sn,{account_id:a,project_type:e[`project-type`],...n}));l(d,{successLabel:`Loaded`})})},Tn={command:`metadata`,describe:`Operations for requests.metadata`,builder:e=>e.command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function En(e){return e.usage(`$0 cloudforce-one requests post-request-create <project-type>
70
+ Get custom metadata fields available for the specified project type`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-type`,{type:`string`,description:`Filter fields to those applicable to this request type. Fields without request type restrictions are always included.`}).option(`country`,{type:`string`,description:`Exclude fields restricted for this alpha-2 country code`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jn={command:`list`,describe:`List metadata fields for an RFI type`,builder:An,handler:async e=>d({command:`cloudforce-one requests metadata list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={request_type:e[`request-type`],country:e.country};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests metadata list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/metadata`,pathParams:{"project-type":String(e[`project-type`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(kn,{account_id:a,project_type:e[`project-type`],...n}));l(d,{successLabel:`Loaded`})})},Mn={command:`metadata`,describe:`Operations for requests.metadata`,builder:e=>e.command(jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function Nn(e){return e.usage(`$0 cloudforce-one requests post-request-create <project-type>
75
71
 
76
- Creates a new Request for Information with the specified project type and details.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description (optional). Defaults to an empty string when omitted.`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`metadata`,{type:`string`,description:`Optional metadata fields specific to the RFI type. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use `low`, `routine`, `high`, `urgent`; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases. Defaults to `routine`.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>i(e,`priority`,`text`)).option(`request-type`,{type:`string`,description:`Optional request type for the request`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`title`,{type:`string`,description:`RFI title (optional). When omitted, the server generates a summary from the request type and readable ID.`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. Canonical values are `clear`, `green`, `amber`, `amber-strict`, `red`, `purple`. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Dn={command:`post-request-create <project-type>`,describe:`Creates a new RFI`,builder:En,handler:async e=>d({command:`cloudforce-one requests post-request-create`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests post-request-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),metadata:m(e.metadata,`metadata`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(N,{body:t,account_id:d,project_type:e[`project-type`]}));l(r,{successLabel:`Created`});return}let f=_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),metadata:m(e.metadata,`metadata`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp},[[`metadata`]]),p=await u(`Creating`,async()=>a.send(N,{body:f,account_id:d,project_type:e[`project-type`]}));l(p,{successLabel:`Created`})})};var P={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function On(e){return e.usage(`$0 cloudforce-one requests put-request-update <request-id>
72
+ Creates a new Request for Information with the specified project type and details.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description (optional). Defaults to an empty string when omitted.`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`metadata`,{type:`string`,description:`Optional metadata fields specific to the RFI type. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use `low`, `routine`, `high`, `urgent`; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases. Defaults to `routine`.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>i(e,`priority`,`text`)).option(`request-type`,{type:`string`,description:`Optional request type for the request`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`title`,{type:`string`,description:`RFI title (optional). When omitted, the server generates a summary from the request type and readable ID.`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. Canonical values are `clear`, `green`, `amber`, `amber-strict`, `red`, `purple`. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pn={command:`post-request-create <project-type>`,describe:`Creates a new RFI`,builder:Nn,handler:async e=>d({command:`cloudforce-one requests post-request-create`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests post-request-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),metadata:m(e.metadata,`metadata`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(P,{body:t,account_id:d,project_type:e[`project-type`]}));l(r,{successLabel:`Created`});return}let f=_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),metadata:m(e.metadata,`metadata`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp},[[`metadata`]]),p=await u(`Creating`,async()=>a.send(P,{body:f,account_id:d,project_type:e[`project-type`]}));l(p,{successLabel:`Created`})})};var F={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/${e.request_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Fn(e){return e.usage(`$0 cloudforce-one requests put-request-update <request-id>
77
73
 
78
- Updates an existing RFI with the provided fields. Only provided fields will be updated.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use a distinct `low` level; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>i(e,`priority`,`text`)).option(`request-type`,{type:`string`,description:`Request type. May only be changed while the request is still open; changing it recalculates the request's token cost.`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`summary`,{type:`string`,description:`RFI summary`}).option(`title`,{type:`string`,description:`RFI title (alias for summary field)`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const kn={command:`put-request-update <request-id>`,describe:`Update an RFI`,builder:On,handler:async e=>d({command:`cloudforce-one requests put-request-update`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests put-request-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),summary:i(e.summary,`summary`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(P,{body:t,account_id:d,project_type:e[`project-type`],request_id:e[`request-id`]}));l(r,{successLabel:`Updated`});return}let f=_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),summary:i(e.summary,`summary`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp}),p=await u(`Updating`,async()=>a.send(P,{body:f,account_id:d,project_type:e[`project-type`],request_id:e[`request-id`]}));l(p,{successLabel:`Updated`})})};var An={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/quota`,response:!1,errors:{404:`NotFoundError`,422:`UnprocessableEntityError`}};function jn(e){return e.usage(`$0 cloudforce-one requests quota get <project-type>
74
+ Updates an existing RFI with the provided fields. Only provided fields will be updated.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use a distinct `low` level; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>i(e,`priority`,`text`)).option(`request-type`,{type:`string`,description:`Request type. May only be changed while the request is still open; changing it recalculates the request's token cost.`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`summary`,{type:`string`,description:`RFI summary`}).option(`title`,{type:`string`,description:`RFI title (alias for summary field)`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).coerce(`tlp`,e=>i(e,`tlp`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const In={command:`put-request-update <request-id>`,describe:`Update an RFI`,builder:Fn,handler:async e=>d({command:`cloudforce-one requests put-request-update`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests put-request-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),summary:i(e.summary,`summary`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(F,{body:t,account_id:d,project_type:e[`project-type`],request_id:e[`request-id`]}));l(r,{successLabel:`Updated`});return}let f=_({description:i(e.description,`description`,`text`),eventId:i(e[`event-id`],`event-id`,`text`),priority:e.priority,request_type:i(e[`request-type`],`request-type`,`text`),subtypeId:i(e[`subtype-id`],`subtype-id`,`text`),summary:i(e.summary,`summary`,`text`),title:i(e.title,`title`,`text`),tlp:e.tlp}),p=await u(`Updating`,async()=>a.send(F,{body:f,account_id:d,project_type:e[`project-type`],request_id:e[`request-id`]}));l(p,{successLabel:`Updated`})})};var Ln={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/quota`,response:!1,errors:{404:`NotFoundError`,422:`UnprocessableEntityError`}};function Rn(e){return e.usage(`$0 cloudforce-one requests quota get <project-type>
79
75
 
80
- Returns the account's token quota for the current anniversary quarter: total granted, used, remaining, and the quarter/anniversary boundaries.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mn={command:`get <project-type>`,describe:`Get request token quota`,builder:jn,handler:async e=>d({command:`cloudforce-one requests quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/quota`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(An,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},Nn={command:`quota`,describe:`Operations for requests.quota`,builder:e=>e.command(Mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/types`};function Fn(e){return e.usage(`$0 cloudforce-one requests types list
76
+ Returns the account's token quota for the current anniversary quarter: total granted, used, remaining, and the quarter/anniversary boundaries.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zn={command:`get <project-type>`,describe:`Get request token quota`,builder:Rn,handler:async e=>d({command:`cloudforce-one requests quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/quota`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ln,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},Bn={command:`quota`,describe:`Operations for requests.quota`,builder:e=>e.command(zn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/types`};function Hn(e){return e.usage(`$0 cloudforce-one requests types list
81
77
 
82
- Returns request types available to dashboard (external) callers. For restricted project types (e.g. legal-response), only the allowlisted subset is returned.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const In={command:`list`,describe:`List visible request types for a project (dashboard)`,builder:Fn,handler:async e=>d({command:`cloudforce-one requests types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/types`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Pn,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},Ln={command:`types`,describe:`Operations for requests.types`,builder:e=>e.command(In).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/user/me`,errors:{404:`NotFoundError`}};function zn(e){return e.usage(`$0 cloudforce-one requests user get <project-type>
78
+ Returns request types available to dashboard (external) callers. For restricted project types (e.g. legal-response), only the allowlisted subset is returned.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Un={command:`list`,describe:`List visible request types for a project (dashboard)`,builder:Hn,handler:async e=>d({command:`cloudforce-one requests types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/types`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Vn,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},Wn={command:`types`,describe:`Operations for requests.types`,builder:e=>e.command(Un).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/requests/${e.project_type}/user/me`,errors:{404:`NotFoundError`}};function Kn(e){return e.usage(`$0 cloudforce-one requests user get <project-type>
83
79
 
84
- Get the current user's profile in a specific RFI project.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bn={command:`get <project-type>`,describe:`Get current user profile`,builder:zn,handler:async e=>d({command:`cloudforce-one requests user get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/user/me`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Rn,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},Vn={command:`user`,describe:`Operations for requests.user`,builder:e=>e.command(Bn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Hn={command:`requests`,describe:`Additional request operations — priority listing and asset creation`,builder:e=>e.command(nn).command(on).command(Dn).command(kn).command(Yt).command($t).command(un).command(xn).command(Tn).command(Nn).command(Ln).command(Vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Un={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals/${e.id}/cancel`,errors:{403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Wn(e){return e.usage(`$0 cloudforce-one rules approvals cancel <id>
80
+ Get the current user's profile in a specific RFI project.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qn={command:`get <project-type>`,describe:`Get current user profile`,builder:Kn,handler:async e=>d({command:`cloudforce-one requests user get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one requests user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/user/me`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Gn,{account_id:i,project_type:e[`project-type`]}));l(a,{successLabel:`Loaded`})})},Jn={command:`user`,describe:`Operations for requests.user`,builder:e=>e.command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Yn={command:`requests`,describe:`Additional request operations — priority listing and asset creation`,builder:e=>e.command(un).command(pn).command(Pn).command(In).command(nn).command(sn).command(_n).command(On).command(Mn).command(Bn).command(Wn).command(Jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xn={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals/${e.id}/cancel`,errors:{403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Zn(e){return e.usage(`$0 cloudforce-one rules approvals cancel <id>
85
81
 
86
- Cancel a pending rule approval. Only its original requester may cancel it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gn={command:`cancel <id>`,describe:`Cancel a pending approval`,builder:Wn,handler:async e=>d({command:`cloudforce-one rules approvals cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules approvals cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/cancel`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Un,{account_id:i,id:e.id}));l(a,{successLabel:`Created`})})};var Kn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals/${e.id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function qn(e){return e.usage(`$0 cloudforce-one rules approvals get <id>
82
+ Cancel a pending rule approval. Only its original requester may cancel it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qn={command:`cancel <id>`,describe:`Cancel a pending approval`,builder:Zn,handler:async e=>d({command:`cloudforce-one rules approvals cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules approvals cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/cancel`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Xn,{account_id:i,id:e.id}));l(a,{successLabel:`Created`})})};var $n={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals/${e.id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function er(e){return e.usage(`$0 cloudforce-one rules approvals get <id>
87
83
 
88
- Get a single rule approval with current rule data.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jn={command:`get <id>`,describe:`Get rule approval details`,builder:qn,handler:async e=>d({command:`cloudforce-one rules approvals get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules approvals get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Kn,{account_id:i,id:e.id}));l(a,{successLabel:`Loaded`})})};var Yn={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals`,query:[`status`,`latest_only`,`limit`,`offset`,`reviewer_scope`,`change_type`,`rule_id`],errors:{400:`BadRequestError`,403:`ForbiddenError`}};function Xn(e){return e.usage(`$0 cloudforce-one rules approvals list
84
+ Get a single rule approval with current rule data.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tr={command:`get <id>`,describe:`Get rule approval details`,builder:er,handler:async e=>d({command:`cloudforce-one rules approvals get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules approvals get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send($n,{account_id:i,id:e.id}));l(a,{successLabel:`Loaded`})})};var nr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals`,query:[`status`,`latest_only`,`limit`,`offset`,`reviewer_scope`,`change_type`,`rule_id`],errors:{400:`BadRequestError`,403:`ForbiddenError`}};function rr(e){return e.usage(`$0 cloudforce-one rules approvals list
89
85
 
90
- Returns rule approvals with optional status, revision, reviewer-scope, and mutation-type filtering.`).option(`status`,{type:`string`,description:`Selects approval statuses. Repeat the parameter to OR-match statuses (for example, status=pending&status=rejected). Use status=all alone to disable status filtering.`,choices:[`pending`,`approved`,`rejected`,`cancelled`,`all`]}).option(`latest-only`,{type:`string`,description:`When true, returns the newest revision in each approval chain.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`reviewer-scope`,{type:`string`,description:`Limits approvals to the specified reviewer scope.`,choices:[`default`,`email`,`unresolved`]}).option(`change-type`,{type:`string`,description:`Limits approvals to the specified mutation type.`,choices:[`create`,`update`,`delete`]}).option(`rule-id`,{type:`string`,description:`Filter approvals by rule ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`list`,describe:`List rule approvals`,builder:Xn,handler:async e=>d({command:`cloudforce-one rules approvals list`,classification:{safeFlags:[`status`,`latest-only`,`reviewer-scope`,`change-type`,`dry-run`]}},e,async()=>{let n={status:e.status,latest_only:e[`latest-only`],limit:e.limit,offset:e.offset,reviewer_scope:e[`reviewer-scope`],change_type:e[`change-type`],rule_id:e[`rule-id`]};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules approvals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/approvals`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Yn,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var F={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals/${e.id}/resubmit`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Qn(e){return e.usage(`$0 cloudforce-one rules approvals resubmit <id>
86
+ Returns rule approvals with optional status, revision, reviewer-scope, and mutation-type filtering.`).option(`status`,{type:`string`,description:`Selects approval statuses. Repeat the parameter to OR-match statuses (for example, status=pending&status=rejected). Use status=all alone to disable status filtering.`,choices:[`pending`,`approved`,`rejected`,`cancelled`,`all`]}).option(`latest-only`,{type:`string`,description:`When true, returns the newest revision in each approval chain.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`reviewer-scope`,{type:`string`,description:`Limits approvals to the specified reviewer scope.`,choices:[`default`,`email`,`unresolved`]}).option(`change-type`,{type:`string`,description:`Limits approvals to the specified mutation type.`,choices:[`create`,`update`,`delete`]}).option(`rule-id`,{type:`string`,description:`Filter approvals by rule ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ir={command:`list`,describe:`List rule approvals`,builder:rr,handler:async e=>d({command:`cloudforce-one rules approvals list`,classification:{safeFlags:[`status`,`latest-only`,`reviewer-scope`,`change-type`,`dry-run`]}},e,async()=>{let n={status:e.status,latest_only:e[`latest-only`],limit:e.limit,offset:e.offset,reviewer_scope:e[`reviewer-scope`],change_type:e[`change-type`],rule_id:e[`rule-id`]};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules approvals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/approvals`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(nr,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var I={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/approvals/${e.id}/resubmit`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function ar(e){return e.usage(`$0 cloudforce-one rules approvals resubmit <id>
91
87
 
92
- Create a new pending revision from a rejected rule approval. Only the original requester may resubmit the latest revision.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`The commit_message field`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $n={command:`resubmit <id>`,describe:`Revise and resubmit a rejected approval`,builder:Qn,handler:async e=>d({command:`cloudforce-one rules approvals resubmit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resubmit`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,name:i(e.name,`name`,`text`),namespaces:e.namespaces}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(F,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Created`});return}let f=_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,name:i(e.name,`name`,`text`),namespaces:e.namespaces}),p=await u(`Creating`,async()=>a.send(F,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Created`})})},er={command:`approvals`,describe:`Approval workflow operations`,builder:e=>e.command(Gn).command(Jn).command(Zn).command($n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`}};function tr(e){return e.usage(`$0 cloudforce-one rules create
88
+ Create a new pending revision from a rejected rule approval. Only the original requester may resubmit the latest revision.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`The commit_message field`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const or={command:`resubmit <id>`,describe:`Revise and resubmit a rejected approval`,builder:ar,handler:async e=>d({command:`cloudforce-one rules approvals resubmit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resubmit`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,name:i(e.name,`name`,`text`),namespaces:e.namespaces}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(I,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Created`});return}let f=_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,name:i(e.name,`name`,`text`),namespaces:e.namespaces}),p=await u(`Creating`,async()=>a.send(I,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Created`})})},sr={command:`approvals`,describe:`Approval workflow operations`,builder:e=>e.command(Qn).command(tr).command(ir).command(or).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`}};function cr(e){return e.usage(`$0 cloudforce-one rules create
93
89
 
94
- Create a new detection rule.`).option(`actions`,{type:`string`,description:`The actions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"action_config": {...}, "action_type": "alert_gchat" | "webhook" | "logging" | ...more, "enabled"?: boolean}]. ? marks optional keys.`}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`,default:!0}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`,default:!1}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`Optional WfP deployment tags (customer rules only). Internal rules leave empty.`}).option(`path`,{type:`string`,description:`The path field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nr={command:`create`,describe:`Create a rule`,builder:tr,handler:async e=>d({command:`cloudforce-one rules create`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({actions:h(e.actions,`actions`),commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(I,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.content===void 0&&(e.content=await v(`content`,`The content field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`)),e.path===void 0&&(e.path=await v(`path`,`The path field`));let f=_({actions:h(e.actions,`actions`),commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}),p=await u(`Creating`,async()=>a.send(I,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var rr={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules`,errors:{401:`UnauthorizedError`,409:`ConflictError`}};function ir(e){return e.usage(`$0 cloudforce-one rules delete-all
90
+ Create a new detection rule.`).option(`actions`,{type:`string`,description:`The actions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"action_config": {...}, "action_type": "alert_gchat" | "webhook" | "logging" | ...more, "enabled"?: boolean}]. ? marks optional keys.`}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`,default:!0}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`,default:!1}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`Optional WfP deployment tags (customer rules only). Internal rules leave empty.`}).option(`path`,{type:`string`,description:`The path field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const lr={command:`create`,describe:`Create a rule`,builder:cr,handler:async e=>d({command:`cloudforce-one rules create`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({actions:h(e.actions,`actions`),commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(L,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.content===void 0&&(e.content=await v(`content`,`The content field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`)),e.path===void 0&&(e.path=await v(`path`,`The path field`));let f=_({actions:h(e.actions,`actions`),commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}),p=await u(`Creating`,async()=>a.send(L,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var ur={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules`,errors:{401:`UnauthorizedError`,409:`ConflictError`}};function dr(e){return e.usage(`$0 cloudforce-one rules delete-all
95
91
 
96
- Delete all rules in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ar={command:`delete-all`,describe:`Delete all rules`,builder:ir,handler:async e=>d({command:`cloudforce-one rules delete-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules delete-all`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(rr,{account_id:i}));l(a,{successLabel:`Deleted`})})};var L={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/${e.id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function or(e){return e.usage(`$0 cloudforce-one rules delete <id>
92
+ Delete all rules in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fr={command:`delete-all`,describe:`Delete all rules`,builder:dr,handler:async e=>d({command:`cloudforce-one rules delete-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules delete-all`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(ur,{account_id:i}));l(a,{successLabel:`Deleted`})})};var R={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/${e.id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function pr(e){return e.usage(`$0 cloudforce-one rules delete <id>
97
93
 
98
- Delete an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for the deletion. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const sr={command:`delete <id>`,describe:`Delete a rule`,builder:or,handler:async e=>d({command:`cloudforce-one rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({commit_message:i(e[`commit-message`],`commit-message`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,!await b({force:!!e.force}))return;if(e.body!==void 0){let t=n,r=await u(`Deleting`,async()=>a.send(L,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Deleted`});return}let f=_({commit_message:i(e[`commit-message`],`commit-message`,`text`)}),p=await u(`Deleting`,async()=>a.send(L,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Deleted`})})};var R={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/approvals/${e.id}/resubmit`,query:[`module`],body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function cr(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
94
+ Delete an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for the deletion. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const mr={command:`delete <id>`,describe:`Delete a rule`,builder:pr,handler:async e=>d({command:`cloudforce-one rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({commit_message:i(e[`commit-message`],`commit-message`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,!await b({force:!!e.force}))return;if(e.body!==void 0){let t=n,r=await u(`Deleting`,async()=>a.send(R,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Deleted`});return}let f=_({commit_message:i(e[`commit-message`],`commit-message`,`text`)}),p=await u(`Deleting`,async()=>a.send(R,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Deleted`})})};var z={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/approvals/${e.id}/resubmit`,query:[`module`],body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function hr(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
99
95
 
100
- Validates and compiles a complete structured email rule, then creates an immutable pending revision of its rejected approval.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const lr={command:`resubmit <id>`,describe:`Revise and resubmit a rejected structured email rule approval`,builder:cr,handler:async e=>d({command:`cloudforce-one rules email approvals resubmit`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{let n={module:e.module};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resubmit`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>d.send(R,{body:t,account_id:f,id:e.id,...n}));l(r,{successLabel:`Created`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let p=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let m=await u(`Creating`,async()=>d.send(R,{body:p,account_id:f,id:e.id,...n}));l(m,{successLabel:`Created`})})},ur={command:`approvals`,describe:`Operations for rules.email.approvals`,builder:e=>e.command(lr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`}};function dr(e){return e.usage(`$0 cloudforce-one rules email create
96
+ Validates and compiles a complete structured email rule, then creates an immutable pending revision of its rejected approval.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gr={command:`resubmit <id>`,describe:`Revise and resubmit a rejected structured email rule approval`,builder:hr,handler:async e=>d({command:`cloudforce-one rules email approvals resubmit`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{let n={module:e.module};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resubmit`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>d.send(z,{body:t,account_id:f,id:e.id,...n}));l(r,{successLabel:`Created`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let p=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let m=await u(`Creating`,async()=>d.send(z,{body:p,account_id:f,id:e.id,...n}));l(m,{successLabel:`Created`})})},_r={command:`approvals`,describe:`Operations for rules.email.approvals`,builder:e=>e.command(gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`}};function vr(e){return e.usage(`$0 cloudforce-one rules email create
101
97
 
102
- Create a structured email rule.`).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fr={command:`create`,describe:`Create an email rule`,builder:dr,handler:async e=>d({command:`cloudforce-one rules email create`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(z,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}),p=await u(`Creating`,async()=>a.send(z,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var pr={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function mr(e){return e.usage(`$0 cloudforce-one rules email delete <id>
98
+ Create a structured email rule.`).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yr={command:`create`,describe:`Create an email rule`,builder:vr,handler:async e=>d({command:`cloudforce-one rules email create`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(B,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}),p=await u(`Creating`,async()=>a.send(B,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var br={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function xr(e){return e.usage(`$0 cloudforce-one rules email delete <id>
103
99
 
104
- Delete an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hr={command:`delete <id>`,describe:`Delete an email rule`,builder:mr,handler:async e=>d({command:`cloudforce-one rules email delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(pr,{account_id:i,id:e.id}));l(a,{successLabel:`Deleted`})})};var gr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function _r(e){return e.usage(`$0 cloudforce-one rules email get <id>
100
+ Delete an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Sr={command:`delete <id>`,describe:`Delete an email rule`,builder:xr,handler:async e=>d({command:`cloudforce-one rules email delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(br,{account_id:i,id:e.id}));l(a,{successLabel:`Deleted`})})};var Cr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function wr(e){return e.usage(`$0 cloudforce-one rules email get <id>
105
101
 
106
- Get a structured email rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vr={command:`get <id>`,describe:`Get an email rule`,builder:_r,handler:async e=>d({command:`cloudforce-one rules email get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(gr,{account_id:i,id:e.id}));l(a,{successLabel:`Loaded`})})};var yr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured`,query:[`limit`,`offset`,`search`],errors:{400:`BadRequestError`}};function br(e){return e.usage(`$0 cloudforce-one rules email list
102
+ Get a structured email rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tr={command:`get <id>`,describe:`Get an email rule`,builder:wr,handler:async e=>d({command:`cloudforce-one rules email get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Cr,{account_id:i,id:e.id}));l(a,{successLabel:`Loaded`})})};var Er={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured`,query:[`limit`,`offset`,`search`],errors:{400:`BadRequestError`}};function Dr(e){return e.usage(`$0 cloudforce-one rules email list
107
103
 
108
- Returns structured email rules.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xr={command:`list`,describe:`List email rules`,builder:br,handler:async e=>d({command:`cloudforce-one rules email list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset,search:e.search};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules email list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(yr,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Sr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/schema`,errors:{400:`BadRequestError`}};function Cr(e){return e.usage(`$0 cloudforce-one rules email schema get
104
+ Returns structured email rules.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Or={command:`list`,describe:`List email rules`,builder:Dr,handler:async e=>d({command:`cloudforce-one rules email list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset,search:e.search};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules email list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Er,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var kr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/schema`,errors:{400:`BadRequestError`}};function Ar(e){return e.usage(`$0 cloudforce-one rules email schema get
109
105
 
110
- Get the field catalog for structured email rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wr={command:`get`,describe:`Get email rule schema`,builder:Cr,handler:async e=>d({command:`cloudforce-one rules email schema get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules email schema get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/schema`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Sr,{account_id:i}));l(a,{successLabel:`Loaded`})})},Tr={command:`schema`,describe:`Operations for rules.email.schema`,builder:e=>e.command(wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}/test`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Er(e){return e.usage(`$0 cloudforce-one rules email test <id>
106
+ Get the field catalog for structured email rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jr={command:`get`,describe:`Get email rule schema`,builder:Ar,handler:async e=>d({command:`cloudforce-one rules email schema get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules email schema get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/schema`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(kr,{account_id:i}));l(a,{successLabel:`Loaded`})})},Mr={command:`schema`,describe:`Operations for rules.email.schema`,builder:e=>e.command(jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}/test`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Nr(e){return e.usage(`$0 cloudforce-one rules email test <id>
111
107
 
112
- Test a structured email rule against sample email JSON.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`sample-json`,{type:`string`,description:`The sample_json field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Dr={command:`test <id>`,describe:`Test an email rule`,builder:Er,handler:async e=>d({command:`cloudforce-one rules email test`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/test`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({sample_json:i(e[`sample-json`],`sample-json`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(B,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Created`});return}e[`sample-json`]===void 0&&(e[`sample-json`]=await v(`sample-json`,`The sample_json field`));let f=_({sample_json:i(e[`sample-json`],`sample-json`,`text`)}),p=await u(`Creating`,async()=>a.send(B,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Created`})})};var V={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/approvals/${e.id}`,query:[`module`],body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Or(e){return e.usage(`$0 cloudforce-one rules email update-pending-approval <id>
108
+ Test a structured email rule against sample email JSON.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`sample-json`,{type:`string`,description:`The sample_json field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pr={command:`test <id>`,describe:`Test an email rule`,builder:Nr,handler:async e=>d({command:`cloudforce-one rules email test`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/test`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({sample_json:i(e[`sample-json`],`sample-json`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(V,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Created`});return}e[`sample-json`]===void 0&&(e[`sample-json`]=await v(`sample-json`,`The sample_json field`));let f=_({sample_json:i(e[`sample-json`],`sample-json`,`text`)}),p=await u(`Creating`,async()=>a.send(V,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Created`})})};var H={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/approvals/${e.id}`,query:[`module`],body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Fr(e){return e.usage(`$0 cloudforce-one rules email update-pending-approval <id>
113
109
 
114
- Validate, compile, and replace the proposed structured email rule on a pending approval. Only the original requester may update it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const kr={command:`update-pending-approval <id>`,describe:`Update a pending structured email rule approval`,builder:Or,handler:async e=>d({command:`cloudforce-one rules email update-pending-approval`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{let n={module:e.module};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email update-pending-approval`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Updating`,async()=>d.send(V,{body:t,account_id:f,id:e.id,...n}));l(r,{successLabel:`Updated`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let p=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let m=await u(`Updating`,async()=>d.send(V,{body:p,account_id:f,id:e.id,...n}));l(m,{successLabel:`Updated`})})};var H={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function Ar(e){return e.usage(`$0 cloudforce-one rules email update <id>
110
+ Validate, compile, and replace the proposed structured email rule on a pending approval. Only the original requester may update it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ir={command:`update-pending-approval <id>`,describe:`Update a pending structured email rule approval`,builder:Fr,handler:async e=>d({command:`cloudforce-one rules email update-pending-approval`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{let n={module:e.module};if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email update-pending-approval`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Updating`,async()=>d.send(H,{body:t,account_id:f,id:e.id,...n}));l(r,{successLabel:`Updated`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let p=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let m=await u(`Updating`,async()=>d.send(H,{body:p,account_id:f,id:e.id,...n}));l(m,{successLabel:`Updated`})})};var U={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/${e.id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function Lr(e){return e.usage(`$0 cloudforce-one rules email update <id>
115
111
 
116
- Updates an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`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=>{let t=[`condition-conditions`,`condition-operator`,`condition-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`condition-conditions`,`condition-operator`,`condition-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --condition-* flag is set`)}return!0})}const jr={command:`update <id>`,describe:`Update an email rule`,builder:Ar,handler:async e=>d({command:`cloudforce-one rules email update`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(H,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Updated`});return}let f=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}),p=await u(`Updating`,async()=>a.send(H,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Updated`})})};var U={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/validate`,body:`json`,errors:{400:`BadRequestError`}};function Mr(e){return e.usage(`$0 cloudforce-one rules email validate
112
+ Updates an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`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=>{let t=[`condition-conditions`,`condition-operator`,`condition-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`condition-conditions`,`condition-operator`,`condition-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --condition-* flag is set`)}return!0})}const Rr={command:`update <id>`,describe:`Update an email rule`,builder:Lr,handler:async e=>d({command:`cloudforce-one rules email update`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(U,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Updated`});return}let f=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}),p=await u(`Updating`,async()=>a.send(U,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Updated`})})};var W={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/structured/validate`,body:`json`,errors:{400:`BadRequestError`}};function zr(e){return e.usage(`$0 cloudforce-one rules email validate
117
113
 
118
- Validates structured email rule syntax and metadata.`).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`existing-rule-id`,{type:`string`,description:`Existing rule ID to exclude from duplicate-name checks when validating an update.`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Nr={command:`validate`,describe:`Validate an email rule`,builder:Mr,handler:async e=>d({command:`cloudforce-one rules email validate`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,existing_rule_id:i(e[`existing-rule-id`],`existing-rule-id`,`text`),meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Validating`,async()=>a.send(U,{body:e,account_id:d}));l(t,{successLabel:`Validated`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,existing_rule_id:i(e[`existing-rule-id`],`existing-rule-id`,`text`),meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}),p=await u(`Validating`,async()=>a.send(U,{body:f,account_id:d}));l(p,{successLabel:`Validated`})})},Pr={command:`email`,describe:`Email rule operations`,builder:e=>e.command(fr).command(hr).command(vr).command(xr).command(Dr).command(jr).command(kr).command(Nr).command(ur).command(Tr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Fr(e){return e.usage(`$0 cloudforce-one rules exemptions create
114
+ Validates structured email rule syntax and metadata.`).option(`condition-conditions`,{type:`string`,description:`The condition.conditions field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": string, "operator": "==" | "!=" | ">" | ...more, "type": "scalar", "value": (string | number | boolean)} | {"conditions": [{...}], "field": string, "type": "array", "quantifier"?: "any" | "all"} | ...more)]. ? marks optional keys.`}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>i(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>i(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`existing-rule-id`,{type:`string`,description:`Existing rule ID to exclude from duplicate-name checks when validating an update.`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>i(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"identifier": string, "type": "string_match", "value": string, "match_type"?: "text" | "hex" | "regex", "modifiers"?: ["nocase" | "wide" | "ascii" | ...more]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Br={command:`validate`,describe:`Validate an email rule`,builder:zr,handler:async e=>d({command:`cloudforce-one rules email validate`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules email validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,existing_rule_id:i(e[`existing-rule-id`],`existing-rule-id`,`text`),meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Validating`,async()=>a.send(W,{body:e,account_id:d}));l(t,{successLabel:`Validated`});return}if(e[`condition-conditions`]===void 0)throw Error(`--condition-conditions is required (or pass --body with this field set).`);e[`condition-operator`]===void 0&&(e[`condition-operator`]=await y(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await y(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({condition:{conditions:h(e[`condition-conditions`],`condition-conditions`),operator:e[`condition-operator`],type:e[`condition-type`]},description:i(e.description,`description`,`text`),enabled:e.enabled,existing_rule_id:i(e[`existing-rule-id`],`existing-rule-id`,`text`),meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),status:e.status,strings:h(e.strings,`strings`)}),p=await u(`Validating`,async()=>a.send(W,{body:f,account_id:d}));l(p,{successLabel:`Validated`})})},Vr={command:`email`,describe:`Email rule operations`,builder:e=>e.command(yr).command(Sr).command(Tr).command(Or).command(Pr).command(Rr).command(Ir).command(Br).command(_r).command(Mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Hr(e){return e.usage(`$0 cloudforce-one rules exemptions create
119
115
 
120
- Add regex patterns to per-account exemption rules (union semantics). Missing keys leave that type untouched; duplicates are silently deduped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ir={command:`create`,describe:`Add patterns to exemption rules`,builder:Fr,handler:async e=>d({command:`cloudforce-one rules exemptions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules exemptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>i.send(W,{body:e,account_id:a}));l(t,{successLabel:`Created`});return}let d=_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}),f=await u(`Creating`,async()=>i.send(W,{body:d,account_id:a}));l(f,{successLabel:`Created`})})};var G={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Lr(e){return e.usage(`$0 cloudforce-one rules exemptions delete
116
+ Add regex patterns to per-account exemption rules (union semantics). Missing keys leave that type untouched; duplicates are silently deduped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ur={command:`create`,describe:`Add patterns to exemption rules`,builder:Hr,handler:async e=>d({command:`cloudforce-one rules exemptions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules exemptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>i.send(G,{body:e,account_id:a}));l(t,{successLabel:`Created`});return}let d=_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}),f=await u(`Creating`,async()=>i.send(G,{body:d,account_id:a}));l(f,{successLabel:`Created`})})};var K={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Wr(e){return e.usage(`$0 cloudforce-one rules exemptions delete
121
117
 
122
- Remove regex patterns from per-account exemption rules. Missing keys leave that type untouched; non-existent patterns are silently skipped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Rr={command:`delete`,describe:`Remove patterns from exemption rules`,builder:Lr,handler:async e=>d({command:`cloudforce-one rules exemptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules exemptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;if(e.body!==void 0){let e=n,t=await u(`Deleting`,async()=>i.send(G,{body:e,account_id:a}));l(t,{successLabel:`Deleted`});return}let d=_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}),f=await u(`Deleting`,async()=>i.send(G,{body:d,account_id:a}));l(f,{successLabel:`Deleted`})})};var zr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Br(e){return e.usage(`$0 cloudforce-one rules exemptions get
118
+ Remove regex patterns from per-account exemption rules. Missing keys leave that type untouched; non-existent patterns are silently skipped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Gr={command:`delete`,describe:`Remove patterns from exemption rules`,builder:Wr,handler:async e=>d({command:`cloudforce-one rules exemptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules exemptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;if(e.body!==void 0){let e=n,t=await u(`Deleting`,async()=>i.send(K,{body:e,account_id:a}));l(t,{successLabel:`Deleted`});return}let d=_({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}),f=await u(`Deleting`,async()=>i.send(K,{body:d,account_id:a}));l(f,{successLabel:`Deleted`})})};var Kr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function qr(e){return e.usage(`$0 cloudforce-one rules exemptions get
123
119
 
124
- Get all exemption rule patterns for the account, grouped by type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vr={command:`get`,describe:`Get exemption rules for an account`,builder:Br,handler:async e=>d({command:`cloudforce-one rules exemptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules exemptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(zr,{account_id:i}));l(a,{successLabel:`Loaded`})})};var K={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Hr(e){return e.usage(`$0 cloudforce-one rules exemptions update
120
+ Get all exemption rule patterns for the account, grouped by type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jr={command:`get`,describe:`Get exemption rules for an account`,builder:qr,handler:async e=>d({command:`cloudforce-one rules exemptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules exemptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Kr,{account_id:i}));l(a,{successLabel:`Loaded`})})};var q={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Yr(e){return e.usage(`$0 cloudforce-one rules exemptions update
125
121
 
126
- Replace existing exemption patterns with new values. Each key maps to an array of {old_pattern, new_pattern} entries. Missing keys leave that type untouched. Fails if any old pattern is not found or any new pattern already exists.`).option(`namespace`,{type:`string`,description:`The namespace field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"new_pattern": string, "old_pattern": string}].`}).option(`tag-match`,{type:`string`,description:`The tag_match field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"new_pattern": string, "old_pattern": string}].`}).option(`worker-name`,{type:`string`,description:`The worker_name field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"new_pattern": string, "old_pattern": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ur={command:`update`,describe:`Update exemption rule patterns`,builder:Hr,handler:async e=>d({command:`cloudforce-one rules exemptions update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules exemptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({namespace:h(e.namespace,`namespace`),tag_match:h(e[`tag-match`],`tag-match`),worker_name:h(e[`worker-name`],`worker-name`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>i.send(K,{body:e,account_id:a}));l(t,{successLabel:`Updated`});return}let d=_({namespace:h(e.namespace,`namespace`),tag_match:h(e[`tag-match`],`tag-match`),worker_name:h(e[`worker-name`],`worker-name`)}),f=await u(`Updating`,async()=>i.send(K,{body:d,account_id:a}));l(f,{successLabel:`Updated`})})},Wr={command:`exemptions`,describe:`Exemption rule operations`,builder:e=>e.command(Ir).command(Rr).command(Vr).command(Ur).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/${e.id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Kr(e){return e.usage(`$0 cloudforce-one rules get <id>
122
+ Replace existing exemption patterns with new values. Each key maps to an array of {old_pattern, new_pattern} entries. Missing keys leave that type untouched. Fails if any old pattern is not found or any new pattern already exists.`).option(`namespace`,{type:`string`,description:`The namespace field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"new_pattern": string, "old_pattern": string}].`}).option(`tag-match`,{type:`string`,description:`The tag_match field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"new_pattern": string, "old_pattern": string}].`}).option(`worker-name`,{type:`string`,description:`The worker_name field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"new_pattern": string, "old_pattern": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xr={command:`update`,describe:`Update exemption rule patterns`,builder:Yr,handler:async e=>d({command:`cloudforce-one rules exemptions update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules exemptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({namespace:h(e.namespace,`namespace`),tag_match:h(e[`tag-match`],`tag-match`),worker_name:h(e[`worker-name`],`worker-name`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>i.send(q,{body:e,account_id:a}));l(t,{successLabel:`Updated`});return}let d=_({namespace:h(e.namespace,`namespace`),tag_match:h(e[`tag-match`],`tag-match`),worker_name:h(e[`worker-name`],`worker-name`)}),f=await u(`Updating`,async()=>i.send(q,{body:d,account_id:a}));l(f,{successLabel:`Updated`})})},Zr={command:`exemptions`,describe:`Exemption rule operations`,builder:e=>e.command(Ur).command(Gr).command(Jr).command(Xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/${e.id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function $r(e){return e.usage(`$0 cloudforce-one rules get <id>
127
123
 
128
- Get a single rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qr={command:`get <id>`,describe:`Get a rule`,builder:Kr,handler:async e=>d({command:`cloudforce-one rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Gr,{account_id:i,id:e.id}));l(a,{successLabel:`Loaded`})})};var Jr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules`,query:[`namespace`,`path`,`recursive`,`search`,`is_public`,`limit`,`offset`],errors:{401:`UnauthorizedError`}};function Yr(e){return e.usage(`$0 cloudforce-one rules list
124
+ Get a single rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ei={command:`get <id>`,describe:`Get a rule`,builder:$r,handler:async e=>d({command:`cloudforce-one rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Qr,{account_id:i,id:e.id}));l(a,{successLabel:`Loaded`})})};var ti={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules`,query:[`namespace`,`path`,`recursive`,`search`,`is_public`,`limit`,`offset`],errors:{401:`UnauthorizedError`}};function ni(e){return e.usage(`$0 cloudforce-one rules list
129
125
 
130
- Returns all rules for an account with optional filtering.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xr={command:`list`,describe:`List rules`,builder:Yr,handler:async e=>d({command:`cloudforce-one rules list`,classification:{safeFlags:[`recursive`,`is-public`,`dry-run`]}},e,async()=>{let n={namespace:e.namespace,path:e.path,recursive:e.recursive,search:e.search,is_public:e[`is-public`],limit:e.limit,offset:e.offset};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Jr,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Zr={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/managed`,errors:{401:`UnauthorizedError`}};function Qr(e){return e.usage(`$0 cloudforce-one rules managed get
126
+ Returns all rules for an account with optional filtering.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ri={command:`list`,describe:`List rules`,builder:ni,handler:async e=>d({command:`cloudforce-one rules list`,classification:{safeFlags:[`recursive`,`is-public`,`dry-run`]}},e,async()=>{let n={namespace:e.namespace,path:e.path,recursive:e.recursive,search:e.search,is_public:e[`is-public`],limit:e.limit,offset:e.offset};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ti,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var ii={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/managed`,errors:{401:`UnauthorizedError`}};function ai(e){return e.usage(`$0 cloudforce-one rules managed get
131
127
 
132
- Get DFP managed rule metadata (name and description) from YARA rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $r={command:`get`,describe:`Get managed rules`,builder:Qr,handler:async e=>d({command:`cloudforce-one rules managed get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/managed`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Zr,{account_id:i}));l(a,{successLabel:`Loaded`})})},ei={command:`managed`,describe:`Managed rule operations`,builder:e=>e.command($r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ti={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/search`,query:[`namespace`,`path`,`recursive`,`search`,`is_public`,`limit`,`offset`,`query`,`mode`,`language`],errors:{401:`UnauthorizedError`,503:`ServiceUnavailableError`}};function ni(e){return e.usage(`$0 cloudforce-one rules search
128
+ Get DFP managed rule metadata (name and description) from YARA rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oi={command:`get`,describe:`Get managed rules`,builder:ai,handler:async e=>d({command:`cloudforce-one rules managed get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/managed`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ii,{account_id:i}));l(a,{successLabel:`Loaded`})})},si={command:`managed`,describe:`Managed rule operations`,builder:e=>e.command(oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ci={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/search`,query:[`namespace`,`path`,`recursive`,`search`,`is_public`,`limit`,`offset`,`query`,`mode`,`language`],errors:{401:`UnauthorizedError`,503:`ServiceUnavailableError`}};function li(e){return e.usage(`$0 cloudforce-one rules search
133
129
 
134
- Search rules using hybrid, vector, keyword, or exact retrieval, backed by AI Search with a SQL fallback.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`query`,{type:`string`,description:`Natural-language or keyword search query.`,demandOption:!0}).option(`search-mode`,{type:`string`,description:`Retrieval strategy used for the query.`,choices:[`exact`,`hybrid`,`vector`,`keyword`]}).option(`language`,{type:`string`,description:`Limits results to the specified rule language.`,choices:[`yara`,`js`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ri={command:`search`,describe:`Search rules`,builder:ni,handler:async e=>d({command:`cloudforce-one rules search`,classification:{safeFlags:[`recursive`,`is-public`,`search-mode`,`language`,`dry-run`]}},e,async()=>{let n={namespace:e.namespace,path:e.path,recursive:e.recursive,search:e.search,is_public:e[`is-public`],limit:e.limit,offset:e.offset,query:e.query,mode:e[`search-mode`],language:e.language};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/search`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ti,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var ii={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/stats`,errors:{401:`UnauthorizedError`}};function ai(e){return e.usage(`$0 cloudforce-one rules stats get
130
+ Search rules using hybrid, vector, keyword, or exact retrieval, backed by AI Search with a SQL fallback.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`query`,{type:`string`,description:`Natural-language or keyword search query.`,demandOption:!0}).option(`search-mode`,{type:`string`,description:`Retrieval strategy used for the query.`,choices:[`exact`,`hybrid`,`vector`,`keyword`]}).option(`language`,{type:`string`,description:`Limits results to the specified rule language.`,choices:[`yara`,`js`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ui={command:`search`,describe:`Search rules`,builder:li,handler:async e=>d({command:`cloudforce-one rules search`,classification:{safeFlags:[`recursive`,`is-public`,`search-mode`,`language`,`dry-run`]}},e,async()=>{let n={namespace:e.namespace,path:e.path,recursive:e.recursive,search:e.search,is_public:e[`is-public`],limit:e.limit,offset:e.offset,query:e.query,mode:e[`search-mode`],language:e.language};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/search`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ci,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var di={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/stats`,errors:{401:`UnauthorizedError`}};function fi(e){return e.usage(`$0 cloudforce-one rules stats get
135
131
 
136
- Get statistics about rules for the dashboard.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oi={command:`get`,describe:`Get dashboard stats`,builder:ai,handler:async e=>d({command:`cloudforce-one rules stats get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules stats get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/stats`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ii,{account_id:i}));l(a,{successLabel:`Loaded`})})},si={command:`stats`,describe:`Rule statistics operations`,builder:e=>e.command(oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ci={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/tree`,errors:{401:`UnauthorizedError`}};function li(e){return e.usage(`$0 cloudforce-one rules tree get
132
+ Get statistics about rules for the dashboard.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pi={command:`get`,describe:`Get dashboard stats`,builder:fi,handler:async e=>d({command:`cloudforce-one rules stats get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules stats get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/stats`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(di,{account_id:i}));l(a,{successLabel:`Loaded`})})},mi={command:`stats`,describe:`Rule statistics operations`,builder:e=>e.command(pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var hi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/tree`,errors:{401:`UnauthorizedError`}};function gi(e){return e.usage(`$0 cloudforce-one rules tree get
137
133
 
138
- Get the folder tree structure for rules navigation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ui={command:`get`,describe:`Get folder tree structure`,builder:li,handler:async e=>d({command:`cloudforce-one rules tree get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules tree get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/tree`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ci,{account_id:i}));l(a,{successLabel:`Loaded`})})},di={command:`tree`,describe:`Rule navigation tree operations`,builder:e=>e.command(ui).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/${e.id}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function fi(e){return e.usage(`$0 cloudforce-one rules update <id>
134
+ Get the folder tree structure for rules navigation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _i={command:`get`,describe:`Get folder tree structure`,builder:gi,handler:async e=>d({command:`cloudforce-one rules tree get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one rules tree get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/tree`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(hi,{account_id:i}));l(a,{successLabel:`Loaded`})})},vi={command:`tree`,describe:`Rule navigation tree operations`,builder:e=>e.command(_i).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/${e.id}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function yi(e){return e.usage(`$0 cloudforce-one rules update <id>
139
135
 
140
- Updates an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`Path change goes through approval workflow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pi={command:`update <id>`,describe:`Update a rule`,builder:fi,handler:async e=>d({command:`cloudforce-one rules update`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(q,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Updated`});return}let f=_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}),p=await u(`Updating`,async()=>a.send(q,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Updated`})})};var J={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/validate`,body:`json`,errors:{401:`UnauthorizedError`}};function mi(e){return e.usage(`$0 cloudforce-one rules validate
136
+ Updates an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"key": string, "value": (string | number | boolean)}].`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`Path change goes through approval workflow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const bi={command:`update <id>`,describe:`Update a rule`,builder:yi,handler:async e=>d({command:`cloudforce-one rules update`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(J,{body:t,account_id:d,id:e.id}));l(r,{successLabel:`Updated`});return}let f=_({commit_message:i(e[`commit-message`],`commit-message`,`text`),content:i(e.content,`content`,`text`),description:i(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:h(e.meta,`meta`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}),p=await u(`Updating`,async()=>a.send(J,{body:f,account_id:d,id:e.id}));l(p,{successLabel:`Updated`})})};var Y={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/rules/validate`,body:`json`,errors:{401:`UnauthorizedError`}};function xi(e){return e.usage(`$0 cloudforce-one rules validate
141
137
 
142
- Validates rule syntax, name uniqueness, namespace, and metadata.`).option(`content`,{type:`string`,description:`The content field`}).option(`exclude-rule-id`,{type:`string`,description:`The excludeRuleId field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`The path field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const hi={command:`validate`,describe:`Validate rule with context`,builder:mi,handler:async e=>d({command:`cloudforce-one rules validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({content:i(e.content,`content`,`text`),excludeRuleId:i(e[`exclude-rule-id`],`exclude-rule-id`,`text`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Validating`,async()=>a.send(J,{body:e,account_id:d}));l(t,{successLabel:`Validated`});return}e.content===void 0&&(e.content=await v(`content`,`The content field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({content:i(e.content,`content`,`text`),excludeRuleId:i(e[`exclude-rule-id`],`exclude-rule-id`,`text`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}),p=await u(`Validating`,async()=>a.send(J,{body:f,account_id:d}));l(p,{successLabel:`Validated`})})},gi={command:`rules`,describe:`Rule management operations`,builder:e=>e.command(nr).command(sr).command(ar).command(qr).command(Xr).command(ri).command(pi).command(hi).command(er).command(Pr).command(Wr).command(ei).command(si).command(di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config`,body:`json`};function _i(e){return e.usage(`$0 cloudforce-one scans config create
138
+ Validates rule syntax, name uniqueness, namespace, and metadata.`).option(`content`,{type:`string`,description:`The content field`}).option(`exclude-rule-id`,{type:`string`,description:`The excludeRuleId field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`The path field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Si={command:`validate`,describe:`Validate rule with context`,builder:xi,handler:async e=>d({command:`cloudforce-one rules validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one rules validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({content:i(e.content,`content`,`text`),excludeRuleId:i(e[`exclude-rule-id`],`exclude-rule-id`,`text`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Validating`,async()=>a.send(Y,{body:e,account_id:d}));l(t,{successLabel:`Validated`});return}e.content===void 0&&(e.content=await v(`content`,`The content field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({content:i(e.content,`content`,`text`),excludeRuleId:i(e[`exclude-rule-id`],`exclude-rule-id`,`text`),name:i(e.name,`name`,`text`),namespaces:e.namespaces,path:i(e.path,`path`,`text`)}),p=await u(`Validating`,async()=>a.send(Y,{body:f,account_id:d}));l(p,{successLabel:`Validated`})})},Ci={command:`rules`,describe:`Rule management operations`,builder:e=>e.command(lr).command(mr).command(fr).command(ei).command(ri).command(ui).command(bi).command(Si).command(sr).command(Vr).command(Zr).command(si).command(mi).command(vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config`,body:`json`};function wi(e){return e.usage(`$0 cloudforce-one scans config create
143
139
 
144
- Creates a new scan configuration for Cloudforce One's network scanning service.`).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const vi={command:`create`,describe:`Create a new Scan Config`,builder:_i,handler:async e=>d({command:`cloudforce-one scans config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({frequency:e.frequency,ips:e.ips,ports:e.ports}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>i.send(Y,{body:e,account_id:a}));l(t,{successLabel:`Created`});return}if(e.ips===void 0)throw Error(`--ips is required (or pass --body with this field set).`);let d=_({frequency:e.frequency,ips:e.ips,ports:e.ports}),f=await u(`Creating`,async()=>i.send(Y,{body:d,account_id:a}));l(f,{successLabel:`Created`})})};var yi={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config/${e.config_id}`};function bi(e){return e.usage(`$0 cloudforce-one scans config delete <config-id>
140
+ Creates a new scan configuration for Cloudforce One's network scanning service.`).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ti={command:`create`,describe:`Create a new Scan Config`,builder:wi,handler:async e=>d({command:`cloudforce-one scans config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({frequency:e.frequency,ips:e.ips,ports:e.ports}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>i.send(X,{body:e,account_id:a}));l(t,{successLabel:`Created`});return}if(e.ips===void 0)throw Error(`--ips is required (or pass --body with this field set).`);let d=_({frequency:e.frequency,ips:e.ips,ports:e.ports}),f=await u(`Creating`,async()=>i.send(X,{body:d,account_id:a}));l(f,{successLabel:`Created`})})};var Ei={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config/${e.config_id}`};function Di(e){return e.usage(`$0 cloudforce-one scans config delete <config-id>
145
141
 
146
- Deletes a scan configuration from Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const xi={command:`delete <config-id>`,describe:`Delete a Scan Config`,builder:bi,handler:async e=>d({command:`cloudforce-one scans config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(yi,{account_id:i,config_id:e[`config-id`]}));l(a,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config/${e.config_id}`,body:`json`};function Si(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
142
+ Deletes a scan configuration from Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oi={command:`delete <config-id>`,describe:`Delete a Scan Config`,builder:Di,handler:async e=>d({command:`cloudforce-one scans config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Ei,{account_id:i,config_id:e[`config-id`]}));l(a,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config/${e.config_id}`,body:`json`};function ki(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
147
143
 
148
- Updates an existing scan configuration in Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ci={command:`edit <config-id>`,describe:`Update an existing Scan Config`,builder:Si,handler:async e=>d({command:`cloudforce-one scans config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({frequency:e.frequency,ips:e.ips,ports:e.ports}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(X,{body:t,account_id:a,config_id:e[`config-id`]}));l(r,{successLabel:`Updated`});return}let d=_({frequency:e.frequency,ips:e.ips,ports:e.ports}),f=await u(`Updating`,async()=>i.send(X,{body:d,account_id:a,config_id:e[`config-id`]}));l(f,{successLabel:`Updated`})})};var wi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config`};function Ti(e){return e.usage(`$0 cloudforce-one scans config list
144
+ Updates an existing scan configuration in Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ai={command:`edit <config-id>`,describe:`Update an existing Scan Config`,builder:ki,handler:async e=>d({command:`cloudforce-one scans config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({frequency:e.frequency,ips:e.ips,ports:e.ports}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(Z,{body:t,account_id:a,config_id:e[`config-id`]}));l(r,{successLabel:`Updated`});return}let d=_({frequency:e.frequency,ips:e.ips,ports:e.ports}),f=await u(`Updating`,async()=>i.send(Z,{body:d,account_id:a,config_id:e[`config-id`]}));l(f,{successLabel:`Updated`})})};var ji={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/config`};function Mi(e){return e.usage(`$0 cloudforce-one scans config list
149
145
 
150
- Lists scan configurations for Cloudforce One's network scanning service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ei={command:`list`,describe:`List Scan Configs`,builder:Ti,handler:async e=>d({command:`cloudforce-one scans config list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one scans config list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(wi,{account_id:i}));l(a,{successLabel:`Loaded`})})},Di={command:`config`,describe:`Operations for scans.config`,builder:e=>e.command(vi).command(xi).command(Ci).command(Ei).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Oi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/banner/${e.config_id}`};function ki(e){return e.usage(`$0 cloudforce-one scans results get-banners <config-id>
146
+ Lists scan configurations for Cloudforce One's network scanning service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ni={command:`list`,describe:`List Scan Configs`,builder:Mi,handler:async e=>d({command:`cloudforce-one scans config list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one scans config list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ji,{account_id:i}));l(a,{successLabel:`Loaded`})})},Pi={command:`config`,describe:`Operations for scans.config`,builder:e=>e.command(Ti).command(Oi).command(Ai).command(Ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/banner/${e.config_id}`};function Ii(e){return e.usage(`$0 cloudforce-one scans results get-banners <config-id>
151
147
 
152
- Retrieves the latest banner grab results for a Cloudforce One scan configuration, including service banners from open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ai={command:`get-banners <config-id>`,describe:`Get the Latest Banner Grab Result`,builder:ki,handler:async e=>d({command:`cloudforce-one scans results get-banners`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans results get-banners`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/banner/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Oi,{account_id:i,config_id:e[`config-id`]}));l(a,{successLabel:`Loaded`})})};var ji={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/results/${e.config_id}`};function Mi(e){return e.usage(`$0 cloudforce-one scans results get <config-id>
148
+ Retrieves the latest banner grab results for a Cloudforce One scan configuration, including service banners from open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Li={command:`get-banners <config-id>`,describe:`Get the Latest Banner Grab Result`,builder:Ii,handler:async e=>d({command:`cloudforce-one scans results get-banners`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans results get-banners`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/banner/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Fi,{account_id:i,config_id:e[`config-id`]}));l(a,{successLabel:`Loaded`})})};var Ri={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/scans/results/${e.config_id}`};function zi(e){return e.usage(`$0 cloudforce-one scans results get <config-id>
153
149
 
154
- Retrieves the latest scan results for a Cloudforce One scan configuration, including discovered open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ni={command:`get <config-id>`,describe:`Get the Latest Scan Result`,builder:Mi,handler:async e=>d({command:`cloudforce-one scans results get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/results/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ji,{account_id:i,config_id:e[`config-id`]}));l(a,{successLabel:`Loaded`})})},Pi={command:`results`,describe:`Operations for scans.results`,builder:e=>e.command(Ni).command(Ai).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fi={command:`scans`,describe:`Scan URLs, IPs, and domains for threat intelligence indicators`,builder:e=>e.command(Di).command(Pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups`,body:`json`,errors:{400:`BadRequestError`}};function Ii(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups create
150
+ Retrieves the latest scan results for a Cloudforce One scan configuration, including discovered open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bi={command:`get <config-id>`,describe:`Get the Latest Scan Result`,builder:zi,handler:async e=>d({command:`cloudforce-one scans results get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one scans results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/results/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ri,{account_id:i,config_id:e[`config-id`]}));l(a,{successLabel:`Loaded`})})},Vi={command:`results`,describe:`Operations for scans.results`,builder:e=>e.command(Bi).command(Li).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Hi={command:`scans`,describe:`Scan URLs, IPs, and domains for threat intelligence indicators`,builder:e=>e.command(Pi).command(Vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups`,body:`json`,errors:{400:`BadRequestError`}};function Ui(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups create
155
151
 
156
- Creates a named group of accounts. To give the group access to a dataset, use \`threat-intel datasets access permissions create\`.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Li={command:`create`,describe:`Create an account group`,builder:Ii,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Z,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.description===void 0&&(e.description=await v(`description`,`The description field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}),p=await u(`Creating`,async()=>a.send(Z,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Ri={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}`,errors:{400:`BadRequestError`}};function zi(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups delete <group-id>
152
+ Creates a named group of accounts. To give the group access to a dataset, use \`threat-intel datasets access permissions create\`.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Wi={command:`create`,describe:`Create an account group`,builder:Ui,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Q,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.description===void 0&&(e.description=await v(`description`,`The description field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}),p=await u(`Creating`,async()=>a.send(Q,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Gi={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}`,errors:{400:`BadRequestError`}};function Ki(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups delete <group-id>
157
153
 
158
- Deletes an account group by its ID.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Bi={command:`delete <group-id>`,describe:`Delete an account group`,builder:zi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Ri,{account_id:i,group_id:e[`group-id`]}));l(a,{successLabel:`Deleted`})})};var Vi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}`,errors:{400:`BadRequestError`}};function Hi(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups get <group-id>
154
+ Deletes an account group by its ID.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const qi={command:`delete <group-id>`,describe:`Delete an account group`,builder:Ki,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Gi,{account_id:i,group_id:e[`group-id`]}));l(a,{successLabel:`Deleted`})})};var Ji={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}`,errors:{400:`BadRequestError`}};function Yi(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups get <group-id>
159
155
 
160
- Returns an account group by its ID.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ui={command:`get <group-id>`,describe:`Get an account group`,builder:Hi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Vi,{account_id:i,group_id:e[`group-id`]}));l(a,{successLabel:`Loaded`})})};var Wi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups`,errors:{400:`BadRequestError`}};function Gi(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups list
156
+ Returns an account group by its ID.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xi={command:`get <group-id>`,describe:`Get an account group`,builder:Yi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ji,{account_id:i,group_id:e[`group-id`]}));l(a,{successLabel:`Loaded`})})};var Zi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups`,errors:{400:`BadRequestError`}};function Qi(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups list
161
157
 
162
- Lists the account groups. A group is a set of accounts that can be given access to a dataset with \`threat-intel datasets access permissions create\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ki={command:`list`,describe:`List account groups`,builder:Gi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel datasets access groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Wi,{account_id:i}));l(a,{successLabel:`Loaded`})})};var Q={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}/members`,body:`json`,errors:{400:`BadRequestError`}};function qi(e){return e.usage("$0 cloudforce-one threat-intel datasets access groups members create <group-id>\n\nAdds an account to an account group. Identify the account by `accountId` or `accountTag`.").positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`account-tag`,{type:`string`,description:`The accountTag field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ji={command:`create <group-id>`,describe:`Add an account to a group`,builder:qi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({accountTag:i(e[`account-tag`],`account-tag`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Q,{body:t,account_id:d,group_id:e[`group-id`]}));l(r,{successLabel:`Created`});return}let f=_({accountTag:i(e[`account-tag`],`account-tag`,`text`)}),p=await u(`Creating`,async()=>a.send(Q,{body:f,account_id:d,group_id:e[`group-id`]}));l(p,{successLabel:`Created`})})};var Yi={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}/members/${e.member_id}`,errors:{400:`BadRequestError`}};function Xi(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups members delete <member-id>
158
+ Lists the account groups. A group is a set of accounts that can be given access to a dataset with \`threat-intel datasets access permissions create\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $i={command:`list`,describe:`List account groups`,builder:Qi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel datasets access groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Zi,{account_id:i}));l(a,{successLabel:`Loaded`})})};var ea={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}/members`,body:`json`,errors:{400:`BadRequestError`}};function ta(e){return e.usage("$0 cloudforce-one threat-intel datasets access groups members create <group-id>\n\nAdds an account to an account group. Identify the account by `accountId` or `accountTag`.").positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`account-tag`,{type:`string`,description:`The accountTag field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const na={command:`create <group-id>`,describe:`Add an account to a group`,builder:ta,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({accountTag:i(e[`account-tag`],`account-tag`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(ea,{body:t,account_id:d,group_id:e[`group-id`]}));l(r,{successLabel:`Created`});return}let f=_({accountTag:i(e[`account-tag`],`account-tag`,`text`)}),p=await u(`Creating`,async()=>a.send(ea,{body:f,account_id:d,group_id:e[`group-id`]}));l(p,{successLabel:`Created`})})};var ra={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}/members/${e.member_id}`,errors:{400:`BadRequestError`}};function ia(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups members delete <member-id>
163
159
 
164
- Removes an account from an account group.`).positional(`member-id`,{type:`string`,description:`Member ID`,demandOption:!0}).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Zi={command:`delete <member-id>`,describe:`Remove an account from a group`,builder:Xi,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Yi,{account_id:i,group_id:e[`group-id`],member_id:e[`member-id`]}));l(a,{successLabel:`Deleted`})})};var Qi={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}/members`,errors:{400:`BadRequestError`}};function $i(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups members list
160
+ Removes an account from an account group.`).positional(`member-id`,{type:`string`,description:`Member ID`,demandOption:!0}).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const aa={command:`delete <member-id>`,describe:`Remove an account from a group`,builder:ia,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(ra,{account_id:i,group_id:e[`group-id`],member_id:e[`member-id`]}));l(a,{successLabel:`Deleted`})})};var oa={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}/members`,errors:{400:`BadRequestError`}};function sa(e){return e.usage(`$0 cloudforce-one threat-intel datasets access groups members list
165
161
 
166
- Lists the accounts in an account group.`).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ea={command:`list`,describe:`List group members`,builder:$i,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups members list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Qi,{account_id:i,group_id:e[`group-id`]}));l(a,{successLabel:`Loaded`})})},ta={command:`members`,describe:`Operations for threat-intel.datasets.access.groups.members`,builder:e=>e.command(Ji).command(Zi).command(ea).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var na={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}`,body:`json`,errors:{400:`BadRequestError`}};function ra(e){return e.usage("$0 cloudforce-one threat-intel datasets access groups update <group-id>\n\nReplaces an account group's `name` and `description`.").positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ia={command:`update <group-id>`,describe:`Update an account group`,builder:ra,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(na,{body:t,account_id:d,group_id:e[`group-id`]}));l(r,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await v(`description`,`The description field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}),p=await u(`Updating`,async()=>a.send(na,{body:f,account_id:d,group_id:e[`group-id`]}));l(p,{successLabel:`Updated`})})},aa={command:`groups`,describe:`Operations for threat-intel.datasets.access.groups`,builder:e=>e.command(Li).command(Bi).command(Ui).command(Ki).command(ia).command(ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oa={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions`,body:`json`,errors:{400:`BadRequestError`}};function sa(e){return e.usage("$0 cloudforce-one threat-intel datasets access permissions create <dataset-id>\n\nGives an account or account group (`subjectType` and `subjectId`) `read` or `write` access to a dataset.").positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>i(e,`role`,`text`)).option(`subject-id`,{type:`string`,description:`The subjectId field`}).option(`subject-type`,{type:`string`,description:`The subjectType field`,choices:[`account`,`group`]}).coerce(`subject-type`,e=>i(e,`subject-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ca={command:`create <dataset-id>`,describe:`Grant access to a dataset`,builder:sa,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions create`,classification:{safeFlags:[`role`,`subject-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({role:e.role,subjectId:i(e[`subject-id`],`subject-id`,`text`),subjectType:e[`subject-type`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(oa,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(r,{successLabel:`Created`});return}e.role===void 0&&(e.role=await y(`role`,`The role field`,[`read`,`write`])),e[`subject-id`]===void 0&&(e[`subject-id`]=await v(`subject-id`,`The subjectId field`)),e[`subject-type`]===void 0&&(e[`subject-type`]=await y(`subject-type`,`The subjectType field`,[`account`,`group`]));let f=_({role:e.role,subjectId:i(e[`subject-id`],`subject-id`,`text`),subjectType:e[`subject-type`]}),p=await u(`Creating`,async()=>a.send(oa,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Created`})})};var la={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions/${e.grant_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function ua(e){return e.usage(`$0 cloudforce-one threat-intel datasets access permissions delete <grant-id>
162
+ Lists the accounts in an account group.`).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ca={command:`list`,describe:`List group members`,builder:sa,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups members list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(oa,{account_id:i,group_id:e[`group-id`]}));l(a,{successLabel:`Loaded`})})},la={command:`members`,describe:`Operations for threat-intel.datasets.access.groups.members`,builder:e=>e.command(na).command(aa).command(ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ua={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/-/groups/${e.group_id}`,body:`json`,errors:{400:`BadRequestError`}};function da(e){return e.usage("$0 cloudforce-one threat-intel datasets access groups update <group-id>\n\nReplaces an account group's `name` and `description`.").positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fa={command:`update <group-id>`,describe:`Update an account group`,builder:da,handler:async e=>d({command:`cloudforce-one threat-intel datasets access groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(ua,{body:t,account_id:d,group_id:e[`group-id`]}));l(r,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await v(`description`,`The description field`)),e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`)}),p=await u(`Updating`,async()=>a.send(ua,{body:f,account_id:d,group_id:e[`group-id`]}));l(p,{successLabel:`Updated`})})},pa={command:`groups`,describe:`Operations for threat-intel.datasets.access.groups`,builder:e=>e.command(Wi).command(qi).command(Xi).command($i).command(fa).command(la).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ma={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions`,body:`json`,errors:{400:`BadRequestError`}};function ha(e){return e.usage("$0 cloudforce-one threat-intel datasets access permissions create <dataset-id>\n\nGives an account or account group (`subjectType` and `subjectId`) `read` or `write` access to a dataset.").positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>i(e,`role`,`text`)).option(`subject-id`,{type:`string`,description:`The subjectId field`}).option(`subject-type`,{type:`string`,description:`The subjectType field`,choices:[`account`,`group`]}).coerce(`subject-type`,e=>i(e,`subject-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ga={command:`create <dataset-id>`,describe:`Grant access to a dataset`,builder:ha,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions create`,classification:{safeFlags:[`role`,`subject-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({role:e.role,subjectId:i(e[`subject-id`],`subject-id`,`text`),subjectType:e[`subject-type`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(ma,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(r,{successLabel:`Created`});return}e.role===void 0&&(e.role=await y(`role`,`The role field`,[`read`,`write`])),e[`subject-id`]===void 0&&(e[`subject-id`]=await v(`subject-id`,`The subjectId field`)),e[`subject-type`]===void 0&&(e[`subject-type`]=await y(`subject-type`,`The subjectType field`,[`account`,`group`]));let f=_({role:e.role,subjectId:i(e[`subject-id`],`subject-id`,`text`),subjectType:e[`subject-type`]}),p=await u(`Creating`,async()=>a.send(ma,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Created`})})};var _a={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions/${e.grant_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function va(e){return e.usage(`$0 cloudforce-one threat-intel datasets access permissions delete <grant-id>
167
163
 
168
- Removes an access grant from a dataset.`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const da={command:`delete <grant-id>`,describe:`Revoke access to a dataset`,builder:ua,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(la,{account_id:i,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));l(a,{successLabel:`Deleted`})})};var fa={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function pa(e){return e.usage(`$0 cloudforce-one threat-intel datasets access permissions list
164
+ Removes an access grant from a dataset.`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ya={command:`delete <grant-id>`,describe:`Revoke access to a dataset`,builder:va,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(_a,{account_id:i,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));l(a,{successLabel:`Deleted`})})};var ba={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function xa(e){return e.usage(`$0 cloudforce-one threat-intel datasets access permissions list
169
165
 
170
- Lists the access grants on a dataset.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ma={command:`list`,describe:`List dataset permissions`,builder:pa,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions 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`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(fa,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Loaded`})})};var ha={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions/${e.grant_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function ga(e){return e.usage("$0 cloudforce-one threat-intel datasets access permissions update <grant-id>\n\nChanges the `role` of an access grant to `read` or `write`.").positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>i(e,`role`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _a={command:`update <grant-id>`,describe:`Change a dataset permission`,builder:ga,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions update`,classification:{safeFlags:[`role`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({role:e.role}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(ha,{body:t,account_id:a,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));l(r,{successLabel:`Updated`});return}e.role===void 0&&(e.role=await y(`role`,`The role field`,[`read`,`write`]));let d=_({role:e.role}),f=await u(`Updating`,async()=>i.send(ha,{body:d,account_id:a,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));l(f,{successLabel:`Updated`})})},va={command:`permissions`,describe:`Operations for threat-intel.datasets.access.permissions`,builder:e=>e.command(ca).command(da).command(ma).command(_a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ya={command:`access`,describe:`Operations for threat-intel.datasets.access`,builder:e=>e.command(aa).command(va).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ba={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/create`,body:`json`,errors:{400:`BadRequestError`}};function xa(e){return e.usage(`$0 cloudforce-one threat-intel datasets create
166
+ Lists the access grants on a dataset.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sa={command:`list`,describe:`List dataset permissions`,builder:xa,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions 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`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ba,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Loaded`})})};var Ca={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/permissions/${e.grant_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function wa(e){return e.usage("$0 cloudforce-one threat-intel datasets access permissions update <grant-id>\n\nChanges the `role` of an access grant to `read` or `write`.").positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>i(e,`role`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ta={command:`update <grant-id>`,describe:`Change a dataset permission`,builder:wa,handler:async e=>d({command:`cloudforce-one threat-intel datasets access permissions update`,classification:{safeFlags:[`role`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets access permissions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({role:e.role}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(Ca,{body:t,account_id:a,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));l(r,{successLabel:`Updated`});return}e.role===void 0&&(e.role=await y(`role`,`The role field`,[`read`,`write`]));let d=_({role:e.role}),f=await u(`Updating`,async()=>i.send(Ca,{body:d,account_id:a,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));l(f,{successLabel:`Updated`})})},Ea={command:`permissions`,describe:`Operations for threat-intel.datasets.access.permissions`,builder:e=>e.command(ga).command(ya).command(Sa).command(Ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Da={command:`access`,describe:`Operations for threat-intel.datasets.access`,builder:e=>e.command(pa).command(Ea).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Oa={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/create`,body:`json`,errors:{400:`BadRequestError`}};function ka(e){return e.usage(`$0 cloudforce-one threat-intel datasets create
171
167
 
172
- Creates a dataset for grouping events. Set \`isPublic\` to true to let anyone search it; otherwise only the account can.`).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 Sa={command:`create`,describe:`Create a dataset`,builder:xa,handler:async e=>d({command:`cloudforce-one threat-intel datasets create`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(ba,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await v(`name`,`Used to describe the dataset within the account context.`));let f=_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}),p=await u(`Creating`,async()=>a.send(ba,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Ca={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function wa(e){return e.usage("$0 cloudforce-one threat-intel datasets delete <dataset-id>\n\nDeletes a dataset. To see deleted datasets, use `threat-intel datasets list` with `includeDeleted`.").positional(`dataset-id`,{type:`string`,description:`Dataset ID to delete`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ta={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:wa,handler:async e=>d({command:`cloudforce-one threat-intel datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Ca,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Deleted`})})};var Ea={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Da(e){return e.usage(`$0 cloudforce-one threat-intel datasets get <dataset-id>
168
+ Creates a dataset for grouping events. Set \`isPublic\` to true to let anyone search it; otherwise only the account can.`).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 Aa={command:`create`,describe:`Create a dataset`,builder:ka,handler:async e=>d({command:`cloudforce-one threat-intel datasets create`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Oa,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await v(`name`,`Used to describe the dataset within the account context.`));let f=_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}),p=await u(`Creating`,async()=>a.send(Oa,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var ja={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Ma(e){return e.usage("$0 cloudforce-one threat-intel datasets delete <dataset-id>\n\nDeletes a dataset. To see deleted datasets, use `threat-intel datasets list` with `includeDeleted`.").positional(`dataset-id`,{type:`string`,description:`Dataset ID to delete`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Na={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:Ma,handler:async e=>d({command:`cloudforce-one threat-intel datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(ja,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Deleted`})})};var Pa={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Fa(e){return e.usage(`$0 cloudforce-one threat-intel datasets get <dataset-id>
173
169
 
174
- Returns a dataset by its ID.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oa={command:`get <dataset-id>`,describe:`Get a dataset`,builder:Da,handler:async e=>d({command:`cloudforce-one threat-intel datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ea,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Loaded`})})};var ka={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset`,query:[`includeDeleted`],errors:{400:`BadRequestError`}};function Aa(e){return e.usage(`$0 cloudforce-one threat-intel datasets list
170
+ Returns a dataset by its ID.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ia={command:`get <dataset-id>`,describe:`Get a dataset`,builder:Fa,handler:async e=>d({command:`cloudforce-one threat-intel datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Pa,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Loaded`})})};var La={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset`,query:[`includeDeleted`],errors:{400:`BadRequestError`}};function Ra(e){return e.usage(`$0 cloudforce-one threat-intel datasets list
175
171
 
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 ja={command:`list`,describe:`List datasets`,builder:Aa,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ka,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Ma={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/populate`,errors:{400:`BadRequestError`}};function Na(e){return e.usage(`$0 cloudforce-one threat-intel datasets populate
172
+ 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 za={command:`list`,describe:`List datasets`,builder:Ra,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(La,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Ba={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/populate`,errors:{400:`BadRequestError`}};function Va(e){return e.usage(`$0 cloudforce-one threat-intel datasets populate
177
173
 
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 Pa={command:`populate`,describe:`Rebuild dataset lookup lists`,builder:Na,handler:async e=>d({command:`cloudforce-one threat-intel datasets populate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Ma,{account_id:i}));l(a,{successLabel:`Created`})})};var Fa={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/preferences`,query:[`scope`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function Ia(e){return e.usage("$0 cloudforce-one threat-intel datasets preferences delete\n\nRemoves your default datasets (`scope` `user`) or the account's (`scope` `account`). After you remove your own, requests that omit `datasetId` use the account's default datasets, if set.").option(`scope`,{type:`string`,description:"`user` removes your own default datasets. `account` removes the account's, and requires permission to edit the account's Cloudforce One settings.",choices:[`user`,`account`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const La={command:`delete`,describe:`Remove default datasets`,builder:Ia,handler:async e=>d({command:`cloudforce-one threat-intel datasets preferences delete`,classification:{safeFlags:[`scope`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={scope:e.scope};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel datasets preferences delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/preferences`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(Fa,{account_id:a,...n}));l(d,{successLabel:`Deleted`})})};var Ra={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/preferences`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function za(e){return e.usage("$0 cloudforce-one threat-intel datasets preferences get\n\nReturns your default datasets, the account's default datasets, and the datasets that event searches currently use when `datasetId` is omitted. `unresolvableDatasetIds` lists saved datasets you can no longer read.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ba={command:`get`,describe:`Get default datasets`,builder:za,handler:async e=>d({command:`cloudforce-one threat-intel datasets preferences get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel datasets preferences get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/preferences`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ra,{account_id:i}));l(a,{successLabel:`Loaded`})})};var Va={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/preferences`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function Ha(e){return e.usage("$0 cloudforce-one threat-intel datasets preferences update\n\nSets the datasets to use when a request omits `datasetId`, for you (`scope` `user`) or for the account (`scope` `account`). Your own default datasets take precedence over the account's. Every dataset must exist and be readable by the account, and the list cannot mix analytics and intelligence datasets.").option(`dataset-ids`,{type:`string`,array:!0,description:"The dataset UUIDs to use when a request omits `datasetId`: 1 to 50 datasets you can read, either all analytics datasets or all intelligence datasets. Duplicates are ignored."}).option(`scope`,{type:`string`,description:"`user` sets your own default datasets. `account` sets the default datasets for everyone in the account who has not set their own, and requires permission to edit the account's Cloudforce One settings.",choices:[`user`,`account`]}).coerce(`scope`,e=>i(e,`scope`,`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 Ua={command:`update`,describe:`Set default datasets`,builder:Ha,handler:async e=>d({command:`cloudforce-one threat-intel datasets preferences update`,classification:{safeFlags:[`scope`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets preferences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/preferences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({datasetIds:e[`dataset-ids`],scope:e.scope}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>i.send(Va,{body:e,account_id:a}));l(t,{successLabel:`Updated`});return}if(e[`dataset-ids`]===void 0)throw Error(`--dataset-ids is required (or pass --body with this field set).`);e.scope===void 0&&(e.scope=await y(`scope`,"`user` sets your own default datasets. `account` sets the default datasets for everyone in the account who has not set their own, and requires permission to edit the account's Cloudforce One settings.",[`user`,`account`]));let d=_({datasetIds:e[`dataset-ids`],scope:e.scope}),f=await u(`Updating`,async()=>i.send(Va,{body:d,account_id:a}));l(f,{successLabel:`Updated`})})},Wa={command:`preferences`,describe:`Operations for threat-intel.datasets.preferences`,builder:e=>e.command(La).command(Ba).command(Ua).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ga={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}`,body:`json`,errors:{400:`BadRequestError`}};function Ka(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 qa={command:`update <dataset-id>`,describe:`Update a dataset`,builder:Ka,handler:async e=>d({command:`cloudforce-one threat-intel datasets update`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Ga,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(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 f=_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}),p=await u(`Updating`,async()=>a.send(Ga,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Updated`})})},Ja={command:`datasets`,describe:`Operations for threat-intel.datasets`,builder:e=>e.command(Sa).command(Ta).command(Oa).command(ja).command(Pa).command(qa).command(ya).command(Wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ya={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/aggregate`,query:[`aggregateBy`,`datasetId`,`startDate`,`endDate`,`groupByDate`,`limit`],errors:{400:`BadRequestError`}};function Xa(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 Za={command:`aggregate`,describe:`Aggregate events`,builder:Xa,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ya,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Qa={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/attackers`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function $a(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 eo={command:`list`,describe:`List attackers`,builder:$a,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Qa,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},to={command:`attackers`,describe:`Operations for threat-intel.events.attackers`,builder:e=>e.command(eo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var no={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/create/bulk`,body:`json`,errors:{400:`BadRequestError`}};function ro(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. Shape: [{"category": string, "date": string, "event": string, "raw": {...}, "tlp": string, ...more}].`}).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 io={command:`bulk-create`,describe:`Create events in bulk`,builder:ro,handler:async e=>d({command:`cloudforce-one threat-intel events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({data:h(e.data,`data`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(no,{body:e,account_id:d}));l(t,{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 f=_({data:h(e.data,`data`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}),p=await u(`Creating`,async()=>a.send(no,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var ao={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/update/bulk`,body:`json`,errors:{400:`BadRequestError`}};function oo(e){return e.usage(`$0 cloudforce-one threat-intel events bulk-update
174
+ 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 Ha={command:`populate`,describe:`Rebuild dataset lookup lists`,builder:Va,handler:async e=>d({command:`cloudforce-one threat-intel datasets populate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Ba,{account_id:i}));l(a,{successLabel:`Created`})})};var Ua={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/preferences`,query:[`scope`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function Wa(e){return e.usage("$0 cloudforce-one threat-intel datasets preferences delete\n\nRemoves your default datasets (`scope` `user`) or the account's (`scope` `account`). After you remove your own, requests that omit `datasetId` use the account's default datasets, if set.").option(`scope`,{type:`string`,description:"`user` removes your own default datasets. `account` removes the account's, and requires permission to edit the account's Cloudforce One settings.",choices:[`user`,`account`],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 Ga={command:`delete`,describe:`Remove default datasets`,builder:Wa,handler:async e=>d({command:`cloudforce-one threat-intel datasets preferences delete`,classification:{safeFlags:[`scope`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={scope:e.scope};if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel datasets preferences delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/preferences`,pathParams:{},query:n,bodyKind:`none`});return}let i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(Ua,{account_id:a,...n}));l(d,{successLabel:`Deleted`})})};var Ka={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/preferences`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function qa(e){return e.usage("$0 cloudforce-one threat-intel datasets preferences get\n\nReturns your default datasets, the account's default datasets, and the datasets that event searches currently use when `datasetId` is omitted. `unresolvableDatasetIds` lists saved datasets you can no longer read.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ja={command:`get`,describe:`Get default datasets`,builder:qa,handler:async e=>d({command:`cloudforce-one threat-intel datasets preferences get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel datasets preferences get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/preferences`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ka,{account_id:i}));l(a,{successLabel:`Loaded`})})};var Ya={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/preferences`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function Xa(e){return e.usage("$0 cloudforce-one threat-intel datasets preferences update\n\nSets the datasets to use when a request omits `datasetId`, for you (`scope` `user`) or for the account (`scope` `account`). Your own default datasets take precedence over the account's. Every dataset must exist and be readable by the account, and the list cannot mix analytics and intelligence datasets.").option(`dataset-ids`,{type:`string`,array:!0,description:"The dataset UUIDs to use when a request omits `datasetId`: 1 to 50 datasets you can read, either all analytics datasets or all intelligence datasets. Duplicates are ignored."}).option(`scope`,{type:`string`,description:"`user` sets your own default datasets. `account` sets the default datasets for everyone in the account who has not set their own, and requires permission to edit the account's Cloudforce One settings.",choices:[`user`,`account`]}).coerce(`scope`,e=>i(e,`scope`,`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 Za={command:`update`,describe:`Set default datasets`,builder:Xa,handler:async e=>d({command:`cloudforce-one threat-intel datasets preferences update`,classification:{safeFlags:[`scope`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel datasets preferences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/preferences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({datasetIds:e[`dataset-ids`],scope:e.scope}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>i.send(Ya,{body:e,account_id:a}));l(t,{successLabel:`Updated`});return}if(e[`dataset-ids`]===void 0)throw Error(`--dataset-ids is required (or pass --body with this field set).`);e.scope===void 0&&(e.scope=await y(`scope`,"`user` sets your own default datasets. `account` sets the default datasets for everyone in the account who has not set their own, and requires permission to edit the account's Cloudforce One settings.",[`user`,`account`]));let d=_({datasetIds:e[`dataset-ids`],scope:e.scope}),f=await u(`Updating`,async()=>i.send(Ya,{body:d,account_id:a}));l(f,{successLabel:`Updated`})})},Qa={command:`preferences`,describe:`Operations for threat-intel.datasets.preferences`,builder:e=>e.command(Ga).command(Ja).command(Za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $a={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}`,body:`json`,errors:{400:`BadRequestError`}};function eo(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 to={command:`update <dataset-id>`,describe:`Update a dataset`,builder:eo,handler:async e=>d({command:`cloudforce-one threat-intel datasets update`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send($a,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(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 f=_({isPublic:e[`is-public`],name:i(e.name,`name`,`text`)}),p=await u(`Updating`,async()=>a.send($a,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Updated`})})},no={command:`datasets`,describe:`Operations for threat-intel.datasets`,builder:e=>e.command(Aa).command(Na).command(Ia).command(za).command(Ha).command(to).command(Da).command(Qa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ro={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/aggregate`,query:[`aggregateBy`,`datasetId`,`startDate`,`endDate`,`groupByDate`,`limit`],errors:{400:`BadRequestError`}};function io(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 ao={command:`aggregate`,describe:`Aggregate events`,builder:io,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ro,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var oo={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/attackers`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function so(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 co={command:`list`,describe:`List attackers`,builder:so,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(oo,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},lo={command:`attackers`,describe:`Operations for threat-intel.events.attackers`,builder:e=>e.command(co).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var uo={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/create/bulk`,body:`json`,errors:{400:`BadRequestError`}};function fo(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. Shape: [{"category": string, "date": string, "event": string, "raw": {...}, "tlp": string, ...more}].`}).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 po={command:`bulk-create`,describe:`Create events in bulk`,builder:fo,handler:async e=>d({command:`cloudforce-one threat-intel events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({data:h(e.data,`data`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(uo,{body:e,account_id:d}));l(t,{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 f=_({data:h(e.data,`data`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}),p=await u(`Creating`,async()=>a.send(uo,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var mo={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/update/bulk`,body:`json`,errors:{400:`BadRequestError`}};function ho(e){return e.usage(`$0 cloudforce-one threat-intel events bulk-update
179
175
 
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. Shape: {"<key>": unknown}.`}).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 so={command:`bulk-update`,describe:`Update events in bulk`,builder:oo,handler:async e=>d({command:`cloudforce-one threat-intel events bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({datasetId:i(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:i(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:i(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:i(e[`updates-category`],`updates-category`,`text`),createdAt:i(e[`updates-created-at`],`updates-created-at`,`text`),event:i(e[`updates-event`],`updates-event`,`text`),indicator:i(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:i(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:i(e[`updates-insight`],`updates-insight`,`text`),raw:{data:m(e[`updates-raw-data`],`updates-raw-data`),source:i(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:i(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:i(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:i(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:i(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>a.send(ao,{body:e,account_id:d}));l(t,{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 f=_({datasetId:i(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:i(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:i(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:i(e[`updates-category`],`updates-category`,`text`),createdAt:i(e[`updates-created-at`],`updates-created-at`,`text`),event:i(e[`updates-event`],`updates-event`,`text`),indicator:i(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:i(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:i(e[`updates-insight`],`updates-insight`,`text`),raw:{data:m(e[`updates-raw-data`],`updates-raw-data`),source:i(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:i(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:i(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:i(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:i(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]),p=await u(`Updating`,async()=>a.send(ao,{body:f,account_id:d}));l(p,{successLabel:`Updated`})})};var co={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/categories/catalog`,errors:{400:`BadRequestError`}};function lo(e){return e.usage(`$0 cloudforce-one threat-intel events categories catalog list
176
+ 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. Shape: {"<key>": unknown}.`}).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 go={command:`bulk-update`,describe:`Update events in bulk`,builder:ho,handler:async e=>d({command:`cloudforce-one threat-intel events bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({datasetId:i(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:i(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:i(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:i(e[`updates-category`],`updates-category`,`text`),createdAt:i(e[`updates-created-at`],`updates-created-at`,`text`),event:i(e[`updates-event`],`updates-event`,`text`),indicator:i(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:i(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:i(e[`updates-insight`],`updates-insight`,`text`),raw:{data:m(e[`updates-raw-data`],`updates-raw-data`),source:i(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:i(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:i(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:i(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:i(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>a.send(mo,{body:e,account_id:d}));l(t,{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 f=_({datasetId:i(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:i(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:i(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:i(e[`updates-category`],`updates-category`,`text`),createdAt:i(e[`updates-created-at`],`updates-created-at`,`text`),event:i(e[`updates-event`],`updates-event`,`text`),indicator:i(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:i(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:i(e[`updates-insight`],`updates-insight`,`text`),raw:{data:m(e[`updates-raw-data`],`updates-raw-data`),source:i(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:i(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:i(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:i(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:i(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]),p=await u(`Updating`,async()=>a.send(mo,{body:f,account_id:d}));l(p,{successLabel:`Updated`})})};var _o={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/categories/catalog`,errors:{400:`BadRequestError`}};function vo(e){return e.usage(`$0 cloudforce-one threat-intel events categories catalog list
181
177
 
182
- Lists every event category in the catalog, whether or not an event uses it. To list only the categories used in specific datasets, use \`threat-intel events categories list\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uo={command:`list`,describe:`List all event categories`,builder:lo,handler:async e=>d({command:`cloudforce-one threat-intel events categories catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel events categories catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories/catalog`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(co,{account_id:i}));l(a,{successLabel:`Loaded`})})},fo={command:`catalog`,describe:`Operations for threat-intel.events.categories.catalog`,builder:e=>e.command(uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var po={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/categories/create`,body:`json`,errors:{400:`BadRequestError`}};function mo(e){return e.usage("$0 cloudforce-one threat-intel events categories create\n\nCreates an event category for classifying events. `name` and `killChain` are required.").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 ho={command:`create`,describe:`Create an event category`,builder:mo,handler:async e=>d({command:`cloudforce-one threat-intel events categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(po,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`kill-chain`]===void 0)throw Error(`--kill-chain is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}),p=await u(`Creating`,async()=>a.send(po,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var go={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event-categories/by-id/${e.category_id}`,errors:{400:`BadRequestError`}};function _o(e){return e.usage(`$0 cloudforce-one threat-intel events categories delete <category-id>
178
+ Lists every event category in the catalog, whether or not an event uses it. To list only the categories used in specific datasets, use \`threat-intel events categories list\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yo={command:`list`,describe:`List all event categories`,builder:vo,handler:async e=>d({command:`cloudforce-one threat-intel events categories catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel events categories catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories/catalog`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(_o,{account_id:i}));l(a,{successLabel:`Loaded`})})},bo={command:`catalog`,describe:`Operations for threat-intel.events.categories.catalog`,builder:e=>e.command(yo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xo={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/categories/create`,body:`json`,errors:{400:`BadRequestError`}};function So(e){return e.usage("$0 cloudforce-one threat-intel events categories create\n\nCreates an event category for classifying events. `name` and `killChain` are required.").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 Co={command:`create`,describe:`Create an event category`,builder:So,handler:async e=>d({command:`cloudforce-one threat-intel events categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(xo,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}if(e[`kill-chain`]===void 0)throw Error(`--kill-chain is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}),p=await u(`Creating`,async()=>a.send(xo,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var wo={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event-categories/by-id/${e.category_id}`,errors:{400:`BadRequestError`}};function To(e){return e.usage(`$0 cloudforce-one threat-intel events categories delete <category-id>
183
179
 
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 vo={command:`delete <category-id>`,describe:`Delete an event category`,builder:_o,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(go,{account_id:i,category_id:e[`category-id`]}));l(a,{successLabel:`Deleted`})})};var yo={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event-categories/by-id/${e.category_id}`,errors:{400:`BadRequestError`}};function bo(e){return e.usage(`$0 cloudforce-one threat-intel events categories get <category-id>
180
+ 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 Eo={command:`delete <category-id>`,describe:`Delete an event category`,builder:To,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(wo,{account_id:i,category_id:e[`category-id`]}));l(a,{successLabel:`Deleted`})})};var Do={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event-categories/by-id/${e.category_id}`,errors:{400:`BadRequestError`}};function Oo(e){return e.usage(`$0 cloudforce-one threat-intel events categories get <category-id>
185
181
 
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 xo={command:`get <category-id>`,describe:`Get an event category`,builder:bo,handler:async e=>d({command:`cloudforce-one threat-intel events categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(yo,{account_id:i,category_id:e[`category-id`]}));l(a,{successLabel:`Loaded`})})};var So={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/categories`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function Co(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 wo={command:`list`,describe:`List event categories used in datasets`,builder:Co,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(So,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var To={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event-categories/by-id/${e.category_id}`,body:`json`,errors:{400:`BadRequestError`}};function Eo(e){return e.usage(`$0 cloudforce-one threat-intel events categories update <category-id>
182
+ 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 ko={command:`get <category-id>`,describe:`Get an event category`,builder:Oo,handler:async e=>d({command:`cloudforce-one threat-intel events categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Do,{account_id:i,category_id:e[`category-id`]}));l(a,{successLabel:`Loaded`})})};var Ao={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/categories`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function jo(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 Mo={command:`list`,describe:`List event categories used in datasets`,builder:jo,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ao,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var No={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event-categories/by-id/${e.category_id}`,body:`json`,errors:{400:`BadRequestError`}};function Po(e){return e.usage(`$0 cloudforce-one threat-intel events categories update <category-id>
187
183
 
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 Do={command:`update <category-id>`,describe:`Update an event category`,builder:Eo,handler:async e=>d({command:`cloudforce-one threat-intel events categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(To,{body:t,account_id:d,category_id:e[`category-id`]}));l(r,{successLabel:`Updated`});return}let f=_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}),p=await u(`Updating`,async()=>a.send(To,{body:f,account_id:d,category_id:e[`category-id`]}));l(p,{successLabel:`Updated`})})},Oo={command:`categories`,describe:`Operations for threat-intel.events.categories`,builder:e=>e.command(ho).command(vo).command(xo).command(wo).command(Do).command(fo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ko={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/copy`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function Ao(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 jo={command:`copy <dataset-id>`,describe:`Copy events to another dataset`,builder:Ao,handler:async e=>d({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 o();r({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?_({destDatasetId:i(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>d.send(ko,{body:t,account_id:f,dataset_id:e[`dataset-id`],...n}));l(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 p=_({destDatasetId:i(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 m=await u(`Creating`,async()=>d.send(ko,{body:p,account_id:f,dataset_id:e[`dataset-id`],...n}));l(m,{successLabel:`Created`})})};var Mo={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/countries`,errors:{400:`BadRequestError`}};function No(e){return e.usage(`$0 cloudforce-one threat-intel events countries list
184
+ 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 Fo={command:`update <category-id>`,describe:`Update an event category`,builder:Po,handler:async e=>d({command:`cloudforce-one threat-intel events categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(No,{body:t,account_id:d,category_id:e[`category-id`]}));l(r,{successLabel:`Updated`});return}let f=_({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:i(e.name,`name`,`text`),shortname:i(e.shortname,`shortname`,`text`)}),p=await u(`Updating`,async()=>a.send(No,{body:f,account_id:d,category_id:e[`category-id`]}));l(p,{successLabel:`Updated`})})},Io={command:`categories`,describe:`Operations for threat-intel.events.categories`,builder:e=>e.command(Co).command(Eo).command(ko).command(Mo).command(Fo).command(bo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Lo={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/copy`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function Ro(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 zo={command:`copy <dataset-id>`,describe:`Copy events to another dataset`,builder:Ro,handler:async e=>d({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 o();r({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?_({destDatasetId:i(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>d.send(Lo,{body:t,account_id:f,dataset_id:e[`dataset-id`],...n}));l(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 p=_({destDatasetId:i(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 m=await u(`Creating`,async()=>d.send(Lo,{body:p,account_id:f,dataset_id:e[`dataset-id`],...n}));l(m,{successLabel:`Created`})})};var Bo={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/countries`,errors:{400:`BadRequestError`}};function Vo(e){return e.usage(`$0 cloudforce-one threat-intel events countries list
189
185
 
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 Po={command:`list`,describe:`List countries`,builder:No,handler:async e=>d({command:`cloudforce-one threat-intel events countries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Mo,{account_id:i}));l(a,{successLabel:`Loaded`})})},Fo={command:`countries`,describe:`Operations for threat-intel.events.countries`,builder:e=>e.command(Po).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Io={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/create`,body:`json`,errors:{400:`BadRequestError`}};function Lo(e){return e.usage("$0 cloudforce-one threat-intel events create\n\nCreates an event in the dataset given by `datasetId`. Omitting `datasetId` is deprecated: the event is created in the default Cloudforce One Threat Events dataset, and a future release will reject the request. To create a dataset, use `threat-intel datasets create`.").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. Shape: [{"indicatorType": string, "value": string}].`}).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. Shape: {"<key>": unknown}.`}).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=>i(e,`source-resource-type`,`text`)).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).coerce(`source-system`,e=>i(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=>{let t=[`source-resource-id`,`source-resource-type`,`source-system`,`source-title`].some(t=>e[t]!==void 0);if(!e.body&&t){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 Ro={command:`create`,describe:`Create an event`,builder:Lo,handler:async e=>d({command:`cloudforce-one threat-intel events create`,classification:{safeFlags:[`source-resource-type`,`source-system`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),indicators:h(e.indicators,`indicators`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`,!0),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:i(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:i(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):g(e.body,[{path:[`raw`,`data`],flag:`raw-data`}])});return}let n=e.body===void 0?void 0:g(e.body,[{path:[`raw`,`data`],flag:`raw-data`}]),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Io,{body:e,account_id:d}));l(t,{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 f=_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),indicators:h(e.indicators,`indicators`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`,!0),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:i(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:i(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),p=await u(`Creating`,async()=>a.send(Io,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var zo={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/${e.dataset_id}/events`,query:[`eventIds`],errors:{400:`BadRequestError`}};function Bo(e){return e.usage(`$0 cloudforce-one threat-intel events delete <dataset-id>
186
+ 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 Ho={command:`list`,describe:`List countries`,builder:Vo,handler:async e=>d({command:`cloudforce-one threat-intel events countries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Bo,{account_id:i}));l(a,{successLabel:`Loaded`})})},Uo={command:`countries`,describe:`Operations for threat-intel.events.countries`,builder:e=>e.command(Ho).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Wo={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/create`,body:`json`,errors:{400:`BadRequestError`}};function Go(e){return e.usage("$0 cloudforce-one threat-intel events create\n\nCreates an event in the dataset given by `datasetId`. Omitting `datasetId` is deprecated: the event is created in the default Cloudforce One Threat Events dataset, and a future release will reject the request. To create a dataset, use `threat-intel datasets create`.").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. Shape: [{"indicatorType": string, "value": string}].`}).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. Shape: {"<key>": unknown}.`}).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=>i(e,`source-resource-type`,`text`)).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).coerce(`source-system`,e=>i(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=>{let t=[`source-resource-id`,`source-resource-type`,`source-system`,`source-title`].some(t=>e[t]!==void 0);if(!e.body&&t){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 Ko={command:`create`,describe:`Create an event`,builder:Go,handler:async e=>d({command:`cloudforce-one threat-intel events create`,classification:{safeFlags:[`source-resource-type`,`source-system`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),indicators:h(e.indicators,`indicators`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`,!0),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:i(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:i(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):g(e.body,[{path:[`raw`,`data`],flag:`raw-data`}])});return}let n=e.body===void 0?void 0:g(e.body,[{path:[`raw`,`data`],flag:`raw-data`}]),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Wo,{body:e,account_id:d}));l(t,{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 f=_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),indicators:h(e.indicators,`indicators`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`,!0),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:i(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:i(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),p=await u(`Creating`,async()=>a.send(Wo,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var qo={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/${e.dataset_id}/events`,query:[`eventIds`],errors:{400:`BadRequestError`}};function Jo(e){return e.usage(`$0 cloudforce-one threat-intel events delete <dataset-id>
191
187
 
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 Vo={command:`delete <dataset-id>`,describe:`Delete events`,builder:Bo,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(zo,{account_id:a,dataset_id:e[`dataset-id`],...n}));l(d,{successLabel:`Deleted`})})};var Ho={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/events/${e.event_id}`,errors:{404:`NotFoundError`}};function Uo(e){return e.usage(`$0 cloudforce-one threat-intel events get <event-id>
188
+ 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 Yo={command:`delete <dataset-id>`,describe:`Delete events`,builder:Jo,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(qo,{account_id:a,dataset_id:e[`dataset-id`],...n}));l(d,{successLabel:`Deleted`})})};var Xo={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/events/${e.event_id}`,errors:{404:`NotFoundError`}};function Zo(e){return e.usage(`$0 cloudforce-one threat-intel events get <event-id>
193
189
 
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 Wo={command:`get <event-id>`,describe:`Get an event`,builder:Uo,handler:async e=>d({command:`cloudforce-one threat-intel events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ho,{account_id:i,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));l(a,{successLabel:`Loaded`})})};var Go={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/graphql`,errors:{400:`BadRequestError`}};function Ko(e){return e.usage(`$0 cloudforce-one threat-intel events graphql
190
+ 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 Qo={command:`get <event-id>`,describe:`Get an event`,builder:Zo,handler:async e=>d({command:`cloudforce-one threat-intel events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Xo,{account_id:i,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));l(a,{successLabel:`Loaded`})})};var $o={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/graphql`,errors:{400:`BadRequestError`}};function es(e){return e.usage(`$0 cloudforce-one threat-intel events graphql
195
191
 
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 qo={command:`graphql`,describe:`Run a GraphQL aggregation over events`,builder:Ko,handler:async e=>d({command:`cloudforce-one threat-intel events graphql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Go,{account_id:i}));l(a,{successLabel:`Created`})})};var Jo={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}`,errors:{404:`NotFoundError`}};function Yo(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 Xo={command:`get <event-id>`,describe:`Get an event (legacy)`,builder:Yo,handler:async e=>d({command:`cloudforce-one threat-intel events legacy get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Jo,{account_id:i,event_id:e[`event-id`]}));l(a,{successLabel:`Loaded`})})};var Zo={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/events/graphql`,errors:{400:`BadRequestError`}};function Qo(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 $o={command:`graphql`,describe:`Run a GraphQL aggregation over events (legacy)`,builder:Qo,handler:async e=>d({command:`cloudforce-one threat-intel events legacy graphql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Zo,{account_id:i}));l(a,{successLabel:`Created`})})};var es={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}/raw/${e.raw_id}`,errors:{400:`BadRequestError`}};function ts(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 ns={command:`get <raw-id>`,describe:`Get raw event data by raw ID (legacy)`,builder:ts,handler:async e=>d({command:`cloudforce-one threat-intel events legacy raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(es,{account_id:i,event_id:e[`event-id`],raw_id:e[`raw-id`]}));l(a,{successLabel:`Loaded`})})};var rs={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}/raw/${e.raw_id}`,body:`json`,errors:{400:`BadRequestError`}};function is(e){return e.usage(`$0 cloudforce-one threat-intel events legacy raw update <raw-id>
192
+ 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 ts={command:`graphql`,describe:`Run a GraphQL aggregation over events`,builder:es,handler:async e=>d({command:`cloudforce-one threat-intel events graphql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send($o,{account_id:i}));l(a,{successLabel:`Created`})})};var ns={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}`,errors:{404:`NotFoundError`}};function rs(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 is={command:`get <event-id>`,describe:`Get an event (legacy)`,builder:rs,handler:async e=>d({command:`cloudforce-one threat-intel events legacy get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ns,{account_id:i,event_id:e[`event-id`]}));l(a,{successLabel:`Loaded`})})};var as={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/events/graphql`,errors:{400:`BadRequestError`}};function os(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 ss={command:`graphql`,describe:`Run a GraphQL aggregation over events (legacy)`,builder:os,handler:async e=>d({command:`cloudforce-one threat-intel events legacy graphql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(as,{account_id:i}));l(a,{successLabel:`Created`})})};var cs={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}/raw/${e.raw_id}`,errors:{400:`BadRequestError`}};function ls(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 us={command:`get <raw-id>`,describe:`Get raw event data by raw ID (legacy)`,builder:ls,handler:async e=>d({command:`cloudforce-one threat-intel events legacy raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(cs,{account_id:i,event_id:e[`event-id`],raw_id:e[`raw-id`]}));l(a,{successLabel:`Loaded`})})};var ds={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}/raw/${e.raw_id}`,body:`json`,errors:{400:`BadRequestError`}};function fs(e){return e.usage(`$0 cloudforce-one threat-intel events legacy raw update <raw-id>
197
193
 
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. Shape: {"<key>": unknown}.`}).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 as={command:`update <raw-id>`,describe:`Update raw event data by raw ID (legacy)`,builder:is,handler:async e=>d({command:`cloudforce-one threat-intel events legacy raw update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({data:m(e.data,`data`),source:i(e.source,`source`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`data`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(rs,{body:t,account_id:d,event_id:e[`event-id`],raw_id:e[`raw-id`]}));l(r,{successLabel:`Updated`});return}let f=_({data:m(e.data,`data`),source:i(e.source,`source`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`data`]]),p=await u(`Updating`,async()=>a.send(rs,{body:f,account_id:d,event_id:e[`event-id`],raw_id:e[`raw-id`]}));l(p,{successLabel:`Updated`})})},os={command:`raw`,describe:`Operations for threat-intel.events.legacy.raw`,builder:e=>e.command(ns).command(as).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ss={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/relate/${e.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function cs(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 ls={command:`create <event-id>`,describe:`Add event references (legacy)`,builder:cs,handler:async e=>d({command:`cloudforce-one threat-intel events legacy references create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({events:e.events}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>i.send(ss,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Created`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=_({events:e.events}),f=await u(`Creating`,async()=>i.send(ss,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Created`})})};var us={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/relate/${e.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function ds(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 fs={command:`delete <event-id>`,describe:`Remove event references (legacy)`,builder:ds,handler:async e=>d({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 o();r({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?_({events:e.events}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;if(e.body!==void 0){let t=n,r=await u(`Deleting`,async()=>i.send(us,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Deleted`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=_({events:e.events}),f=await u(`Deleting`,async()=>i.send(us,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Deleted`})})},ps={command:`references`,describe:`Operations for threat-intel.events.legacy.references`,builder:e=>e.command(ls).command(fs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ms={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event_tag/${e.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function hs(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 gs={command:`create <event-id>`,describe:`Add tags to an event (legacy)`,builder:hs,handler:async e=>d({command:`cloudforce-one threat-intel events legacy tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({tags:e.tags}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>i.send(ms,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Created`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=_({tags:e.tags}),f=await u(`Creating`,async()=>i.send(ms,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Created`})})};var _s={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event_tag/${e.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function vs(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 ys={command:`delete <event-id>`,describe:`Remove tags from an event (legacy)`,builder:vs,handler:async e=>d({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 o();r({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?_({tags:e.tags}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;if(e.body!==void 0){let t=n,r=await u(`Deleting`,async()=>i.send(_s,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Deleted`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=_({tags:e.tags}),f=await u(`Deleting`,async()=>i.send(_s,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Deleted`})})},bs={command:`tags`,describe:`Operations for threat-intel.events.legacy.tags`,builder:e=>e.command(gs).command(ys).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xs={command:`legacy`,describe:`Operations for threat-intel.events.legacy`,builder:e=>e.command(Xo).command($o).command(os).command(ps).command(bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ss={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events`,query:[`cursor`,`search`,`searchBranches`,`page`,`pageSize`,`orderBy`,`order`,`datasetId`,`forceRefresh`,`format`,`cache`],errors:{400:`BadRequestError`}};function Cs(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:'JSON-encoded. Structured search as a JSON array of {field, op, value} objects, AND\'d together. Max 10 conditions per request. `in` and `notIn` take an array of up to 100 values. Exclusions: `not` drops events without a value for the field; `notIn` and `notContains` keep them. On intelligence datasets, a `notIn` list containing `"unknown"` also drops them; analytics datasets treat `"unknown"` as a literal value.'}).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 ws={command:`list`,describe:`List events`,builder:Cs,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ss,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Ts={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/move`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function Es(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 Ds={command:`move <dataset-id>`,describe:`Move events to another dataset`,builder:Es,handler:async e=>d({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 o();r({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?_({destDatasetId:i(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>d.send(Ts,{body:t,account_id:f,dataset_id:e[`dataset-id`],...n}));l(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 p=_({destDatasetId:i(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 m=await u(`Creating`,async()=>d.send(Ts,{body:p,account_id:f,dataset_id:e[`dataset-id`],...n}));l(m,{successLabel:`Created`})})};var Os={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/create`,body:`json`,errors:{400:`BadRequestError`}};function ks(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 As={command:`create`,describe:`Create a saved event query`,builder:ks,handler:async e=>d({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 o();r({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?_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Os,{body:e,account_id:d}));l(t,{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 f=_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}),p=await u(`Creating`,async()=>a.send(Os,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var js={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/${e.query_id}`,response:!1,errors:{404:`NotFoundError`}};function Ms(e){return e.usage(`$0 cloudforce-one threat-intel events queries delete <query-id>
194
+ 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. Shape: {"<key>": unknown}.`}).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 ps={command:`update <raw-id>`,describe:`Update raw event data by raw ID (legacy)`,builder:fs,handler:async e=>d({command:`cloudforce-one threat-intel events legacy raw update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({data:m(e.data,`data`),source:i(e.source,`source`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`data`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(ds,{body:t,account_id:d,event_id:e[`event-id`],raw_id:e[`raw-id`]}));l(r,{successLabel:`Updated`});return}let f=_({data:m(e.data,`data`),source:i(e.source,`source`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`data`]]),p=await u(`Updating`,async()=>a.send(ds,{body:f,account_id:d,event_id:e[`event-id`],raw_id:e[`raw-id`]}));l(p,{successLabel:`Updated`})})},ms={command:`raw`,describe:`Operations for threat-intel.events.legacy.raw`,builder:e=>e.command(us).command(ps).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var hs={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/relate/${e.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function gs(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 _s={command:`create <event-id>`,describe:`Add event references (legacy)`,builder:gs,handler:async e=>d({command:`cloudforce-one threat-intel events legacy references create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({events:e.events}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>i.send(hs,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Created`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=_({events:e.events}),f=await u(`Creating`,async()=>i.send(hs,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Created`})})};var vs={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/relate/${e.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function ys(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 bs={command:`delete <event-id>`,describe:`Remove event references (legacy)`,builder:ys,handler:async e=>d({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 o();r({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?_({events:e.events}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;if(e.body!==void 0){let t=n,r=await u(`Deleting`,async()=>i.send(vs,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Deleted`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=_({events:e.events}),f=await u(`Deleting`,async()=>i.send(vs,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Deleted`})})},xs={command:`references`,describe:`Operations for threat-intel.events.legacy.references`,builder:e=>e.command(_s).command(bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ss={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event_tag/${e.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function Cs(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 ws={command:`create <event-id>`,describe:`Add tags to an event (legacy)`,builder:Cs,handler:async e=>d({command:`cloudforce-one threat-intel events legacy tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({tags:e.tags}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>i.send(Ss,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Created`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=_({tags:e.tags}),f=await u(`Creating`,async()=>i.send(Ss,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Created`})})};var Ts={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/event_tag/${e.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function Es(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 Ds={command:`delete <event-id>`,describe:`Remove tags from an event (legacy)`,builder:Es,handler:async e=>d({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 o();r({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?_({tags:e.tags}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;if(e.body!==void 0){let t=n,r=await u(`Deleting`,async()=>i.send(Ts,{body:t,account_id:a,event_id:e[`event-id`]}));l(r,{successLabel:`Deleted`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=_({tags:e.tags}),f=await u(`Deleting`,async()=>i.send(Ts,{body:d,account_id:a,event_id:e[`event-id`]}));l(f,{successLabel:`Deleted`})})},Os={command:`tags`,describe:`Operations for threat-intel.events.legacy.tags`,builder:e=>e.command(ws).command(Ds).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ks={command:`legacy`,describe:`Operations for threat-intel.events.legacy`,builder:e=>e.command(is).command(ss).command(ms).command(xs).command(Os).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var As={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events`,query:[`cursor`,`search`,`searchBranches`,`page`,`pageSize`,`orderBy`,`order`,`datasetId`,`forceRefresh`,`format`,`cache`],errors:{400:`BadRequestError`}};function js(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:'JSON-encoded. Structured search as a JSON array of {field, op, value} objects, AND\'d together. Max 10 conditions per request. `in` and `notIn` take an array of up to 100 values. Exclusions: `not` drops events without a value for the field; `notIn` and `notContains` keep them. On intelligence datasets, a `notIn` list containing `"unknown"` also drops them; analytics datasets treat `"unknown"` as a literal value.'}).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 Ms={command:`list`,describe:`List events`,builder:js,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(As,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Ns={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.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 Fs={command:`move <dataset-id>`,describe:`Move events to another dataset`,builder:Ps,handler:async e=>d({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 o();r({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?_({destDatasetId:i(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>d.send(Ns,{body:t,account_id:f,dataset_id:e[`dataset-id`],...n}));l(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 p=_({destDatasetId:i(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 m=await u(`Creating`,async()=>d.send(Ns,{body:p,account_id:f,dataset_id:e[`dataset-id`],...n}));l(m,{successLabel:`Created`})})};var Is={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/create`,body:`json`,errors:{400:`BadRequestError`}};function Ls(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 Rs={command:`create`,describe:`Create a saved event query`,builder:Ls,handler:async e=>d({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 o();r({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?_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Is,{body:e,account_id:d}));l(t,{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 f=_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}),p=await u(`Creating`,async()=>a.send(Is,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var zs={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/${e.query_id}`,response:!1,errors:{404:`NotFoundError`}};function Bs(e){return e.usage(`$0 cloudforce-one threat-intel events queries delete <query-id>
199
195
 
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 Ns={command:`delete <query-id>`,describe:`Delete a saved event query`,builder:Ms,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(js,{account_id:i,query_id:e[`query-id`]}));l(a,{successLabel:`Deleted`})})};var Ps={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/${e.query_id}`,errors:{404:`NotFoundError`}};function Fs(e){return e.usage(`$0 cloudforce-one threat-intel events queries get <query-id>
196
+ 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 Vs={command:`delete <query-id>`,describe:`Delete a saved event query`,builder:Bs,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(zs,{account_id:i,query_id:e[`query-id`]}));l(a,{successLabel:`Deleted`})})};var Hs={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/${e.query_id}`,errors:{404:`NotFoundError`}};function Us(e){return e.usage(`$0 cloudforce-one threat-intel events queries get <query-id>
201
197
 
202
- Returns a saved event query by its ID.`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Is={command:`get <query-id>`,describe:`Get a saved event query`,builder:Fs,handler:async e=>d({command:`cloudforce-one threat-intel events queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ps,{account_id:i,query_id:e[`query-id`]}));l(a,{successLabel:`Loaded`})})};var Ls={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries`,errors:{500:`InternalServerError`}};function Rs(e){return e.usage(`$0 cloudforce-one threat-intel events queries list
198
+ Returns a saved event query by its ID.`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ws={command:`get <query-id>`,describe:`Get a saved event query`,builder:Us,handler:async e=>d({command:`cloudforce-one threat-intel events queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Hs,{account_id:i,query_id:e[`query-id`]}));l(a,{successLabel:`Loaded`})})};var Gs={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries`,errors:{500:`InternalServerError`}};function Ks(e){return e.usage(`$0 cloudforce-one threat-intel events queries list
203
199
 
204
- Lists the account's saved event queries.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zs={command:`list`,describe:`List saved event queries`,builder:Rs,handler:async e=>d({command:`cloudforce-one threat-intel events queries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel events queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/queries`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ls,{account_id:i}));l(a,{successLabel:`Loaded`})})};var Bs={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/${e.query_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Vs(e){return e.usage(`$0 cloudforce-one threat-intel events queries update <query-id>
200
+ Lists the account's saved event queries.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qs={command:`list`,describe:`List saved event queries`,builder:Ks,handler:async e=>d({command:`cloudforce-one threat-intel events queries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({command:`cf cloudforce-one threat-intel events queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/queries`,pathParams:{},bodyKind:`none`});return}let n=await t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Gs,{account_id:i}));l(a,{successLabel:`Loaded`})})};var Js={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/queries/${e.query_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Ys(e){return e.usage(`$0 cloudforce-one threat-intel events queries update <query-id>
205
201
 
206
- Updates the given fields of a saved event query.`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Hs={command:`update <query-id>`,describe:`Update a saved event query`,builder:Vs,handler:async e=>d({command:`cloudforce-one threat-intel events queries update`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events queries update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Bs,{body:t,account_id:d,query_id:e[`query-id`]}));l(r,{successLabel:`Updated`});return}let f=_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}),p=await u(`Updating`,async()=>a.send(Bs,{body:f,account_id:d,query_id:e[`query-id`]}));l(p,{successLabel:`Updated`})})},Us={command:`queries`,describe:`Operations for threat-intel.events.queries`,builder:e=>e.command(As).command(Ns).command(Is).command(zs).command(Hs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ws={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/${e.dataset_id}/events/${e.event_id}/raw`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function Gs(e){return e.usage(`$0 cloudforce-one threat-intel events raw get <event-id>
202
+ Updates the given fields of a saved event query.`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xs={command:`update <query-id>`,describe:`Update a saved event query`,builder:Ys,handler:async e=>d({command:`cloudforce-one threat-intel events queries update`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({command:`cf cloudforce-one threat-intel events queries update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Js,{body:t,account_id:d,query_id:e[`query-id`]}));l(r,{successLabel:`Updated`});return}let f=_({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:i(e.name,`name`,`text`),query_json:i(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:i(e[`rule-scope`],`rule-scope`,`text`)}),p=await u(`Updating`,async()=>a.send(Js,{body:f,account_id:d,query_id:e[`query-id`]}));l(p,{successLabel:`Updated`})})},Zs={command:`queries`,describe:`Operations for threat-intel.events.queries`,builder:e=>e.command(Rs).command(Vs).command(Ws).command(qs).command(Xs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qs={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/datasets/${e.dataset_id}/events/${e.event_id}/raw`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function $s(e){return e.usage(`$0 cloudforce-one threat-intel events raw get <event-id>
207
203
 
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 Ks={command:`get <event-id>`,describe:`Get raw data for an event`,builder:Gs,handler:async e=>d({command:`cloudforce-one threat-intel events raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ws,{account_id:i,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));l(a,{successLabel:`Loaded`})})},qs={command:`raw`,describe:`Operations for threat-intel.events.raw`,builder:e=>e.command(Ks).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Js={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/relationships/create`,body:`json`,errors:{400:`BadRequestError`}};function Ys(e){return e.usage(`$0 cloudforce-one threat-intel events relationships create
204
+ 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 ec={command:`get <event-id>`,describe:`Get raw data for an event`,builder:$s,handler:async e=>d({command:`cloudforce-one threat-intel events raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Qs,{account_id:i,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));l(a,{successLabel:`Loaded`})})},tc={command:`raw`,describe:`Operations for threat-intel.events.raw`,builder:e=>e.command(ec).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/relationships/create`,body:`json`,errors:{400:`BadRequestError`}};function rc(e){return e.usage(`$0 cloudforce-one threat-intel events relationships create
209
205
 
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=>i(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 Xs={command:`create`,describe:`Create event relationships`,builder:Ys,handler:async e=>d({command:`cloudforce-one threat-intel events relationships create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({childIds:e[`child-ids`],datasetId:i(e[`dataset-id`],`dataset-id`,`text`),parentId:i(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Js,{body:e,account_id:d}));l(t,{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 f=_({childIds:e[`child-ids`],datasetId:i(e[`dataset-id`],`dataset-id`,`text`),parentId:i(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}),p=await u(`Creating`,async()=>a.send(Js,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Zs={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/by-id/${e.event_id}/relationships`,query:[`direction`,`maxDepth`,`relationshipTypes`,`indicatorTypeIds`,`datasetId`,`includeParent`,`page`,`pageSize`],errors:{400:`BadRequestError`}};function Qs(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 $s={command:`list`,describe:`List related events`,builder:Qs,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Zs,{account_id:a,event_id:e[`event-id`],...n}));l(d,{successLabel:`Loaded`})})},ec={command:`relationships`,describe:`Operations for threat-intel.events.relationships`,builder:e=>e.command(Xs).command($s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events`,query:[`forceRefresh`,`format`,`cache`],body:`json`,errors:{400:`BadRequestError`}};function nc(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=>i(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, AND\'d together. Max 10 conditions per request. `in` and `notIn` take an array of up to 100 values. Exclusions: `not` drops events without a value for the field; `notIn` and `notContains` keep them. On intelligence datasets, a `notIn` list containing `"unknown"` also drops them; analytics datasets treat `"unknown"` as a literal value. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)].'}).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. Shape: [[({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)]].'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const rc={command:`search`,describe:`Search events`,builder:nc,handler:async e=>d({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 o();r({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?_({cursor:i(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:i(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:h(e.search,`search`),searchBranches:f(e[`search-branches`],`search-branches`)}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),p=e.local?c:await s();if(e.accountId=p,e.body!==void 0){let e=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await u(`Loading`,async()=>d.send(tc,{body:e,account_id:p,...n}));l(t,{successLabel:`Loaded`});return}let m=_({cursor:i(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:i(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:h(e.search,`search`),searchBranches:f(e[`search-branches`],`search-branches`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await u(`Loading`,async()=>d.send(tc,{body:m,account_id:p,...n}));l(v,{successLabel:`Loaded`})})};var ic={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/targetIndustries/catalog`,errors:{400:`BadRequestError`}};function ac(e){return e.usage(`$0 cloudforce-one threat-intel events target-industries catalog list
206
+ 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=>i(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 ic={command:`create`,describe:`Create event relationships`,builder:rc,handler:async e=>d({command:`cloudforce-one threat-intel events relationships create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({childIds:e[`child-ids`],datasetId:i(e[`dataset-id`],`dataset-id`,`text`),parentId:i(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(nc,{body:e,account_id:d}));l(t,{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 f=_({childIds:e[`child-ids`],datasetId:i(e[`dataset-id`],`dataset-id`,`text`),parentId:i(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}),p=await u(`Creating`,async()=>a.send(nc,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var ac={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/by-id/${e.event_id}/relationships`,query:[`direction`,`maxDepth`,`relationshipTypes`,`indicatorTypeIds`,`datasetId`,`includeParent`,`page`,`pageSize`],errors:{400:`BadRequestError`}};function oc(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 sc={command:`list`,describe:`List related events`,builder:oc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ac,{account_id:a,event_id:e[`event-id`],...n}));l(d,{successLabel:`Loaded`})})},cc={command:`relationships`,describe:`Operations for threat-intel.events.relationships`,builder:e=>e.command(ic).command(sc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events`,query:[`forceRefresh`,`format`,`cache`],body:`json`,errors:{400:`BadRequestError`}};function uc(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=>i(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, AND\'d together. Max 10 conditions per request. `in` and `notIn` take an array of up to 100 values. Exclusions: `not` drops events without a value for the field; `notIn` and `notContains` keep them. On intelligence datasets, a `notIn` list containing `"unknown"` also drops them; analytics datasets treat `"unknown"` as a literal value. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)].'}).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. Shape: [[({"field": "attacker" | "attackerCountry" | "category" | ...more, "op": "equals" | "not" | "gt" | ...more, "value": string} | ...more)]].'}).option(`dry-run`,{type:`boolean`,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:`search`,describe:`Search events`,builder:uc,handler:async e=>d({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 o();r({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?_({cursor:i(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:i(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:h(e.search,`search`),searchBranches:f(e[`search-branches`],`search-branches`)}):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),p=e.local?c:await s();if(e.accountId=p,e.body!==void 0){let e=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await u(`Loading`,async()=>d.send(lc,{body:e,account_id:p,...n}));l(t,{successLabel:`Loaded`});return}let m=_({cursor:i(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:i(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:h(e.search,`search`),searchBranches:f(e[`search-branches`],`search-branches`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await u(`Loading`,async()=>d.send(lc,{body:m,account_id:p,...n}));l(v,{successLabel:`Loaded`})})};var fc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/targetIndustries/catalog`,errors:{400:`BadRequestError`}};function pc(e){return e.usage(`$0 cloudforce-one threat-intel events target-industries catalog list
211
207
 
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 oc={command:`list`,describe:`List all target industries`,builder:ac,handler:async e=>d({command:`cloudforce-one threat-intel events target-industries catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ic,{account_id:i}));l(a,{successLabel:`Loaded`})})},sc={command:`catalog`,describe:`Operations for threat-intel.events.target-industries.catalog`,builder:e=>e.command(oc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/targetIndustries`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function lc(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 uc={command:`list`,describe:`List target industries used in datasets`,builder:lc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(cc,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},dc={command:`target-industries`,describe:`Operations for threat-intel.events.target-industries`,builder:e=>e.command(uc).command(sc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fc={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function pc(e){return e.usage(`$0 cloudforce-one threat-intel events update <event-id>
208
+ 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 mc={command:`list`,describe:`List all target industries`,builder:pc,handler:async e=>d({command:`cloudforce-one threat-intel events target-industries catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(fc,{account_id:i}));l(a,{successLabel:`Loaded`})})},hc={command:`catalog`,describe:`Operations for threat-intel.events.target-industries.catalog`,builder:e=>e.command(mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var gc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/targetIndustries`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function _c(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 vc={command:`list`,describe:`List target industries used in datasets`,builder:_c,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(gc,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},yc={command:`target-industries`,describe:`Operations for threat-intel.events.target-industries`,builder:e=>e.command(vc).command(hc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var bc={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/${e.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function xc(e){return e.usage(`$0 cloudforce-one threat-intel events update <event-id>
213
209
 
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. Shape: {"<key>": unknown}.`}).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 mc={command:`update <event-id>`,describe:`Update an event`,builder:pc,handler:async e=>d({command:`cloudforce-one threat-intel events update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),createdAt:i(e[`created-at`],`created-at`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(fc,{body:t,account_id:d,event_id:e[`event-id`]}));l(r,{successLabel:`Updated`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset ID containing the event to update.`));let f=_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),createdAt:i(e[`created-at`],`created-at`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),p=await u(`Updating`,async()=>a.send(fc,{body:f,account_id:d,event_id:e[`event-id`]}));l(p,{successLabel:`Updated`})})},hc={command:`events`,describe:`Operations for threat-intel.events`,builder:e=>e.command(Za).command(io).command(so).command(jo).command(Ro).command(Vo).command(Wo).command(qo).command(ws).command(Ds).command(rc).command(mc).command(to).command(Oo).command(Fo).command(xs).command(Us).command(qs).command(ec).command(dc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var gc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/bulk`,body:`json`,errors:{400:`BadRequestError`}};function _c(e){return e.usage(`$0 cloudforce-one threat-intel indicators bulk-create
210
+ 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. Shape: {"<key>": unknown}.`}).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 Sc={command:`update <event-id>`,describe:`Update an event`,builder:xc,handler:async e=>d({command:`cloudforce-one threat-intel events update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),createdAt:i(e[`created-at`],`created-at`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(bc,{body:t,account_id:d,event_id:e[`event-id`]}));l(r,{successLabel:`Updated`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await v(`dataset-id`,`Dataset ID containing the event to update.`));let f=_({attacker:i(e.attacker,`attacker`,`text`),attackerCountry:i(e[`attacker-country`],`attacker-country`,`text`),category:i(e.category,`category`,`text`),createdAt:i(e[`created-at`],`created-at`,`text`),datasetId:i(e[`dataset-id`],`dataset-id`,`text`),date:i(e.date,`date`,`text`),event:i(e.event,`event`,`text`),indicator:i(e.indicator,`indicator`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),insight:i(e.insight,`insight`,`text`),raw:{data:m(e[`raw-data`],`raw-data`),source:i(e[`raw-source`],`raw-source`,`text`),tlp:i(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:i(e[`target-country`],`target-country`,`text`),targetIndustry:i(e[`target-industry`],`target-industry`,`text`),tlp:i(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),p=await u(`Updating`,async()=>a.send(bc,{body:f,account_id:d,event_id:e[`event-id`]}));l(p,{successLabel:`Updated`})})},Cc={command:`events`,describe:`Operations for threat-intel.events`,builder:e=>e.command(ao).command(po).command(go).command(zo).command(Ko).command(Yo).command(Qo).command(ts).command(Ms).command(Fs).command(dc).command(Sc).command(lo).command(Io).command(Uo).command(ks).command(Zs).command(tc).command(cc).command(yc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/bulk`,body:`json`,errors:{400:`BadRequestError`}};function Tc(e){return e.usage(`$0 cloudforce-one threat-intel indicators bulk-create
215
211
 
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. Shape: [{"indicatorType": string, "value": string, "autoCreateType"?: boolean, "relatedEvents"?: [{...}], "tags"?: [(string | {...})], ...more}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const vc={command:`bulk-create`,describe:`Create indicators in bulk`,builder:_c,handler:async e=>d({command:`cloudforce-one threat-intel indicators bulk-create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({autoCreateType:e[`auto-create-type`],indicators:h(e.indicators,`indicators`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>i.send(gc,{body:t,account_id:a,dataset_id:e[`dataset-id`]}));l(r,{successLabel:`Created`});return}if(e.indicators===void 0)throw Error(`--indicators is required (or pass --body with this field set).`);let d=_({autoCreateType:e[`auto-create-type`],indicators:h(e.indicators,`indicators`)}),f=await u(`Creating`,async()=>i.send(gc,{body:d,account_id:a,dataset_id:e[`dataset-id`]}));l(f,{successLabel:`Created`})})};var yc={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators`,query:[`indicatorIds`],errors:{400:`BadRequestError`,404:`NotFoundError`}};function bc(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 xc={command:`bulk-delete`,describe:`Delete indicators in bulk`,builder:bc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(yc,{account_id:a,dataset_id:e[`dataset-id`],...n}));l(d,{successLabel:`Deleted`})})};var Sc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/create`,body:`json`,errors:{400:`BadRequestError`}};function Cc(e){return e.usage(`$0 cloudforce-one threat-intel indicators create <dataset-id>
212
+ 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. Shape: [{"indicatorType": string, "value": string, "autoCreateType"?: boolean, "relatedEvents"?: [{...}], "tags"?: [(string | {...})], ...more}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ec={command:`bulk-create`,describe:`Create indicators in bulk`,builder:Tc,handler:async e=>d({command:`cloudforce-one threat-intel indicators bulk-create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({autoCreateType:e[`auto-create-type`],indicators:h(e.indicators,`indicators`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>i.send(wc,{body:t,account_id:a,dataset_id:e[`dataset-id`]}));l(r,{successLabel:`Created`});return}if(e.indicators===void 0)throw Error(`--indicators is required (or pass --body with this field set).`);let d=_({autoCreateType:e[`auto-create-type`],indicators:h(e.indicators,`indicators`)}),f=await u(`Creating`,async()=>i.send(wc,{body:d,account_id:a,dataset_id:e[`dataset-id`]}));l(f,{successLabel:`Created`})})};var Dc={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators`,query:[`indicatorIds`],errors:{400:`BadRequestError`,404:`NotFoundError`}};function Oc(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 kc={command:`bulk-delete`,describe:`Delete indicators in bulk`,builder:Oc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(Dc,{account_id:a,dataset_id:e[`dataset-id`],...n}));l(d,{successLabel:`Deleted`})})};var Ac={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/create`,body:`json`,errors:{400:`BadRequestError`}};function jc(e){return e.usage(`$0 cloudforce-one threat-intel indicators create <dataset-id>
217
213
 
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. Shape: [{"datasetId": string, "eventId": string}].`}).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:`create <dataset-id>`,describe:`Create an indicator`,builder:Cc,handler:async e=>d({command:`cloudforce-one threat-intel indicators create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({autoCreateType:e[`auto-create-type`],indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Sc,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(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 f=_({autoCreateType:e[`auto-create-type`],indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}),p=await u(`Creating`,async()=>a.send(Sc,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Created`})})};var Tc={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}`,errors:{404:`NotFoundError`}};function Ec(e){return e.usage(`$0 cloudforce-one threat-intel indicators delete <indicator-id>
214
+ 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. Shape: [{"datasetId": string, "eventId": string}].`}).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 Mc={command:`create <dataset-id>`,describe:`Create an indicator`,builder:jc,handler:async e=>d({command:`cloudforce-one threat-intel indicators create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({autoCreateType:e[`auto-create-type`],indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Ac,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(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 f=_({autoCreateType:e[`auto-create-type`],indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}),p=await u(`Creating`,async()=>a.send(Ac,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Created`})})};var Nc={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}`,errors:{404:`NotFoundError`}};function Pc(e){return e.usage(`$0 cloudforce-one threat-intel indicators delete <indicator-id>
219
215
 
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:Ec,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Tc,{account_id:i,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(a,{successLabel:`Deleted`})})};var Oc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}`,errors:{404:`NotFoundError`}};function kc(e){return e.usage(`$0 cloudforce-one threat-intel indicators get <indicator-id>
216
+ 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 Fc={command:`delete <indicator-id>`,describe:`Delete an indicator`,builder:Pc,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Nc,{account_id:i,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(a,{successLabel:`Deleted`})})};var Ic={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}`,errors:{404:`NotFoundError`}};function Lc(e){return e.usage(`$0 cloudforce-one threat-intel indicators get <indicator-id>
221
217
 
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 Ac={command:`get <indicator-id>`,describe:`Get an indicator`,builder:kc,handler:async e=>d({command:`cloudforce-one threat-intel indicators get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Oc,{account_id:i,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(a,{successLabel:`Loaded`})})};var jc={method:`GET`,path:e=>n`/accounts/${e.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 Mc(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 Nc={command:`list`,describe:`List indicators`,builder:Mc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(jc,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Pc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function Fc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships create <indicator-id>
218
+ 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 Rc={command:`get <indicator-id>`,describe:`Get an indicator`,builder:Lc,handler:async e=>d({command:`cloudforce-one threat-intel indicators get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ic,{account_id:i,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(a,{successLabel:`Loaded`})})};var zc={method:`GET`,path:e=>n`/accounts/${e.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 Bc(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 Vc={command:`list`,describe:`List indicators`,builder:Bc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(zc,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Hc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function Uc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships create <indicator-id>
223
219
 
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. Shape: {"<key>": unknown}.`}).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=>i(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 Ic={command:`create <indicator-id>`,describe:`Create an indicator relationship`,builder:Fc,handler:async e=>d({command:`cloudforce-one threat-intel indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Pc,{body:t,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(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 f=_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]),p=await u(`Creating`,async()=>a.send(Pc,{body:f,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(p,{successLabel:`Created`})})};var Lc={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships/${e.rel_uuid}`,errors:{400:`BadRequestError`}};function Rc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships delete <rel-uuid>
220
+ 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. Shape: {"<key>": unknown}.`}).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=>i(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 Wc={command:`create <indicator-id>`,describe:`Create an indicator relationship`,builder:Uc,handler:async e=>d({command:`cloudforce-one threat-intel indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Hc,{body:t,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(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 f=_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]),p=await u(`Creating`,async()=>a.send(Hc,{body:f,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(p,{successLabel:`Created`})})};var Gc={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships/${e.rel_uuid}`,errors:{400:`BadRequestError`}};function Kc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships delete <rel-uuid>
225
221
 
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 zc={command:`delete <rel-uuid>`,describe:`Delete an indicator relationship`,builder:Rc,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Lc,{account_id:i,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));l(a,{successLabel:`Deleted`})})};var Bc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships`,query:[`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Vc(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 Hc={command:`list`,describe:`List indicator relationships`,builder:Vc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Bc,{account_id:a,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],...n}));l(d,{successLabel:`Loaded`})})};var Uc={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships/${e.rel_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Wc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships update <rel-uuid>
222
+ 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 qc={command:`delete <rel-uuid>`,describe:`Delete an indicator relationship`,builder:Kc,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Gc,{account_id:i,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));l(a,{successLabel:`Deleted`})})};var Jc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships`,query:[`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Yc(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 Xc={command:`list`,describe:`List indicator relationships`,builder:Yc,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Jc,{account_id:a,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],...n}));l(d,{successLabel:`Loaded`})})};var Zc={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}/relationships/${e.rel_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Qc(e){return e.usage(`$0 cloudforce-one threat-intel indicators relationships update <rel-uuid>
227
223
 
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. Shape: {"<key>": unknown}.`}).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 Gc={command:`update <rel-uuid>`,describe:`Update an indicator relationship`,builder:Wc,handler:async e=>d({command:`cloudforce-one threat-intel indicators relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Uc,{body:t,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));l(r,{successLabel:`Updated`});return}let f=_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]),p=await u(`Updating`,async()=>a.send(Uc,{body:f,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));l(p,{successLabel:`Updated`})})},Kc={command:`relationships`,describe:`Operations for threat-intel.indicators.relationships`,builder:e=>e.command(Ic).command(zc).command(Hc).command(Gc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var qc={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/tags`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Jc(e){return e.usage(`$0 cloudforce-one threat-intel indicators tags list
224
+ 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. Shape: {"<key>": unknown}.`}).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 $c={command:`update <rel-uuid>`,describe:`Update an indicator relationship`,builder:Qc,handler:async e=>d({command:`cloudforce-one threat-intel indicators relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Zc,{body:t,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));l(r,{successLabel:`Updated`});return}let f=_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]),p=await u(`Updating`,async()=>a.send(Zc,{body:f,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));l(p,{successLabel:`Updated`})})},el={command:`relationships`,describe:`Operations for threat-intel.indicators.relationships`,builder:e=>e.command(Wc).command(qc).command(Xc).command($c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/tags`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function nl(e){return e.usage(`$0 cloudforce-one threat-intel indicators tags list
229
225
 
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 Yc={command:`list`,describe:`List tags on a dataset's indicators`,builder:Jc,handler:async e=>d({command:`cloudforce-one threat-intel indicators tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(qc,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Loaded`})})},Xc={command:`tags`,describe:`Operations for threat-intel.indicators.tags`,builder:e=>e.command(Yc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Zc={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicatorTypes/create`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function Qc(e){return e.usage(`$0 cloudforce-one threat-intel indicators types create <dataset-id>
226
+ 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 rl={command:`list`,describe:`List tags on a dataset's indicators`,builder:nl,handler:async e=>d({command:`cloudforce-one threat-intel indicators tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(tl,{account_id:i,dataset_id:e[`dataset-id`]}));l(a,{successLabel:`Loaded`})})},il={command:`tags`,describe:`Operations for threat-intel.indicators.tags`,builder:e=>e.command(rl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var al={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicatorTypes/create`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function ol(e){return e.usage(`$0 cloudforce-one threat-intel indicators types create <dataset-id>
231
227
 
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 $c={command:`create <dataset-id>`,describe:`Create an indicator type`,builder:Qc,handler:async e=>d({command:`cloudforce-one threat-intel indicators types create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({description:i(e.description,`description`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Zc,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(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 f=_({description:i(e.description,`description`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`)}),p=await u(`Creating`,async()=>a.send(Zc,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Created`})})};var el={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/indicator-types`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function tl(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 nl={command:`list`,describe:`List indicator types`,builder:tl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(el,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},rl={command:`types`,describe:`Operations for threat-intel.indicators.types`,builder:e=>e.command($c).command(nl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var il={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function al(e){return e.usage(`$0 cloudforce-one threat-intel indicators update <indicator-id>
228
+ 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 sl={command:`create <dataset-id>`,describe:`Create an indicator type`,builder:ol,handler:async e=>d({command:`cloudforce-one threat-intel indicators types create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({description:i(e.description,`description`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(al,{body:t,account_id:d,dataset_id:e[`dataset-id`]}));l(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 f=_({description:i(e.description,`description`,`text`),indicatorType:i(e[`indicator-type`],`indicator-type`,`text`)}),p=await u(`Creating`,async()=>a.send(al,{body:f,account_id:d,dataset_id:e[`dataset-id`]}));l(p,{successLabel:`Created`})})};var cl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/indicator-types`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function ll(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 ul={command:`list`,describe:`List indicator types`,builder:ll,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(cl,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},dl={command:`types`,describe:`Operations for threat-intel.indicators.types`,builder:e=>e.command(sl).command(ul).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fl={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/dataset/${e.dataset_id}/indicators/${e.indicator_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function pl(e){return e.usage(`$0 cloudforce-one threat-intel indicators update <indicator-id>
233
229
 
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. Shape: [{"datasetId": string, "eventId": string}].`}).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 ol={command:`update <indicator-id>`,describe:`Update an indicator`,builder:al,handler:async e=>d({command:`cloudforce-one threat-intel indicators update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(il,{body:t,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(r,{successLabel:`Updated`});return}let f=_({indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}),p=await u(`Updating`,async()=>a.send(il,{body:f,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(p,{successLabel:`Updated`})})},sl={command:`indicators`,describe:`Operations for threat-intel.indicators`,builder:e=>e.command(vc).command(xc).command(wc).command(Dc).command(Ac).command(Nc).command(ol).command(Kc).command(Xc).command(rl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cl={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/search`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,429:`TooManyRequestsError`,503:`ServiceUnavailableError`}};function ll(e){return e.usage(`$0 cloudforce-one threat-intel search
230
+ 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. Shape: [{"datasetId": string, "eventId": string}].`}).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 ml={command:`update <indicator-id>`,describe:`Update an indicator`,builder:pl,handler:async e=>d({command:`cloudforce-one threat-intel indicators update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(fl,{body:t,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(r,{successLabel:`Updated`});return}let f=_({indicatorType:i(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:h(e[`related-events`],`related-events`),tlp:i(e.tlp,`tlp`,`text`),value:i(e.value,`value`,`text`)}),p=await u(`Updating`,async()=>a.send(fl,{body:f,account_id:d,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));l(p,{successLabel:`Updated`})})},hl={command:`indicators`,describe:`Operations for threat-intel.indicators`,builder:e=>e.command(Ec).command(kc).command(Mc).command(Fc).command(Rc).command(Vc).command(ml).command(el).command(il).command(dl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var gl={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/search`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,429:`TooManyRequestsError`,503:`ServiceUnavailableError`}};function _l(e){return e.usage(`$0 cloudforce-one threat-intel search
235
231
 
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 ul={command:`search`,describe:`Search threat intelligence`,builder:ll,handler:async e=>d({command:`cloudforce-one threat-intel search`,classification:{safeFlags:[`include-analytics-datasets`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:i(e.query,`query`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Loading`,async()=>a.send(cl,{body:e,account_id:d}));l(t,{successLabel:`Loaded`});return}e.query===void 0&&(e.query=await v(`query`,`Search text, from 1 to 1000 characters after trimming.`));let f=_({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:i(e.query,`query`,`text`)}),p=await u(`Loading`,async()=>a.send(cl,{body:f,account_id:d}));l(p,{successLabel:`Loaded`})})};var dl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/categories/actors`,query:[`page`,`pageSize`,`value`,`filters`],errors:{400:`BadRequestError`}};function fl(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 pl={command:`list`,describe:`List threat actors`,builder:fl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(dl,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},ml={command:`actors`,describe:`Operations for threat-intel.tags.actors`,builder:e=>e.command(pl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var hl={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/categories/create`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function gl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories create
232
+ 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 vl={command:`search`,describe:`Search threat intelligence`,builder:_l,handler:async e=>d({command:`cloudforce-one threat-intel search`,classification:{safeFlags:[`include-analytics-datasets`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:i(e.query,`query`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Loading`,async()=>a.send(gl,{body:e,account_id:d}));l(t,{successLabel:`Loaded`});return}e.query===void 0&&(e.query=await v(`query`,`Search text, from 1 to 1000 characters after trimming.`));let f=_({entity_types:e[`entity-types`],include_analytics_datasets:e[`include-analytics-datasets`],limit:e.limit,query:i(e.query,`query`,`text`)}),p=await u(`Loading`,async()=>a.send(gl,{body:f,account_id:d}));l(p,{successLabel:`Loaded`})})};var yl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/categories/actors`,query:[`page`,`pageSize`,`value`,`filters`],errors:{400:`BadRequestError`}};function bl(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 xl={command:`list`,describe:`List threat actors`,builder:bl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(yl,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},Sl={command:`actors`,describe:`Operations for threat-intel.tags.actors`,builder:e=>e.command(xl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Cl={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/categories/create`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function wl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories create
237
233
 
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. Shape: [{"key": string, "kind": "string" | "number" | "enum" | ...more, "allowedValues"?: [string], "annotations"?: {...}, "deprecated"?: boolean, ...more}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,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 category`,builder:gl,handler:async e=>d({command:`cloudforce-one threat-intel tags categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(hl,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}),p=await u(`Creating`,async()=>a.send(hl,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var vl={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tag-categories/${e.category_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function yl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories delete <category-uuid>
234
+ 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. Shape: [{"key": string, "kind": "string" | "number" | "enum" | ...more, "allowedValues"?: [string], "annotations"?: {...}, "deprecated"?: boolean, ...more}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,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:wl,handler:async e=>d({command:`cloudforce-one threat-intel tags categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Cl,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await v(`name`,`The name field`));let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}),p=await u(`Creating`,async()=>a.send(Cl,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var El={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tag-categories/${e.category_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Dl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories delete <category-uuid>
239
235
 
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 bl={command:`delete <category-uuid>`,describe:`Delete a tag category`,builder:yl,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(vl,{account_id:i,category_uuid:e[`category-uuid`]}));l(a,{successLabel:`Deleted`})})};var xl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tag-categories/${e.category_uuid}`,errors:{404:`NotFoundError`}};function Sl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories get <category-uuid>
236
+ 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 Ol={command:`delete <category-uuid>`,describe:`Delete a tag category`,builder:Dl,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(El,{account_id:i,category_uuid:e[`category-uuid`]}));l(a,{successLabel:`Deleted`})})};var kl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tag-categories/${e.category_uuid}`,errors:{404:`NotFoundError`}};function Al(e){return e.usage(`$0 cloudforce-one threat-intel tags categories get <category-uuid>
241
237
 
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 Cl={command:`get <category-uuid>`,describe:`Get a tag category`,builder:Sl,handler:async e=>d({command:`cloudforce-one threat-intel tags categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(xl,{account_id:i,category_uuid:e[`category-uuid`]}));l(a,{successLabel:`Loaded`})})};var wl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/categories`,query:[`search`],errors:{400:`BadRequestError`}};function Tl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories list
238
+ 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 jl={command:`get <category-uuid>`,describe:`Get a tag category`,builder:Al,handler:async e=>d({command:`cloudforce-one threat-intel tags categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(kl,{account_id:i,category_uuid:e[`category-uuid`]}));l(a,{successLabel:`Loaded`})})};var Ml={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/categories`,query:[`search`],errors:{400:`BadRequestError`}};function Nl(e){return e.usage(`$0 cloudforce-one threat-intel tags categories list
243
239
 
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 El={command:`list`,describe:`List tag categories`,builder:Tl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(wl,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Dl={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tag-categories/${e.category_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function Ol(e){return e.usage(`$0 cloudforce-one threat-intel tags categories update <category-uuid>
240
+ 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:Nl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ml,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tag-categories/${e.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>
245
241
 
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. Shape: [{"key": string, "kind": "string" | "number" | "enum" | ...more, "allowedValues"?: [string], "annotations"?: {...}, "deprecated"?: boolean, ...more}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,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 <category-uuid>`,describe:`Update a tag category`,builder:Ol,handler:async e=>d({command:`cloudforce-one threat-intel tags categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Dl,{body:t,account_id:d,category_uuid:e[`category-uuid`]}));l(r,{successLabel:`Updated`});return}let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}),p=await u(`Updating`,async()=>a.send(Dl,{body:f,account_id:d,category_uuid:e[`category-uuid`]}));l(p,{successLabel:`Updated`})})},Al={command:`categories`,describe:`Operations for threat-intel.tags.categories`,builder:e=>e.command(_l).command(bl).command(Cl).command(El).command(kl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/create`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function jl(e){return e.usage(`$0 cloudforce-one threat-intel tags create
242
+ 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. Shape: [{"key": string, "kind": "string" | "number" | "enum" | ...more, "allowedValues"?: [string], "annotations"?: {...}, "deprecated"?: boolean, ...more}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,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:`update <category-uuid>`,describe:`Update a tag category`,builder:Fl,handler:async e=>d({command:`cloudforce-one threat-intel tags categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send($,{body:t,account_id:d,category_uuid:e[`category-uuid`]}));l(r,{successLabel:`Updated`});return}let f=_({description:i(e.description,`description`,`text`),name:i(e.name,`name`,`text`),schema:h(e.schema,`schema`)}),p=await u(`Updating`,async()=>a.send($,{body:f,account_id:d,category_uuid:e[`category-uuid`]}));l(p,{successLabel:`Updated`})})},Ll={command:`categories`,describe:`Operations for threat-intel.tags.categories`,builder:e=>e.command(Tl).command(Ol).command(jl).command(Pl).command(Il).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rl={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/create`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function zl(e){return e.usage(`$0 cloudforce-one threat-intel tags create
247
243
 
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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: [{"url": string, "description"?: (string | null)}]. ? marks optional keys.`}).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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: {"<key>": unknown}.'}).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=>i(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 Ml={command:`create`,describe:`Create a tag`,builder:jl,handler:async e=>d({command:`cloudforce-one threat-intel tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send($,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.value===void 0&&(e.value=await v(`value`,`The value field`));let f=_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]),p=await u(`Creating`,async()=>a.send($,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Nl={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Pl(e){return e.usage(`$0 cloudforce-one threat-intel tags delete <tag-uuid>
244
+ 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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: [{"url": string, "description"?: (string | null)}]. ? marks optional keys.`}).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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: {"<key>": unknown}.'}).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=>i(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:zl,handler:async e=>d({command:`cloudforce-one threat-intel tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Rl,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}e.value===void 0&&(e.value=await v(`value`,`The value field`));let f=_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]),p=await u(`Creating`,async()=>a.send(Rl,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var Vl={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Hl(e){return e.usage(`$0 cloudforce-one threat-intel tags delete <tag-uuid>
249
245
 
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 Fl={command:`delete <tag-uuid>`,describe:`Delete a tag`,builder:Pl,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Nl,{account_id:i,tag_uuid:e[`tag-uuid`]}));l(a,{successLabel:`Deleted`})})};var Il={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}`,errors:{404:`NotFoundError`}};function Ll(e){return e.usage(`$0 cloudforce-one threat-intel tags get <tag-uuid>
246
+ 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 Ul={command:`delete <tag-uuid>`,describe:`Delete a tag`,builder:Hl,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Vl,{account_id:i,tag_uuid:e[`tag-uuid`]}));l(a,{successLabel:`Deleted`})})};var Wl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}`,errors:{404:`NotFoundError`}};function Gl(e){return e.usage(`$0 cloudforce-one threat-intel tags get <tag-uuid>
251
247
 
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 Rl={command:`get <tag-uuid>`,describe:`Get a tag`,builder:Ll,handler:async e=>d({command:`cloudforce-one threat-intel tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Il,{account_id:i,tag_uuid:e[`tag-uuid`]}));l(a,{successLabel:`Loaded`})})};var zl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/indicators`,query:[`datasetIds`,`page`,`pageSize`,`indicatorType`,`relatedEvent`,`search`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Bl(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 number (default 1). page × pageSize may not exceed 10000.`}).option(`page-size`,{type:`number`,description:`Results per page (default 100, maximum 1000; larger values are clamped).`}).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 Vl={command:`list`,describe:`List a tag's indicators`,builder:Bl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(zl,{account_id:a,tag_uuid:e[`tag-uuid`],...n}));l(d,{successLabel:`Loaded`})})},Hl={command:`indicators`,describe:`Operations for threat-intel.tags.indicators`,builder:e=>e.command(Vl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ul={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags`,query:[`page`,`pageSize`,`search`,`categoryUuid`,`filters`,`cache`],errors:{400:`BadRequestError`}};function Wl(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 Gl={command:`list`,describe:`List tags`,builder:Wl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ul,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Kl={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships`,body:`json`,errors:{400:`BadRequestError`}};function ql(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. Shape: {"<key>": unknown}.`}).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=>i(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 Jl={command:`create <tag-uuid>`,describe:`Create a tag relationship`,builder:ql,handler:async e=>d({command:`cloudforce-one threat-intel tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({confidence:e.confidence,datasetId:i(e[`dataset-id`],`dataset-id`,`text`),metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Kl,{body:t,account_id:d,tag_uuid:e[`tag-uuid`]}));l(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 f=_({confidence:e.confidence,datasetId:i(e[`dataset-id`],`dataset-id`,`text`),metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]),p=await u(`Creating`,async()=>a.send(Kl,{body:f,account_id:d,tag_uuid:e[`tag-uuid`]}));l(p,{successLabel:`Created`})})};var Yl={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships/${e.rel_uuid}`,query:[`datasetId`],errors:{400:`BadRequestError`}};function Xl(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:Xl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(Yl,{account_id:a,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));l(d,{successLabel:`Deleted`})})};var Ql={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships`,query:[`datasets`,`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function $l(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:`Opaque cursor from a previous page. Results are ordered by createdAt ascending. Cursors in an older format are rejected; restart without a cursor.`}).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 eu={command:`list`,describe:`List tag relationships`,builder:$l,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ql,{account_id:a,tag_uuid:e[`tag-uuid`],...n}));l(d,{successLabel:`Loaded`})})};var tu={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships/${e.rel_uuid}`,query:[`datasetId`],body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function nu(e){return e.usage(`$0 cloudforce-one threat-intel tags relationships update <rel-uuid>
248
+ 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 Kl={command:`get <tag-uuid>`,describe:`Get a tag`,builder:Gl,handler:async e=>d({command:`cloudforce-one threat-intel tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Wl,{account_id:i,tag_uuid:e[`tag-uuid`]}));l(a,{successLabel:`Loaded`})})};var ql={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/indicators`,query:[`datasetIds`,`page`,`pageSize`,`indicatorType`,`relatedEvent`,`search`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Jl(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 number (default 1). page × pageSize may not exceed 10000.`}).option(`page-size`,{type:`number`,description:`Results per page (default 100, maximum 1000; larger values are clamped).`}).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 Yl={command:`list`,describe:`List a tag's indicators`,builder:Jl,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ql,{account_id:a,tag_uuid:e[`tag-uuid`],...n}));l(d,{successLabel:`Loaded`})})},Xl={command:`indicators`,describe:`Operations for threat-intel.tags.indicators`,builder:e=>e.command(Yl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Zl={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags`,query:[`page`,`pageSize`,`search`,`categoryUuid`,`filters`,`cache`],errors:{400:`BadRequestError`}};function Ql(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 $l={command:`list`,describe:`List tags`,builder:Ql,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Zl,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var eu={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships`,body:`json`,errors:{400:`BadRequestError`}};function tu(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. Shape: {"<key>": unknown}.`}).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=>i(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 nu={command:`create <tag-uuid>`,describe:`Create a tag relationship`,builder:tu,handler:async e=>d({command:`cloudforce-one threat-intel tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({confidence:e.confidence,datasetId:i(e[`dataset-id`],`dataset-id`,`text`),metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(eu,{body:t,account_id:d,tag_uuid:e[`tag-uuid`]}));l(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 f=_({confidence:e.confidence,datasetId:i(e[`dataset-id`],`dataset-id`,`text`),metadata:m(e.metadata,`metadata`),targetId:i(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:i(e.type,`type`,`text`)},[[`metadata`]]),p=await u(`Creating`,async()=>a.send(eu,{body:f,account_id:d,tag_uuid:e[`tag-uuid`]}));l(p,{successLabel:`Created`})})};var ru={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships/${e.rel_uuid}`,query:[`datasetId`],errors:{400:`BadRequestError`}};function iu(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 au={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:iu,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();if(e.accountId=a,!await b({force:!!e.force}))return;let d=await u(`Deleting`,async()=>i.send(ru,{account_id:a,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));l(d,{successLabel:`Deleted`})})};var ou={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships`,query:[`datasets`,`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function su(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:`Opaque cursor from a previous page. Results are ordered by createdAt ascending. Cursors in an older format are rejected; restart without a cursor.`}).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 cu={command:`list`,describe:`List tag relationships`,builder:su,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(ou,{account_id:a,tag_uuid:e[`tag-uuid`],...n}));l(d,{successLabel:`Loaded`})})};var lu={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}/relationships/${e.rel_uuid}`,query:[`datasetId`],body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function uu(e){return e.usage(`$0 cloudforce-one threat-intel tags relationships update <rel-uuid>
253
249
 
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. Shape: {"<key>": unknown}.`}).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 ru={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:nu,handler:async e=>d({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 o();r({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?_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Updating`,async()=>d.send(tu,{body:t,account_id:f,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));l(r,{successLabel:`Updated`});return}let p=_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await u(`Updating`,async()=>d.send(tu,{body:p,account_id:f,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));l(h,{successLabel:`Updated`})})},iu={command:`relationships`,describe:`Operations for threat-intel.tags.relationships`,builder:e=>e.command(Jl).command(Zl).command(eu).command(ru).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var au={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function ou(e){return e.usage(`$0 cloudforce-one threat-intel tags update <tag-uuid>
250
+ 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. Shape: {"<key>": unknown}.`}).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 du={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:uu,handler:async e=>d({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 o();r({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?_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]):g(e.body)});return}let a=e.body===void 0?void 0:g(e.body),d=await t(e),f=e.local?c:await s();if(e.accountId=f,e.body!==void 0){let t=a;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Updating`,async()=>d.send(lu,{body:t,account_id:f,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));l(r,{successLabel:`Updated`});return}let p=_({confidence:e.confidence,metadata:m(e.metadata,`metadata`),type:i(e.type,`type`,`text`)},[[`metadata`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await u(`Updating`,async()=>d.send(lu,{body:p,account_id:f,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));l(h,{successLabel:`Updated`})})},fu={command:`relationships`,describe:`Operations for threat-intel.tags.relationships`,builder:e=>e.command(nu).command(au).command(cu).command(du).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pu={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/events/tags/${e.tag_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function mu(e){return e.usage(`$0 cloudforce-one threat-intel tags update <tag-uuid>
255
251
 
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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: [{"url": string, "description"?: (string | null)}]. ? marks optional keys.`}).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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: {"<key>": unknown}.`}).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=>i(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 su={command:`update <tag-uuid>`,describe:`Update a tag`,builder:ou,handler:async e=>d({command:`cloudforce-one threat-intel tags update`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(au,{body:t,account_id:d,tag_uuid:e[`tag-uuid`]}));l(r,{successLabel:`Updated`});return}let f=_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]),p=await u(`Updating`,async()=>a.send(au,{body:f,account_id:d,tag_uuid:e[`tag-uuid`]}));l(p,{successLabel:`Updated`})})},cu={command:`tags`,describe:`Operations for threat-intel.tags`,builder:e=>e.command(Ml).command(Fl).command(Rl).command(Gl).command(su).command(ml).command(Al).command(Hl).command(iu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},lu={command:`threat-intel`,describe:`Operations for threat-intel`,builder:e=>e.command(ul).command(Ja).command(hc).command(sl).command(cu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var uu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/relevance/aggregate`,query:[`published_after`,`published_before`,`read`]};function du(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-relevance
252
+ 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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: [{"url": string, "description"?: (string | null)}]. ? marks optional keys.`}).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. Shape: [{"value": string, "confidence"?: (number | null), "tlp"?: ("red" | "amber" | "amber-strict" | ...more | null)}]. ? marks optional keys.`}).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. Shape: {"<key>": unknown}.`}).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=>i(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 hu={command:`update <tag-uuid>`,describe:`Update a tag`,builder:mu,handler:async e=>d({command:`cloudforce-one threat-intel tags update`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(pu,{body:t,account_id:d,tag_uuid:e[`tag-uuid`]}));l(r,{successLabel:`Updated`});return}let f=_({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:h(e.aliases,`aliases`),categoryUuid:i(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:i(e[`date-of-discovery`],`date-of-discovery`,`text`),description:i(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:h(e[`external-references`],`external-references`),internalAliases:h(e[`internal-aliases`],`internal-aliases`),internalDescription:i(e[`internal-description`],`internal-description`,`text`),lastSeen:i(e[`last-seen`],`last-seen`,`text`),properties:m(e.properties,`properties`),tlp:e.tlp,value:i(e.value,`value`,`text`)},[[`properties`]]),p=await u(`Updating`,async()=>a.send(pu,{body:f,account_id:d,tag_uuid:e[`tag-uuid`]}));l(p,{successLabel:`Updated`})})},gu={command:`tags`,describe:`Operations for threat-intel.tags`,builder:e=>e.command(Bl).command(Ul).command(Kl).command($l).command(hu).command(Sl).command(Ll).command(Xl).command(fu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_u={command:`threat-intel`,describe:`Operations for threat-intel`,builder:e=>e.command(vl).command(no).command(Cc).command(hl).command(gu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var vu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/relevance/aggregate`,query:[`published_after`,`published_before`,`read`]};function yu(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-relevance
257
253
 
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 fu={command:`aggregate-relevance`,describe:`Count Threat Signals articles by relevance band`,builder:du,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(uu,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var pu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`,query:[`published_after`,`published_before`,`read`,`pir_id`,`min_relevance`]};function mu(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-severity
254
+ 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 bu={command:`aggregate-relevance`,describe:`Count Threat Signals articles by relevance band`,builder:yu,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(vu,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var xu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`,query:[`published_after`,`published_before`,`read`,`pir_id`,`min_relevance`]};function Su(e){return e.usage(`$0 cloudforce-one threat-signals articles aggregate-severity
259
255
 
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 hu={command:`aggregate-severity`,describe:`Count Threat Signals articles by severity band`,builder:mu,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(pu,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var gu={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles`,body:`json`};function _u(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
256
+ 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 Cu={command:`aggregate-severity`,describe:`Count Threat Signals articles by severity band`,builder:Su,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(xu,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var wu={method:`PATCH`,path:e=>n`/accounts/${e.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
261
257
 
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 vu={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:_u,handler:async e=>d({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({article_ids:e[`article-ids`],read:e.read}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>i.send(gu,{body:e,account_id:a}));l(t,{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 d=_({article_ids:e[`article-ids`],read:e.read}),f=await u(`Updating`,async()=>i.send(gu,{body:d,account_id:a}));l(f,{successLabel:`Updated`})})};function yu(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
258
+ 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 Eu={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:Tu,handler:async e=>d({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({article_ids:e[`article-ids`],read:e.read}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let e=n,t=await u(`Updating`,async()=>i.send(wu,{body:e,account_id:a}));l(t,{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 d=_({article_ids:e[`article-ids`],read:e.read}),f=await u(`Updating`,async()=>i.send(wu,{body:d,account_id:a}));l(f,{successLabel:`Updated`})})};function Du(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
263
259
 
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 bu={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:yu,handler:async e=>d({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 o();r({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 t(e);let i=e.local?c:await s();e.accountId=i;let a=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l=await u(`Loading`,async()=>C(`/accounts/${i}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/content${a?`?`+a:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));S(l.toString(`utf-8`))})};var xu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}`};function Su(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
260
+ 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 Ou={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:Du,handler:async e=>d({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 o();r({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 t(e);let i=e.local?c:await s();e.accountId=i;let a=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l=await u(`Loading`,async()=>C(`/accounts/${i}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/content${a?`?`+a:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));S(l.toString(`utf-8`))})};var ku={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}`};function Au(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
265
261
 
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 Cu={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:Su,handler:async e=>d({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(xu,{account_id:i,article_id:e[`article-id`]}));l(a,{successLabel:`Loaded`})})};var wu={method:`GET`,path:e=>n`/accounts/${e.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`,`severity`,`sort`]};function Tu(e){return e.usage(`$0 cloudforce-one threat-signals articles list
262
+ 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 ju={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:Au,handler:async e=>d({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ku,{account_id:i,article_id:e[`article-id`]}));l(a,{successLabel:`Loaded`})})};var Mu={method:`GET`,path:e=>n`/accounts/${e.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`,`severity`,`sort`]};function Nu(e){return e.usage(`$0 cloudforce-one threat-signals articles list
267
263
 
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(`severity`,{type:`string`,array:!0,description:`Beta. Repeatable intrinsic severity band filter. An article matches any selected band, the band reported as its severity. Excludes articles without a severity. Like the severity field, severity is reported only while the account has an active Priority Intelligence Requirement; otherwise no articles match.`}).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 Eu={command:`list`,describe:`List Threat Signals articles`,builder:Tu,handler:async e=>d({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`],severity:e.severity,sort:e.sort};if(e.dryRun){let e=await o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(wu,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Du={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}`,body:`json`};function Ou(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
264
+ 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(`severity`,{type:`string`,array:!0,description:`Beta. Repeatable intrinsic severity band filter. An article matches any selected band, the band reported as its severity. Excludes articles without a severity. Like the severity field, severity is reported only while the account has an active Priority Intelligence Requirement; otherwise no articles match.`}).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:Nu,handler:async e=>d({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`],severity:e.severity,sort:e.sort};if(e.dryRun){let e=await o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Mu,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Fu={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}`,body:`json`};function Iu(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
269
265
 
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 ku={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:Ou,handler:async e=>d({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({read:e.read}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(Du,{body:t,account_id:a,article_id:e[`article-id`]}));l(r,{successLabel:`Updated`});return}if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let d=_({read:e.read}),f=await u(`Updating`,async()=>i.send(Du,{body:d,account_id:a,article_id:e[`article-id`]}));l(f,{successLabel:`Updated`})})};var Au={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/reprocess`,body:`json`};function ju(e){return e.usage(`$0 cloudforce-one threat-signals articles reprocess <article-id>
266
+ 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 Lu={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:Iu,handler:async e=>d({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({read:e.read}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(Fu,{body:t,account_id:a,article_id:e[`article-id`]}));l(r,{successLabel:`Updated`});return}if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let d=_({read:e.read}),f=await u(`Updating`,async()=>i.send(Fu,{body:d,account_id:a,article_id:e[`article-id`]}));l(f,{successLabel:`Updated`})})};var Ru={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/reprocess`,body:`json`};function zu(e){return e.usage(`$0 cloudforce-one threat-signals articles reprocess <article-id>
271
267
 
272
- Synchronously re-runs every processing step for a Threat Signals article: pull content, clean content, extract IOCs, filter IOCs, summary, CVE tags, IOC context, article tags, and Event publication. Replaces the article's summary, AI tags, and indicators; indicators no longer found are removed. Creates a Threat Event only when the article has none; an existing Event is never updated. Takes over the article from any queued processing. Requires a paid Threat Signals subscription and the Cloudforce One Write permission.`).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mu={command:`reprocess <article-id>`,describe:`Reprocess a Threat Signals article`,builder:ju,handler:async n=>d({command:`cloudforce-one threat-signals articles reprocess`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one threat-signals articles reprocess`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${n[`article-id`]==null?`<article-id>`:encodeURIComponent(String(n[`article-id`]))}/reprocess`,pathParams:{"article-id":String(n[`article-id`]??``)},bodyKind:`json`,body:n.body===void 0?void 0:g(n.body)});return}let i=n.body===void 0?void 0:g(n.body),a=await t(n),d=n.local?c:await s();if(n.accountId=d,n.body!==void 0){let e=i,t=await u(`Creating`,async()=>a.send(Au,{body:e,account_id:d,article_id:n[`article-id`]}));l(t,{successLabel:`Created`});return}let f=await u(`Creating`,async()=>e(a,`POST`,`/accounts/${d}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(n[`article-id`]))}/reprocess`));l(f,{successLabel:`Created`})})};var Nu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/skills/${e.skill_id}/output`};function Pu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
268
+ Synchronously re-runs every processing step for a Threat Signals article: pull content, clean content, extract IOCs, filter IOCs, summary, CVE tags, IOC context, article tags, and Event publication. Replaces the article's summary, AI tags, and indicators; indicators no longer found are removed. Creates a Threat Event only when the article has none; an existing Event is never updated. Takes over the article from any queued processing. Requires a paid Threat Signals subscription and the Cloudforce One Write permission.`).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bu={command:`reprocess <article-id>`,describe:`Reprocess a Threat Signals article`,builder:zu,handler:async n=>d({command:`cloudforce-one threat-signals articles reprocess`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one threat-signals articles reprocess`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${n[`article-id`]==null?`<article-id>`:encodeURIComponent(String(n[`article-id`]))}/reprocess`,pathParams:{"article-id":String(n[`article-id`]??``)},bodyKind:`json`,body:n.body===void 0?void 0:g(n.body)});return}let i=n.body===void 0?void 0:g(n.body),a=await t(n),d=n.local?c:await s();if(n.accountId=d,n.body!==void 0){let e=i,t=await u(`Creating`,async()=>a.send(Ru,{body:e,account_id:d,article_id:n[`article-id`]}));l(t,{successLabel:`Created`});return}let f=await u(`Creating`,async()=>e(a,`POST`,`/accounts/${d}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(n[`article-id`]))}/reprocess`));l(f,{successLabel:`Created`})})};var Vu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/skills/${e.skill_id}/output`};function Hu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
273
269
 
274
- 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 Fu={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:Pu,handler:async e=>d({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Nu,{account_id:i,article_id:e[`article-id`],skill_id:e[`skill-id`]}));l(a,{successLabel:`Loaded`})})};var Iu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/skills`};function Lu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills list
270
+ 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 Uu={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:Hu,handler:async e=>d({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Vu,{account_id:i,article_id:e[`article-id`],skill_id:e[`skill-id`]}));l(a,{successLabel:`Loaded`})})};var Wu={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/skills`};function Gu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills list
275
271
 
276
- 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 Ru={command:`list`,describe:`List Threat Signals article custom skills`,builder:Lu,handler:async e=>d({command:`cloudforce-one threat-signals articles skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Iu,{account_id:i,article_id:e[`article-id`]}));l(a,{successLabel:`Loaded`})})};var zu={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/skills/${e.skill_id}/run`,body:`json`};function Bu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills run <skill-id>
272
+ 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 Ku={command:`list`,describe:`List Threat Signals article custom skills`,builder:Gu,handler:async e=>d({command:`cloudforce-one threat-signals articles skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Wu,{account_id:i,article_id:e[`article-id`]}));l(a,{successLabel:`Loaded`})})};var qu={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/skills/${e.skill_id}/run`,body:`json`};function Ju(e){return e.usage(`$0 cloudforce-one threat-signals articles skills run <skill-id>
277
273
 
278
- 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 Vu={command:`run <skill-id>`,describe:`Run and persist skill output for a Threat Signals article`,builder:Bu,handler:async n=>d({command:`cloudforce-one threat-signals articles skills run`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one threat-signals articles skills run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${n[`article-id`]==null?`<article-id>`:encodeURIComponent(String(n[`article-id`]))}/skills/${n[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(n[`skill-id`]))}/run`,pathParams:{"article-id":String(n[`article-id`]??``),"skill-id":String(n[`skill-id`]??``)},bodyKind:`json`,body:n.body===void 0?void 0:g(n.body)});return}let i=n.body===void 0?void 0:g(n.body),a=await t(n),d=n.local?c:await s();if(n.accountId=d,n.body!==void 0){let e=i,t=await u(`Creating`,async()=>a.send(zu,{body:e,account_id:d,article_id:n[`article-id`],skill_id:n[`skill-id`]}));l(t,{successLabel:`Created`});return}let f=await u(`Creating`,async()=>e(a,`POST`,`/accounts/${d}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(n[`article-id`]))}/skills/${encodeURIComponent(String(n[`skill-id`]))}/run`));l(f,{successLabel:`Created`})})},Hu={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(Fu).command(Ru).command(Vu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Uu={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/tags`,body:`json`};function Wu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
274
+ 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 Yu={command:`run <skill-id>`,describe:`Run and persist skill output for a Threat Signals article`,builder:Ju,handler:async n=>d({command:`cloudforce-one threat-signals articles skills run`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await o();r({command:`cf cloudforce-one threat-signals articles skills run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${n[`article-id`]==null?`<article-id>`:encodeURIComponent(String(n[`article-id`]))}/skills/${n[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(n[`skill-id`]))}/run`,pathParams:{"article-id":String(n[`article-id`]??``),"skill-id":String(n[`skill-id`]??``)},bodyKind:`json`,body:n.body===void 0?void 0:g(n.body)});return}let i=n.body===void 0?void 0:g(n.body),a=await t(n),d=n.local?c:await s();if(n.accountId=d,n.body!==void 0){let e=i,t=await u(`Creating`,async()=>a.send(qu,{body:e,account_id:d,article_id:n[`article-id`],skill_id:n[`skill-id`]}));l(t,{successLabel:`Created`});return}let f=await u(`Creating`,async()=>e(a,`POST`,`/accounts/${d}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(n[`article-id`]))}/skills/${encodeURIComponent(String(n[`skill-id`]))}/run`));l(f,{successLabel:`Created`})})},Xu={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(Uu).command(Ku).command(Yu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Zu={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/tags`,body:`json`};function Qu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
279
275
 
280
- 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 Gu={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:Wu,handler:async e=>d({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({tag_id:i(e[`tag-id`],`tag-id`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Uu,{body:t,account_id:d,article_id:e[`article-id`]}));l(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 f=_({tag_id:i(e[`tag-id`],`tag-id`,`text`)}),p=await u(`Creating`,async()=>a.send(Uu,{body:f,account_id:d,article_id:e[`article-id`]}));l(p,{successLabel:`Created`})})};var Ku={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/tag`};function qu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
276
+ 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 $u={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:Qu,handler:async e=>d({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({tag_id:i(e[`tag-id`],`tag-id`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Creating`,async()=>a.send(Zu,{body:t,account_id:d,article_id:e[`article-id`]}));l(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 f=_({tag_id:i(e[`tag-id`],`tag-id`,`text`)}),p=await u(`Creating`,async()=>a.send(Zu,{body:f,account_id:d,article_id:e[`article-id`]}));l(p,{successLabel:`Created`})})};var ed={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/tag`};function td(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
281
277
 
282
- 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 Ju={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:qu,handler:async e=>d({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(Ku,{account_id:i,article_id:e[`article-id`]}));l(a,{successLabel:`Created`})})};var Yu={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/tags/${e.tag_id}`};function Xu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
278
+ 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 nd={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:td,handler:async e=>d({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Creating`,async()=>n.send(ed,{account_id:i,article_id:e[`article-id`]}));l(a,{successLabel:`Created`})})};var rd={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/articles/${e.article_id}/tags/${e.tag_id}`};function id(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
283
279
 
284
- 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 Zu={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:Xu,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(Yu,{account_id:i,article_id:e[`article-id`],tag_id:e[`tag-id`]}));l(a,{successLabel:`Deleted`})})},Qu={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(Gu).command(Ju).command(Zu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$u={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(fu).command(hu).command(vu).command(Cu).command(bu).command(Eu).command(ku).command(Mu).command(Hu).command(Qu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ed={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/categories`};function td(e){return e.usage(`$0 cloudforce-one threat-signals categories list
280
+ 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 ad={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:id,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!await b({force:!!e.force}))return;let a=await u(`Deleting`,async()=>n.send(rd,{account_id:i,article_id:e[`article-id`],tag_id:e[`tag-id`]}));l(a,{successLabel:`Deleted`})})},od={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command($u).command(nd).command(ad).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},sd={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(bu).command(Cu).command(Eu).command(ju).command(Ou).command(Pu).command(Lu).command(Bu).command(Xu).command(od).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/categories`};function ld(e){return e.usage(`$0 cloudforce-one threat-signals categories list
285
281
 
286
- 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 nd={command:`list`,describe:`List Threat Signals feed categories`,builder:td,handler:async e=>d({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(ed,{account_id:i}));l(a,{successLabel:`Loaded`})})},rd={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(nd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var id={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds`,body:`json`,errors:{403:`ForbiddenError`,503:`ServiceUnavailableError`}};function ad(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=>i(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 od={command:`create`,describe:`Create Threat Signals feed`,builder:ad,handler:async e=>d({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({category_id:e[`category-id`],curated_feed_id:i(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`),url:i(e.url,`url`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(id,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}let f=_({category_id:e[`category-id`],curated_feed_id:i(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`),url:i(e.url,`url`,`text`)}),p=await u(`Creating`,async()=>a.send(id,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var sd={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}`};function cd(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
282
+ 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 ud={command:`list`,describe:`List Threat Signals feed categories`,builder:ld,handler:async e=>d({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(cd,{account_id:i}));l(a,{successLabel:`Loaded`})})},dd={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(ud).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fd={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds`,body:`json`,errors:{403:`ForbiddenError`,503:`ServiceUnavailableError`}};function pd(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=>i(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 md={command:`create`,describe:`Create Threat Signals feed`,builder:pd,handler:async e=>d({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({category_id:e[`category-id`],curated_feed_id:i(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`),url:i(e.url,`url`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(fd,{body:e,account_id:d}));l(t,{successLabel:`Created`});return}let f=_({category_id:e[`category-id`],curated_feed_id:i(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`),url:i(e.url,`url`,`text`)}),p=await u(`Creating`,async()=>a.send(fd,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var hd={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}`};function gd(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
287
283
 
288
- 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 ld={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:cd,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!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 a=await u(`Deleting`,async()=>n.send(sd,{account_id:i,feed_id:e[`feed-id`]}));l(a,{successLabel:`Deleted`})})};function ud(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
284
+ 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 _d={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:gd,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!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 a=await u(`Deleting`,async()=>n.send(hd,{account_id:i,feed_id:e[`feed-id`]}));l(a,{successLabel:`Deleted`})})};function vd(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
289
285
 
290
- 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 dd={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:ud,handler:async e=>d({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 o();r({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 t(e);let i=e.local?c:await s();e.accountId=i;let a=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l=await u(`Loading`,async()=>C(`/accounts/${i}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(e[`feed-id`]))}/raw${a?`?`+a:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));S(l.toString(`utf-8`))})};var fd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds`,query:[`page`,`per_page`,`limit`,`sort`,`category`,`source_type`,`enabled`,`status`],errors:{503:`ServiceUnavailableError`}};function pd(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
286
+ 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 yd={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:vd,handler:async e=>d({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 o();r({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 t(e);let i=e.local?c:await s();e.accountId=i;let a=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l=await u(`Loading`,async()=>C(`/accounts/${i}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(e[`feed-id`]))}/raw${a?`?`+a:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));S(l.toString(`utf-8`))})};var bd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds`,query:[`page`,`per_page`,`limit`,`sort`,`category`,`source_type`,`enabled`,`status`],errors:{503:`ServiceUnavailableError`}};function xd(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
291
287
 
292
- 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 md={command:`list`,describe:`List Threat Signals feeds`,builder:pd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(fd,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var hd={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/poll`,query:[`feed_id`]};function gd(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
288
+ 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 Sd={command:`list`,describe:`List Threat Signals feeds`,builder:xd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(bd,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Cd={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/poll`,query:[`feed_id`]};function wd(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
293
289
 
294
- 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 _d={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:gd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Creating`,async()=>i.send(hd,{account_id:a,...n}));l(d,{successLabel:`Created`})})};var vd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}/skills`};function yd(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
290
+ 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:wd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Creating`,async()=>i.send(Cd,{account_id:a,...n}));l(d,{successLabel:`Created`})})};var Ed={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}/skills`};function Dd(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
295
291
 
296
- 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 bd={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:yd,handler:async e=>d({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(vd,{account_id:i,feed_id:e[`feed-id`]}));l(a,{successLabel:`Loaded`})})};var xd={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}/skills`,body:`json`};function Sd(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
292
+ 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 Od={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:Dd,handler:async e=>d({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Ed,{account_id:i,feed_id:e[`feed-id`]}));l(a,{successLabel:`Loaded`})})};var kd={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}/skills`,body:`json`};function Ad(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
297
293
 
298
- 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 Cd={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:Sd,handler:async e=>d({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({skill_ids:e[`skill-ids`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(xd,{body:t,account_id:a,feed_id:e[`feed-id`]}));l(r,{successLabel:`Updated`});return}if(e[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let d=_({skill_ids:e[`skill-ids`]}),f=await u(`Updating`,async()=>i.send(xd,{body:d,account_id:a,feed_id:e[`feed-id`]}));l(f,{successLabel:`Updated`})})},wd={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(bd).command(Cd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Td={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}`,body:`json`};function Ed(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
294
+ 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 jd={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:Ad,handler:async e=>d({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({skill_ids:e[`skill-ids`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(kd,{body:t,account_id:a,feed_id:e[`feed-id`]}));l(r,{successLabel:`Updated`});return}if(e[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let d=_({skill_ids:e[`skill-ids`]}),f=await u(`Updating`,async()=>i.send(kd,{body:d,account_id:a,feed_id:e[`feed-id`]}));l(f,{successLabel:`Updated`})})},Md={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(Od).command(jd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Nd={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/feeds/${e.feed_id}`,body:`json`};function Pd(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
299
295
 
300
- 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=>i(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:Ed,handler:async e=>d({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({category_id:e[`category-id`],display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Td,{body:t,account_id:d,feed_id:e[`feed-id`]}));l(r,{successLabel:`Updated`});return}let f=_({category_id:e[`category-id`],display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`)}),p=await u(`Updating`,async()=>a.send(Td,{body:f,account_id:d,feed_id:e[`feed-id`]}));l(p,{successLabel:`Updated`})})},Od={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(od).command(ld).command(dd).command(md).command(_d).command(Dd).command(wd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var kd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/indicators`,query:[`feed_id`,`article_id`,`search`,`per_page`,`sort`,`include_total`,`cursor`]};function Ad(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
296
+ 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=>i(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 Fd={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:Pd,handler:async e=>d({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({category_id:e[`category-id`],display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(Nd,{body:t,account_id:d,feed_id:e[`feed-id`]}));l(r,{successLabel:`Updated`});return}let f=_({category_id:e[`category-id`],display_name:i(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:i(e.title,`title`,`text`)}),p=await u(`Updating`,async()=>a.send(Nd,{body:f,account_id:d,feed_id:e[`feed-id`]}));l(p,{successLabel:`Updated`})})},Id={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(md).command(_d).command(yd).command(Sd).command(Td).command(Fd).command(Md).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ld={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/indicators`,query:[`feed_id`,`article_id`,`search`,`per_page`,`sort`,`include_total`,`cursor`]};function Rd(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
301
297
 
302
- 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 jd={command:`list`,describe:`List Threat Signals article indicators`,builder:Ad,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(kd,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},Md={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(jd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Nd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/search`,query:[`query`,`max_results`,`feed_id`]};function Pd(e){return e.usage(`$0 cloudforce-one threat-signals search
298
+ 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 zd={command:`list`,describe:`List Threat Signals article indicators`,builder:Rd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Ld,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})},Bd={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(zd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vd={method:`GET`,path:e=>n`/accounts/${e.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
303
299
 
304
- 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 Fd={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:Pd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Nd,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Id={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills`,body:`json`};function Ld(e){return e.usage(`$0 cloudforce-one threat-signals skills create
300
+ 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 Ud={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:Hd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Vd,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Wd={method:`POST`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills`,body:`json`};function Gd(e){return e.usage(`$0 cloudforce-one threat-signals skills create
305
301
 
306
- 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=>i(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 Rd={command:`create`,describe:`Create Threat Signals skill`,builder:Ld,handler:async e=>d({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`),type:e.type}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Id,{body:e,account_id:d}));l(t,{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 f=_({name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`),type:e.type}),p=await u(`Creating`,async()=>a.send(Id,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var zd={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}`};function Bd(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
302
+ 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=>i(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 Kd={command:`create`,describe:`Create Threat Signals skill`,builder:Gd,handler:async e=>d({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`),type:e.type}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let e=n,t=await u(`Creating`,async()=>a.send(Wd,{body:e,account_id:d}));l(t,{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 f=_({name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`),type:e.type}),p=await u(`Creating`,async()=>a.send(Wd,{body:f,account_id:d}));l(p,{successLabel:`Created`})})};var qd={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}`};function Jd(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
307
303
 
308
- 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 Vd={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:Bd,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!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 a=await u(`Deleting`,async()=>n.send(zd,{account_id:i,skill_id:e[`skill-id`]}));l(a,{successLabel:`Deleted`})})};var Hd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}`};function Ud(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
304
+ 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 Yd={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:Jd,handler:async e=>d({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 o();r({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 t(e),i=e.local?c:await s();if(e.accountId=i,!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 a=await u(`Deleting`,async()=>n.send(qd,{account_id:i,skill_id:e[`skill-id`]}));l(a,{successLabel:`Deleted`})})};var Xd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}`};function Zd(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
309
305
 
310
- 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 Wd={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:Ud,handler:async e=>d({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Hd,{account_id:i,skill_id:e[`skill-id`]}));l(a,{successLabel:`Loaded`})})};var Gd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills`,query:[`page`,`per_page`]};function Kd(e){return e.usage(`$0 cloudforce-one threat-signals skills list
306
+ 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 Qd={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:Zd,handler:async e=>d({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Xd,{account_id:i,skill_id:e[`skill-id`]}));l(a,{successLabel:`Loaded`})})};var $d={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills`,query:[`page`,`per_page`]};function ef(e){return e.usage(`$0 cloudforce-one threat-signals skills list
311
307
 
312
- 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 qd={command:`list`,describe:`List Threat Signals skills`,builder:Kd,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send(Gd,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var Jd={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}/tag-categories`};function Yd(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
308
+ 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 tf={command:`list`,describe:`List Threat Signals skills`,builder:ef,handler:async e=>d({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 o();r({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 i=await t(e),a=e.local?c:await s();e.accountId=a;let d=await u(`Loading`,async()=>i.send($d,{account_id:a,...n}));l(d,{successLabel:`Loaded`})})};var nf={method:`GET`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}/tag-categories`};function rf(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
313
309
 
314
- 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 Xd={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:Yd,handler:async e=>d({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(Jd,{account_id:i,skill_id:e[`skill-id`]}));l(a,{successLabel:`Loaded`})})};var Zd={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}/tag-categories`,body:`json`};function Qd(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
310
+ 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 af={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:rf,handler:async e=>d({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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 t(e),i=e.local?c:await s();e.accountId=i;let a=await u(`Loading`,async()=>n.send(nf,{account_id:i,skill_id:e[`skill-id`]}));l(a,{successLabel:`Loaded`})})};var of={method:`PUT`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}/tag-categories`,body:`json`};function sf(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
315
311
 
316
- 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 $d={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:Qd,handler:async e=>d({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({category_uuids:e[`category-uuids`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(Zd,{body:t,account_id:a,skill_id:e[`skill-id`]}));l(r,{successLabel:`Updated`});return}if(e[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let d=_({category_uuids:e[`category-uuids`]}),f=await u(`Updating`,async()=>i.send(Zd,{body:d,account_id:a,skill_id:e[`skill-id`]}));l(f,{successLabel:`Updated`})})},ef={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(Xd).command($d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tf={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}`,body:`json`};function nf(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
312
+ 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 cf={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:sf,handler:async e=>d({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({category_uuids:e[`category-uuids`]}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),i=await t(e),a=e.local?c:await s();if(e.accountId=a,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>i.send(of,{body:t,account_id:a,skill_id:e[`skill-id`]}));l(r,{successLabel:`Updated`});return}if(e[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let d=_({category_uuids:e[`category-uuids`]}),f=await u(`Updating`,async()=>i.send(of,{body:d,account_id:a,skill_id:e[`skill-id`]}));l(f,{successLabel:`Updated`})})},lf={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(af).command(cf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var uf={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/cloudforce-one/v2/threat-signals/skills/${e.skill_id}`,body:`json`};function df(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
317
313
 
318
- 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 rf={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:nf,handler:async e=>d({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({config:i(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(tf,{body:t,account_id:d,skill_id:e[`skill-id`]}));l(r,{successLabel:`Updated`});return}let f=_({config:i(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`)}),p=await u(`Updating`,async()=>a.send(tf,{body:f,account_id:d,skill_id:e[`skill-id`]}));l(p,{successLabel:`Updated`})})},af={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(Rd).command(Vd).command(Wd).command(qd).command(rf).command(ef).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},of={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(Fd).command($u).command(rd).command(Od).command(Md).command(af).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},sf={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(ae).command(be).command(Bt).command(Hn).command(gi).command(Fi).command(lu).command(of).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{sf as default};
314
+ 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 ff={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:df,handler:async e=>d({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();r({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?_({config:i(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`)}):g(e.body)});return}let n=e.body===void 0?void 0:g(e.body),a=await t(e),d=e.local?c:await s();if(e.accountId=d,e.body!==void 0){let t=n,r=await u(`Updating`,async()=>a.send(uf,{body:t,account_id:d,skill_id:e[`skill-id`]}));l(r,{successLabel:`Updated`});return}let f=_({config:i(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:i(e.name,`name`,`text`),output_schema:i(e[`output-schema`],`output-schema`,`text`),prompt:i(e.prompt,`prompt`,`text`)}),p=await u(`Updating`,async()=>a.send(uf,{body:f,account_id:d,skill_id:e[`skill-id`]}));l(p,{successLabel:`Updated`})})},pf={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(Kd).command(Yd).command(Qd).command(tf).command(ff).command(lf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},mf={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(Ud).command(sd).command(dd).command(Id).command(Bd).command(pf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},hf={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(ae).command(be).command(qt).command(Yn).command(Ci).command(Hi).command(_u).command(mf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{hf as default};