cf 0.13.0 → 0.15.0

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 (455) hide show
  1. package/dist/_meta/commands.json +6724 -3970
  2. package/dist/_meta/hand-written-commands.json +150 -32
  3. package/dist/_meta/schemas.json +2083 -2159
  4. package/dist/abuse-reports-BAQR1w79.mjs +26 -0
  5. package/dist/access-C8KMplzp.mjs +27 -0
  6. package/dist/account-B-KQSR0L.mjs +12 -0
  7. package/dist/account-tags-EncLJpLc.mjs +15 -0
  8. package/dist/accounts-BA4Mp3A_.mjs +132 -0
  9. package/dist/acm-ByxUJcqF.mjs +15 -0
  10. package/dist/addressing-C-ym0h0G.mjs +93 -0
  11. package/dist/agent-memory-CkPSiZDI.mjs +34 -0
  12. package/dist/ai-DkE_Q64s.mjs +31 -0
  13. package/dist/ai-audit-pPcjYWI5.mjs +6 -0
  14. package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
  15. package/dist/ai-search-DLD_kDS1.mjs +79 -0
  16. package/dist/ai-security-jyZcBl9g.mjs +10 -0
  17. package/dist/alerting-DOROjm8E.mjs +56 -0
  18. package/dist/analytics-rQ-h-plT.mjs +21 -0
  19. package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
  20. package/dist/{lifecycle-XswDq0ZB.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  21. package/dist/api-security-B8p8vp8u.mjs +154 -0
  22. package/dist/argo-g8SjUb_t.mjs +10 -0
  23. package/dist/artifacts-B1PaeF5h.mjs +43 -0
  24. package/dist/audit-logs-DmU_PHy_.mjs +4 -0
  25. package/dist/auth-CZqics6E.mjs +2 -0
  26. package/dist/auth-Cp7gT-AF.mjs +8 -0
  27. package/dist/billing-CvTbUg-H.mjs +23 -0
  28. package/dist/bot-management-z53tbcbH.mjs +9 -0
  29. package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
  30. package/dist/brand-protection-DzV211IQ.mjs +27 -0
  31. package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
  32. package/dist/browser-run-DYQvMAyo.mjs +46 -0
  33. package/dist/build-BPIp8J5F.mjs +2 -0
  34. package/dist/build-OC77a1zq.mjs +2 -0
  35. package/dist/builds-CwKRqjQ5.mjs +71 -0
  36. package/dist/cache-CugNPPsJ.mjs +45 -0
  37. package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
  38. package/dist/cf-oadujOtC.mjs +18 -0
  39. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  40. package/dist/chunk-DL5FNmn1.mjs +2 -0
  41. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  42. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  43. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  44. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  45. package/dist/client-certificates-DZUIqBTB.mjs +13 -0
  46. package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
  47. package/dist/cloud-connector-avpf86kG.mjs +6 -0
  48. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  49. package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
  50. package/dist/command-B2Qe-WUa.mjs +2 -0
  51. package/dist/command-CF0giIIc.mjs +3 -0
  52. package/dist/command-D45NW-R3.mjs +2 -0
  53. package/dist/command-DIvPLK8x.mjs +2 -0
  54. package/dist/{completions-nPO9PdSu.mjs → completions-xPLd1cvL.mjs} +3 -3
  55. package/dist/{config-B8lwPpVl.mjs → config-B4vIa0zp.mjs} +1 -1
  56. package/dist/config.d.mts +1 -1729
  57. package/dist/config.mjs +1 -1
  58. package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
  59. package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
  60. package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
  61. package/dist/connectors-BSmhzNB7.mjs +15 -0
  62. package/dist/containers-B5vDcFzo.mjs +78 -0
  63. package/dist/{shared-YJtB5KZB.mjs → containers-CFzvhmyz.mjs} +85 -84
  64. package/dist/content-scan-CeLZAcbT.mjs +14 -0
  65. package/dist/cps-BlI_Od72.mjs +6 -0
  66. package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
  67. package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
  68. package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
  69. package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
  70. package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
  71. package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
  72. package/dist/custom-pages-BgfhGksj.mjs +21 -0
  73. package/dist/d1-P2kWbdID.mjs +45 -0
  74. package/dist/data-security-pBIozmRL.mjs +71 -0
  75. package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
  76. package/dist/delegate-GctF_lrq.mjs +2 -0
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-QTGENpOM.mjs → deploy-CVYdt3NK.mjs} +1 -1
  79. package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-DpOgndz4.mjs} +1 -1
  80. package/dist/dev-PPUBjWcm.mjs +4 -0
  81. package/dist/diagnostics-C62habGQ.mjs +15 -0
  82. package/dist/dialog-C_ccBiZp.mjs +2 -0
  83. package/dist/dist-B4pQ4CXK.mjs +48 -0
  84. package/dist/{dist-DW5BPGFs.mjs → dist-BpadEMNY.mjs} +1 -1
  85. package/dist/dist-dc4E1u01.mjs +272 -0
  86. package/dist/dls-CpkcyQ8C.mjs +17 -0
  87. package/dist/dns-DG1X4Wap.mjs +135 -0
  88. package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
  89. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  90. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  91. package/dist/durable-objects-D214VhxH.mjs +8 -0
  92. package/dist/email-auth-Ba4ONan2.mjs +6 -0
  93. package/dist/email-routing-BlqKnqNM.mjs +45 -0
  94. package/dist/email-security-Dl1E1Dko.mjs +160 -0
  95. package/dist/email-sending-DIRSSRIz.mjs +47 -0
  96. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  97. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  98. package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
  99. package/dist/firewall-DdsDh8GD.mjs +56 -0
  100. package/dist/flagship-CkUIVW7c.mjs +28 -0
  101. package/dist/fraud-BUpZgvQT.mjs +22 -0
  102. package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
  103. package/dist/healthchecks-DjQWb3EM.mjs +22 -0
  104. package/dist/hostnames-ClBLPbct.mjs +11 -0
  105. package/dist/hyperdrive-U54xZsWU.mjs +37 -0
  106. package/dist/iam-T-wWmOep.mjs +52 -0
  107. package/dist/images-ia5UG1GW.mjs +71 -0
  108. package/dist/index.mjs +1 -1
  109. package/dist/intel-BhswZLMI.mjs +76 -0
  110. package/dist/interactive-B6woOLo-.mjs +32 -0
  111. package/dist/interactive-DnUvQHjc.mjs +2 -0
  112. package/dist/ips-Dad_EvhM.mjs +4 -0
  113. package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
  114. package/dist/keys-DjIPvqj4.mjs +4 -0
  115. package/dist/kv-DzXVnK94.mjs +21 -0
  116. package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
  117. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  118. package/dist/load-balancers-3wGHPsYz.mjs +76 -0
  119. package/dist/local-B6b2OIBW.mjs +2 -0
  120. package/dist/local-BrfySqnx.mjs +2 -0
  121. package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  122. package/dist/login-CEQbOgBM.mjs +5 -0
  123. package/dist/login-DEWvGuaU.mjs +2 -0
  124. package/dist/logo-matches-YGRPstPi.mjs +6 -0
  125. package/dist/logos-BirufUgo.mjs +7 -0
  126. package/dist/logpush-BlNbUHyV.mjs +46 -0
  127. package/dist/logs-DmFlVF9q.mjs +48 -0
  128. package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
  129. package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
  130. package/dist/magic-transit-CBVOK2aa.mjs +387 -0
  131. package/dist/managed-defense-BdW6s483.mjs +18 -0
  132. package/dist/managed-transforms-BIeiofIS.mjs +9 -0
  133. package/dist/matches-CAnwci0P.mjs +6 -0
  134. package/dist/mcp-BfhOMGFE.mjs +32 -0
  135. package/dist/mesh-CxUL2Wf-.mjs +26 -0
  136. package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
  137. package/dist/network-C68psMbz.mjs +50 -0
  138. package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
  139. package/dist/oauth-D4bkeMAw.mjs +14 -0
  140. package/dist/oauth-DouM-qz0.mjs +2 -0
  141. package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
  142. package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
  143. package/dist/observability-DpYxkFeZ.mjs +80 -0
  144. package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-C4CKEADM.mjs} +3 -3
  145. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  146. package/dist/organization-Dg55Xfz7.mjs +75 -0
  147. package/dist/organizations-QnyzGjB2.mjs +4 -0
  148. package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
  149. package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
  150. package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
  151. package/dist/{output-COcSQsfn.mjs → output-Bia1u2k5.mjs} +1 -1
  152. package/dist/page-rules--D3eXrCf.mjs +39 -0
  153. package/dist/pages-Ce8DDgNr.mjs +60 -0
  154. package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
  155. package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
  156. package/dist/pipelines-CAqCgBLh.mjs +44 -0
  157. package/dist/precursor-DBnn4Q35.mjs +4 -0
  158. package/dist/previews-y_nSqWK5.mjs +4 -0
  159. package/dist/progress-Bi02B6v4.mjs +2 -0
  160. package/dist/project-settings-DSXevRvj.mjs +3 -0
  161. package/dist/prompt-Bx2PB-tt.mjs +3 -0
  162. package/dist/queries-dg-CVXjf.mjs +9 -0
  163. package/dist/queues-C_ilLbRI.mjs +63 -0
  164. package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
  165. package/dist/r2-hZAkra-l.mjs +127 -0
  166. package/dist/radar-BO9b0aZy.mjs +300 -0
  167. package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
  168. package/dist/realtime-eSavuSeE.mjs +172 -0
  169. package/dist/registrar-Ct30kOXZ.mjs +43 -0
  170. package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
  171. package/dist/{registry-CWUfXloz.mjs → registry-vreNkX6u.mjs} +1 -1
  172. package/dist/reporting-B-F5aWUJ.mjs +14 -0
  173. package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
  174. package/dist/request-tracers-CaubpUFV.mjs +4 -0
  175. package/dist/resolve-BXemCSyA.mjs +2 -0
  176. package/dist/resolve-CUDKxUrW.mjs +2 -0
  177. package/dist/resource-sharing-6Snv-b69.mjs +40 -0
  178. package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
  179. package/dist/rules-C26eyeA5.mjs +18 -0
  180. package/dist/rulesets-BKzIwVtJ.mjs +37 -0
  181. package/dist/rum-Xdw5hyWY.mjs +30 -0
  182. package/dist/run-BBBMrSrs.mjs +2 -0
  183. package/dist/run-BRucX7Rz.mjs +2 -0
  184. package/dist/{schema-C8hU6G9R.mjs → schema-DqtYndhB.mjs} +1 -1
  185. package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CebDI0f1.mjs} +4 -4
  186. package/dist/scim-odJTXiIe.mjs +18 -0
  187. package/dist/{sdk-C12y5qCN.mjs → sdk-CvIO3tWS.mjs} +1 -1
  188. package/dist/secrets-store-RYpWWzaw.mjs +24 -0
  189. package/dist/security-center-B3D95vCa.mjs +30 -0
  190. package/dist/security-txt-BSytVv-9.mjs +9 -0
  191. package/dist/shared-D67owd9x.mjs +2 -0
  192. package/dist/smart-shield-C83Sfnf4.mjs +24 -0
  193. package/dist/snippets-B6oE9WIa.mjs +20 -0
  194. package/dist/source-BR4_k2ad.mjs +6 -0
  195. package/dist/spawn-CKqJ9J4_.mjs +523 -0
  196. package/dist/spectrum-CfxY--X_.mjs +83 -0
  197. package/dist/speed-DzK-kiWt.mjs +24 -0
  198. package/dist/src-B3h6tKMt.mjs +108 -0
  199. package/dist/ssl-dnjzPcSB.mjs +45 -0
  200. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  201. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  202. package/dist/state-BxCejn42.mjs +2 -0
  203. package/dist/state-DSzkxXML.mjs +2 -0
  204. package/dist/stream-oFyhS4Wi.mjs +102 -0
  205. package/dist/submit-4f-ravmC.mjs +4 -0
  206. package/dist/tags-DrIP6Uiq.mjs +4 -0
  207. package/dist/{telemetry-DjGNSlkU.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  208. package/dist/telemetry-Ds4epd3D.mjs +2 -0
  209. package/dist/telemetry-mKEb8lYB.mjs +2 -0
  210. package/dist/tenant-C-gc3NWv.mjs +12 -0
  211. package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
  212. package/dist/{tools-D9RZkZRc.mjs → tools-BMKpYraQ.mjs} +1 -1
  213. package/dist/tunnels-D0QYsskp.mjs +29 -0
  214. package/dist/turnstile-C6Q3spRB.mjs +33 -0
  215. package/dist/ui-DH95w1Qk.mjs +5 -0
  216. package/dist/undici-DTSBJHNS.mjs +96 -0
  217. package/dist/update-check-BBS1K1jt.mjs +2 -0
  218. package/dist/update-check-CTLoakFV.mjs +2 -0
  219. package/dist/update-check-worker.mjs +2 -0
  220. package/dist/url-info-Cs0V89qq.mjs +4 -0
  221. package/dist/url-normalization-DaEQYy5h.mjs +9 -0
  222. package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
  223. package/dist/user-BV1VY3Kl.mjs +112 -0
  224. package/dist/values-qDS63E43.mjs +4 -0
  225. package/dist/vectorize-NFzD3mP5.mjs +32 -0
  226. package/dist/version-W6_TN_kN.mjs +2 -0
  227. package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
  228. package/dist/web-assets-Gd6z8dbt.mjs +64 -0
  229. package/dist/web3-DCJx4NRp.mjs +28 -0
  230. package/dist/workers-B-j-1ygi.mjs +36 -0
  231. package/dist/workers-builds-DPrNKjZW.mjs +14 -0
  232. package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
  233. package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
  234. package/dist/workflows-C2KKIJjl.mjs +43 -0
  235. package/dist/zaraz-CVLCs1IX.mjs +22 -0
  236. package/dist/zero-trust-BtJi4OXF.mjs +795 -0
  237. package/dist/zone-hKgt0WzO.mjs +4 -0
  238. package/dist/zones-CCNyaD3J.mjs +124 -0
  239. package/package.json +15 -12
  240. package/dist/_meta/agent-context.json +0 -193
  241. package/dist/abuse-reports-BbaHw4ST.mjs +0 -8
  242. package/dist/access-D6Xz892p.mjs +0 -11
  243. package/dist/account-DvxcqeaK.mjs +0 -2
  244. package/dist/account-tags-CeqfEWpz.mjs +0 -9
  245. package/dist/accounts-Bx-8BMH9.mjs +0 -30
  246. package/dist/acm--0opdSGE.mjs +0 -3
  247. package/dist/addressing-BS1ynzLA.mjs +0 -13
  248. package/dist/agent-context-BPhyrSns.mjs +0 -8
  249. package/dist/agent-memory-DczzpEw5.mjs +0 -6
  250. package/dist/ai-CDdCTcQl.mjs +0 -5
  251. package/dist/ai-audit-Bx9KMQYh.mjs +0 -2
  252. package/dist/ai-gateway-BSXJEaYS.mjs +0 -13
  253. package/dist/ai-search-DRQj1aMu.mjs +0 -7
  254. package/dist/ai-security-C_Rb0lGT.mjs +0 -4
  255. package/dist/alerting-BAR9eFs2.mjs +0 -6
  256. package/dist/analytics-BaUZwNc5.mjs +0 -4
  257. package/dist/analytics_engine-DkEzlhfT.mjs +0 -2
  258. package/dist/api-security-jA0lOk6a.mjs +0 -50
  259. package/dist/argo-Cz4pDagx.mjs +0 -2
  260. package/dist/artifacts-BcLTGfAv.mjs +0 -5
  261. package/dist/audit-logs-DbIv4n6u.mjs +0 -2
  262. package/dist/auth-rW5d3jtr.mjs +0 -5
  263. package/dist/auth-tvDdC1J-.mjs +0 -8
  264. package/dist/billing-Md87QjqW.mjs +0 -3
  265. package/dist/bot-management-VHMo4hpU.mjs +0 -5
  266. package/dist/botnet-feed-BHqfo3sa.mjs +0 -3
  267. package/dist/brand-protection-HUeR6Pof.mjs +0 -3
  268. package/dist/browser-extension-199oZg3X.mjs +0 -3
  269. package/dist/browser-run-DDasyux-.mjs +0 -4
  270. package/dist/build-0QlYUfFS.mjs +0 -2
  271. package/dist/builds-B-lXn6JR.mjs +0 -9
  272. package/dist/cache-CevKpiTM.mjs +0 -9
  273. package/dist/certificate-authorities-DAg-aO1B.mjs +0 -2
  274. package/dist/cf-C11NGkjx.mjs +0 -18
  275. package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
  276. package/dist/chunk-QBZBEHZB-BuiXJn8j.mjs +0 -2
  277. package/dist/chunk-vbHwaUoU.mjs +0 -2
  278. package/dist/client-certificates-Bay7oPLE.mjs +0 -3
  279. package/dist/client-side-security-CbU9xn0k.mjs +0 -37
  280. package/dist/cloud-connector-AH2ClcSL.mjs +0 -2
  281. package/dist/cloudforce-one-DwOfS75V.mjs +0 -32
  282. package/dist/command-CMzMsll4.mjs +0 -2
  283. package/dist/connector-interrupts-DcLrqM2V.mjs +0 -2
  284. package/dist/connector-telemetry-events-PrJWgNs9.mjs +0 -2
  285. package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +0 -2
  286. package/dist/connectors-CEAy30E-.mjs +0 -3
  287. package/dist/containers-BsbDqbSn.mjs +0 -58
  288. package/dist/content-scan-BdK936iO.mjs +0 -4
  289. package/dist/cps-oP97-qkm.mjs +0 -2
  290. package/dist/csamScanner-DUNN4INg.mjs +0 -6
  291. package/dist/ct-alerting-dV_gsV2w.mjs +0 -3
  292. package/dist/custom-certificates-DYspvjo4.mjs +0 -5
  293. package/dist/custom-csrs-DjSWLQRu.mjs +0 -3
  294. package/dist/custom-hostnames-df1lH6IY.mjs +0 -5
  295. package/dist/custom-nameservers-CLTbN-9R.mjs +0 -3
  296. package/dist/custom-pages-DzKnSgL3.mjs +0 -3
  297. package/dist/d1-JBEqjJoj.mjs +0 -20
  298. package/dist/data-security-CIktWnXt.mjs +0 -7
  299. package/dist/dcv-delegation-_r6Vc6VL.mjs +0 -2
  300. package/dist/dev-CAubuxCc.mjs +0 -4
  301. package/dist/diagnostics-B0DRh714.mjs +0 -3
  302. package/dist/dist-12KzRsBM.mjs +0 -387
  303. package/dist/dist-BCVqQpg2.mjs +0 -2
  304. package/dist/dist-Cp3uJN1x.mjs +0 -48
  305. package/dist/dist-S9K_8gq9.mjs +0 -9
  306. package/dist/dls-CFzTHcZM.mjs +0 -3
  307. package/dist/dns-Dw6u-NV1.mjs +0 -29
  308. package/dist/dns-firewall-CIPptslp.mjs +0 -57
  309. package/dist/dry-run-DiVy1lVo.mjs +0 -2
  310. package/dist/durable-objects-CCkeqqBq.mjs +0 -2
  311. package/dist/email-auth-kdxO51Oz.mjs +0 -2
  312. package/dist/email-routing-BLggZdQq.mjs +0 -6
  313. package/dist/email-security-DjADlgdM.mjs +0 -18
  314. package/dist/email-sending-Cz7E7GoP.mjs +0 -7
  315. package/dist/error-sanitization-DfLijlBJ.mjs +0 -2
  316. package/dist/fieldExtractors-BWaMi6lD.mjs +0 -3
  317. package/dist/firewall-5t6OBIOl.mjs +0 -8
  318. package/dist/flagship-CzG_VoNR.mjs +0 -4
  319. package/dist/fraud-UOg_69Ob.mjs +0 -20
  320. package/dist/google-tag-gateway-DirkD-Q2.mjs +0 -2
  321. package/dist/healthchecks-BkHZGTp1.mjs +0 -4
  322. package/dist/hostnames-EUYOZm21.mjs +0 -3
  323. package/dist/hyperdrive-ZoLJlJCL.mjs +0 -21
  324. package/dist/iam-BQ2xSgYN.mjs +0 -6
  325. package/dist/images-CkEq6ScP.mjs +0 -8
  326. package/dist/intel-DDWEdGyl.mjs +0 -8
  327. package/dist/interactive-B2E03Fs-.mjs +0 -11
  328. package/dist/interactive-_B-EqD0Y.mjs +0 -23
  329. package/dist/ips-54Qmy-Uw.mjs +0 -2
  330. package/dist/keyless-certificates-CXHLc3Qz.mjs +0 -3
  331. package/dist/keys-rvI4TC3Z.mjs +0 -2
  332. package/dist/kv-CAeN1zBy.mjs +0 -5
  333. package/dist/leaked-credential-checks-CbbwtG-p.mjs +0 -4
  334. package/dist/load-balancers-BFwdwAIU.mjs +0 -6
  335. package/dist/local-C6XsFD_W.mjs +0 -2
  336. package/dist/logexplorer-D8rOPB5I.mjs +0 -17
  337. package/dist/logo-matches-Y3PxVn7t.mjs +0 -2
  338. package/dist/logos-BN8SvJhS.mjs +0 -3
  339. package/dist/logpush-BnLA4WVm.mjs +0 -4
  340. package/dist/logs-CDo7Y5sA.mjs +0 -3
  341. package/dist/magic-cloud-networking-wPuLwu-F.mjs +0 -5
  342. package/dist/magic-network-monitoring-BNERUpxS.mjs +0 -4
  343. package/dist/magic-transit-6tvVOECW.mjs +0 -111
  344. package/dist/managed-defense-AYwBOYIH.mjs +0 -2
  345. package/dist/managed-transforms-HZZNrkC7.mjs +0 -3
  346. package/dist/matches-Dp91L3dL.mjs +0 -2
  347. package/dist/mcp-P7pcieiT.mjs +0 -4
  348. package/dist/mesh-DjFrk6PL.mjs +0 -4
  349. package/dist/mtls-certificates-DZMoef2H.mjs +0 -3
  350. package/dist/network-7cd1U6-I.mjs +0 -6
  351. package/dist/network-interconnects-CQ7cPZjK.mjs +0 -41
  352. package/dist/oauth-DH3kMXSs.mjs +0 -14
  353. package/dist/oauth-clients-P9t-eMnx.mjs +0 -4
  354. package/dist/oauth-scopes-C3r9Qh_y.mjs +0 -2
  355. package/dist/observability-M1DnLhMR.mjs +0 -10
  356. package/dist/organization-cUE7GDCt.mjs +0 -45
  357. package/dist/organizations-C-Hcpd0w.mjs +0 -2
  358. package/dist/origin-ca-certificates-C8cJMyQH.mjs +0 -3
  359. package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +0 -2
  360. package/dist/origin-tls-client-auth-BsjR5EAV.mjs +0 -4
  361. package/dist/page-rules-B-zq1EUb.mjs +0 -27
  362. package/dist/pages-B6YpkPos.mjs +0 -14
  363. package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
  364. package/dist/pipelines-BJc_RylD.mjs +0 -6
  365. package/dist/precursor-CLQu7suY.mjs +0 -4
  366. package/dist/progress-V6SZV3Ux.mjs +0 -2
  367. package/dist/prompt-DjRTpML4.mjs +0 -3
  368. package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
  369. package/dist/queries-DSrrket-.mjs +0 -3
  370. package/dist/queues-Tf7kPBpn.mjs +0 -7
  371. package/dist/r2-DmKNnxtC.mjs +0 -25
  372. package/dist/r2-data-catalog-DBxoifOq.mjs +0 -16
  373. package/dist/radar-Csk7Ab-b.mjs +0 -2
  374. package/dist/realtime-CDehZVhV.mjs +0 -20
  375. package/dist/registrar-sandbox-BxVdfnam.mjs +0 -56
  376. package/dist/registrar-vflzeNQ9.mjs +0 -43
  377. package/dist/reporting-BaPZ1PHN.mjs +0 -2
  378. package/dist/request-headers-CC4eHmI2.mjs +0 -3
  379. package/dist/request-tracers-C_UVBexV.mjs +0 -2
  380. package/dist/resolve-B8CyM1mi.mjs +0 -2
  381. package/dist/resource-sharing-CoB4S9j1.mjs +0 -6
  382. package/dist/resource-tagging-CUiUC5g4.mjs +0 -2
  383. package/dist/rules-4O8076_s.mjs +0 -4
  384. package/dist/rulesets-C84MxTYo.mjs +0 -5
  385. package/dist/rum-Bvwkrntx.mjs +0 -4
  386. package/dist/run-CRfinkSe.mjs +0 -2
  387. package/dist/schemas-O_ZNaF8R.mjs +0 -65
  388. package/dist/scim-BvxQmde6.mjs +0 -4
  389. package/dist/secrets-store-DOKWiC-j.mjs +0 -7
  390. package/dist/security-center-Bhy_aC-w.mjs +0 -2
  391. package/dist/security-txt-L7HJ9tq5.mjs +0 -3
  392. package/dist/smart-shield-COMXuQ1S.mjs +0 -4
  393. package/dist/snippets-DffQhlKt.mjs +0 -4
  394. package/dist/spawn-C1AISA2V.mjs +0 -526
  395. package/dist/spectrum-Cmf7SqQE.mjs +0 -63
  396. package/dist/speed-m8cdhLFS.mjs +0 -4
  397. package/dist/src-C8phrg-8.mjs +0 -109
  398. package/dist/ssl-D4ffsdSw.mjs +0 -15
  399. package/dist/startup-profile-Dx95Y5cl.mjs +0 -17
  400. package/dist/state-CHif8Y5I.mjs +0 -2
  401. package/dist/stream-DPF5fojV.mjs +0 -16
  402. package/dist/submit-Br8hfP0_.mjs +0 -2
  403. package/dist/tags-Bnt4JuxQ.mjs +0 -2
  404. package/dist/telemetry-Ch1vCICm.mjs +0 -2
  405. package/dist/tenant-D8u0CxoC.mjs +0 -2
  406. package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +0 -3
  407. package/dist/tunnels-BkNPpTHa.mjs +0 -5
  408. package/dist/turnstile-MgwRECJv.mjs +0 -23
  409. package/dist/ui-DQSZeaG5.mjs +0 -5
  410. package/dist/url-info-Ddp7MgcI.mjs +0 -2
  411. package/dist/url-normalization-3ptK9ntV.mjs +0 -3
  412. package/dist/url-scanner-Psb9ollR.mjs +0 -2
  413. package/dist/user-DWdshcIu.mjs +0 -12
  414. package/dist/values-CDKQL1z2.mjs +0 -2
  415. package/dist/vectorize-CTYYUyQj.mjs +0 -4
  416. package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
  417. package/dist/web-assets-CpDwDEx8.mjs +0 -8
  418. package/dist/web3-YsjDyAzH.mjs +0 -4
  419. package/dist/workers-BKKxaZcz.mjs +0 -6
  420. package/dist/workers-builds-BWo5vUA9.mjs +0 -2
  421. package/dist/workers-for-platforms-ASJsxYdM.mjs +0 -5
  422. package/dist/workers-vpc-RkTnRvA2.mjs +0 -3
  423. package/dist/workflows-KrIFI9ns.mjs +0 -5
  424. package/dist/zaraz-DglXbVzZ.mjs +0 -2
  425. package/dist/zero-trust-RilTdSjX.mjs +0 -91
  426. package/dist/zone-DsBtVkvT.mjs +0 -2
  427. package/dist/zones-BFxvWFQW.mjs +0 -44
  428. /package/dist/{alerts-B2SJO4nd.mjs → alerts-CstOk8n0.mjs} +0 -0
  429. /package/dist/{autorag-iNjZXw1n.mjs → autorag-PRTwXGgn.mjs} +0 -0
  430. /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  431. /package/dist/{brands-BrVnNrT3.mjs → brands-BHRXlWDm.mjs} +0 -0
  432. /package/dist/{clear-an9o3dJ3.mjs → clear-UvKESVx3.mjs} +0 -0
  433. /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  434. /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  435. /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  436. /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  437. /package/dist/{health-CIUg1C5o.mjs → health-CwPzzrV6.mjs} +0 -0
  438. /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  439. /package/dist/{internal-DmpATljO.mjs → internal-WLHfxX64.mjs} +0 -0
  440. /package/dist/{live-B66u3_0g.mjs → live-D_k7eHdv.mjs} +0 -0
  441. /package/dist/{metadata-D062SVyy.mjs → metadata-APBiectA.mjs} +0 -0
  442. /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  443. /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  444. /package/dist/{ready-C-H2cwp_.mjs → ready-CvwvbdTX.mjs} +0 -0
  445. /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  446. /package/dist/{refute-uSlzkQKq.mjs → refute-CIAFMj00.mjs} +0 -0
  447. /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  448. /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  449. /package/dist/{search-BlKeSfVD.mjs → search-12jA1b4l.mjs} +0 -0
  450. /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  451. /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  452. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  453. /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  454. /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  455. /package/dist/{verify-S-TmhUDr.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,456 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,i as g,n as _}from"./prompt-Bx2PB-tt.mjs";import{t as v}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-DNTQkXbg.mjs";function y(e){return e.usage(`$0 cloudforce-one binary-storage create
3
+
4
+ Uploads a binary file to Cloudforce One's binary database for malware analysis and threat intelligence correlation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Binary file to be uploaded to the database.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const b={command:`create`,describe:`Posts a file to Binary Storage`,builder:y,handler:async l=>c({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:l.body,file:l.file}});return}let c=await i(l),u=l.local?e:await t();if(l.accountId=u,l.file!==void 0||l.body!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:e})),{successLabel:`Created`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function x(e){return e.usage(`$0 cloudforce-one binary-storage get <hash>
5
+
6
+ Retrieves a binary file from the Cloudforce One binary storage for analysis.`).positional(`hash`,{type:`string`,description:`hash of the binary`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <hash>`,describe:`Retrieves a file from Binary Storage`,builder:x,handler:async r=>c({command:`cloudforce-one binary-storage get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one binary-storage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/binary/${r.hash==null?`<hash>`:encodeURIComponent(String(r.hash))}`,pathParams:{hash:String(r.hash??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.binaryStorage.get({account_id:l,hash:r.hash})),{successLabel:`Loaded`})})},C={command:`binary-storage`,describe:`Upload and retrieve malware samples and suspicious binaries for analysis`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 cloudforce-one credential-monitor domains create
7
+
8
+ Register a domain for credential monitoring.`).option(`domain`,{type:`string`,description:`Domain to monitor (e.g. my-company.com)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`create`,describe:`Create monitored domain`,builder:w,handler:async r=>c({command:`cloudforce-one credential-monitor domains create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one credential-monitor domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({domain:p(r.domain,`domain`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.credentialMonitor.domains.create({...e,account_id:l})),{successLabel:`Created`});return}r.domain===void 0&&(r.domain=await h(`domain`,`Domain to monitor (e.g. my-company.com)`));let d=f({domain:p(r.domain,`domain`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.credentialMonitor.domains.create({...d,account_id:l})),{successLabel:`Created`})})};function E(e){return e.usage(`$0 cloudforce-one credential-monitor domains delete <id>
9
+
10
+ Remove a domain from credential monitoring.`).positional(`id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const D={command:`delete <id>`,describe:`Delete monitored domain`,builder:E,handler:async r=>c({command:`cloudforce-one credential-monitor domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one credential-monitor domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
11
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.credentialMonitor.domains.delete({account_id:l,id:r.id})),{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 cloudforce-one credential-monitor domains list
12
+
13
+ List all domains registered for credential monitoring.`).option(`page`,{type:`number`,description:`Page number`}).option(`per-page`,{type:`number`,description:`Items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List monitored domains`,builder:O,handler:async r=>c({command:`cloudforce-one credential-monitor domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf cloudforce-one credential-monitor domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.credentialMonitor.domains.list({account_id:u,...c})),{successLabel:`Loaded`})})},A={command:`domains`,describe:`Operations for credential-monitor.domains`,builder:e=>e.command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 cloudforce-one credential-monitor matches list
14
+
15
+ Get credential matches for the account's monitored domains.`).option(`domain`,{type:`string`,description:`Filter by domain (exact match)`}).option(`username`,{type:`string`,description:`Filter by username (partial match)`}).option(`page`,{type:`number`,description:`Page number`}).option(`per-page`,{type:`number`,description:`Items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List credential matches`,builder:j,handler:async r=>c({command:`cloudforce-one credential-monitor matches list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={domain:r.domain,username:r.username,page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf cloudforce-one credential-monitor matches list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/credential-monitor/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.credentialMonitor.matches.list({account_id:u,...c})),{successLabel:`Loaded`})})},N={command:`matches`,describe:`Operations for credential-monitor.matches`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`credential-monitor`,describe:`Operations for credential-monitor`,builder:e=>e.command(A).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 cloudforce-one events aggregate get
16
+
17
+ Aggregate threat events by one or more columns (e.g., attacker, targetIndustry) with optional date filtering and daily grouping. Supports multi-dimensional aggregation for cross-analysis.`).option(`aggregate-by`,{type:`string`,description:`Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry')`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUIDs to filter by, or one standalone scope value: 'all'/'*' for all accessible non-analytics event datasets (analytics datasets are silently excluded), 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, uses the default dataset.`}).option(`start-date`,{type:`string`,description:`Start date for filtering (ISO 8601 format, e.g., '2024-01-01')`}).option(`end-date`,{type:`string`,description:`End date for filtering (ISO 8601 format, e.g., '2024-12-31')`}).option(`group-by-date`,{type:`boolean`,description:`Whether to group results by date (daily aggregation)`}).option(`limit`,{type:`number`,description:`Maximum number of results to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Aggregate events by single or multiple columns with optional date filtering`,builder:F,handler:async r=>c({command:`cloudforce-one events aggregate get`,classification:{safeFlags:[`group-by-date`,`dry-run`]}},r,async()=>{let c={aggregateBy:r[`aggregate-by`],datasetId:r[`dataset-id`],startDate:r[`start-date`],endDate:r[`end-date`],groupByDate:r[`group-by-date`],limit:r.limit};if(r.dryRun){o({command:`cf cloudforce-one events aggregate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/aggregate`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.aggregate.get({account_id:u,...c})),{successLabel:`Loaded`})})},L={command:`aggregate`,describe:`Operations for events.aggregate`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 cloudforce-one events categories catalog get
18
+
19
+ Lists categories`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get`,describe:`Lists categories`,builder:R,handler:async r=>c({command:`cloudforce-one events categories catalog get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events categories catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/categories/catalog`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.categories.catalog.get({account_id:l})),{successLabel:`Loaded`})})},B={command:`catalog`,describe:`Operations for events.categories.catalog`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 cloudforce-one events categories create <category-id>
20
+
21
+ Updates a category`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`create <category-id>`,describe:`Updates a category`,builder:V,handler:async r=>c({command:`cloudforce-one events categories create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${r[`category-id`]==null?`<category-id>`:encodeURIComponent(String(r[`category-id`]))}`,pathParams:{"category-id":String(r[`category-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({killChain:r[`kill-chain`],mitreAttack:r[`mitre-attack`],mitreCapec:r[`mitre-capec`],name:p(r.name,`name`,`text`),shortname:p(r.shortname,`shortname`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.categories.create({...e,account_id:l,category_id:r[`category-id`]})),{successLabel:`Created`});return}let d=f({killChain:r[`kill-chain`],mitreAttack:r[`mitre-attack`],mitreCapec:r[`mitre-capec`],name:p(r.name,`name`,`text`),shortname:p(r.shortname,`shortname`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.categories.create({...d,account_id:l,category_id:r[`category-id`]})),{successLabel:`Created`})})},U={command:`categories`,describe:`Operations for events.categories`,builder:e=>e.command(H).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 cloudforce-one events create <event-id>
22
+
23
+ Updates an event`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`create <event-id>`,describe:`Updates an event`,builder:W,handler:async r=>c({command:`cloudforce-one events create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({attacker:p(r.attacker,`attacker`,`text`),attackerCountry:p(r[`attacker-country`],`attacker-country`,`text`),category:p(r.category,`category`,`text`),createdAt:p(r[`created-at`],`created-at`,`text`),datasetId:p(r[`dataset-id`],`dataset-id`,`text`),date:p(r.date,`date`,`text`),event:p(r.event,`event`,`text`),indicator:p(r.indicator,`indicator`,`text`),indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),insight:p(r.insight,`insight`,`text`),raw:{source:p(r[`raw-source`],`raw-source`,`text`),tlp:p(r[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:p(r[`target-country`],`target-country`,`text`),targetIndustry:p(r[`target-industry`],`target-industry`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.create({...e,account_id:l,event_id:r[`event-id`]})),{successLabel:`Created`});return}r[`dataset-id`]===void 0&&(r[`dataset-id`]=await h(`dataset-id`,`Dataset ID containing the event to update.`));let d=f({attacker:p(r.attacker,`attacker`,`text`),attackerCountry:p(r[`attacker-country`],`attacker-country`,`text`),category:p(r.category,`category`,`text`),createdAt:p(r[`created-at`],`created-at`,`text`),datasetId:p(r[`dataset-id`],`dataset-id`,`text`),date:p(r.date,`date`,`text`),event:p(r.event,`event`,`text`),indicator:p(r.indicator,`indicator`,`text`),indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),insight:p(r.insight,`insight`,`text`),raw:{source:p(r[`raw-source`],`raw-source`,`text`),tlp:p(r[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:p(r[`target-country`],`target-country`,`text`),targetIndustry:p(r[`target-industry`],`target-industry`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.create({...d,account_id:l,event_id:r[`event-id`]})),{successLabel:`Created`})})};function K(e){return e.usage(`$0 cloudforce-one events dataset copy create <dataset-id>
24
+
25
+ Copies specified events from one dataset to another dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied).`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const q={command:`create <dataset-id>`,describe:`Copies specified events from one dataset to another dataset`,builder:K,handler:async r=>c({command:`cloudforce-one events dataset copy create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},r,async()=>{let c={keepRawData:r[`keep-raw-data`]};if(r.dryRun){o({command:`cf cloudforce-one events dataset copy create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/copy`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},query:c,bodyKind:`json`,body:r.body===void 0?f({destDatasetId:p(r[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:r[`event-ids`]}):u(r.body)});return}let l=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.cloudforceOne.events.dataset.copy.create({...e,account_id:d,dataset_id:r[`dataset-id`],...c})),{successLabel:`Created`});return}if(r[`dest-dataset-id`]===void 0&&(r[`dest-dataset-id`]=await h(`dest-dataset-id`,`The destDatasetId field`)),r[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let m=f({destDatasetId:p(r[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:r[`event-ids`]});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.cloudforceOne.events.dataset.copy.create({...m,account_id:d,dataset_id:r[`dataset-id`],...c})),{successLabel:`Created`})})},J={command:`copy`,describe:`Operations for events.dataset.copy`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.usage(`$0 cloudforce-one events dataset create <dataset-id>
26
+
27
+ Updates an existing dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`create <dataset-id>`,describe:`Updates an existing dataset`,builder:Y,handler:async r=>c({command:`cloudforce-one events dataset create`,classification:{safeFlags:[`is-public`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({isPublic:r[`is-public`],name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.create({...e,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`});return}if(r[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await h(`name`,`Used to describe the dataset within the account context.`));let d=f({isPublic:r[`is-public`],name:p(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.create({...d,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`})})};function Z(e){return e.usage(`$0 cloudforce-one events dataset delete <dataset-id>
28
+
29
+ Soft-deletes a dataset given a datasetId.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID to delete`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Q={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:Z,handler:async r=>c({command:`cloudforce-one events dataset delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
30
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.delete({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Deleted`})})};function ne(e){return e.usage(`$0 cloudforce-one events dataset events get <event-id>
31
+
32
+ Retrieves a specific event by its UUID.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <event-id>`,describe:`Reads an event`,builder:ne,handler:async r=>c({command:`cloudforce-one events dataset events get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"event-id":String(r[`event-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.events.get({account_id:l,dataset_id:r[`dataset-id`],event_id:r[`event-id`]})),{successLabel:`Loaded`})})},ie={command:`events`,describe:`Operations for events.dataset.events`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 cloudforce-one events dataset groups create
33
+
34
+ Create a group`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`create`,describe:`Create a group`,builder:ae,handler:async r=>c({command:`cloudforce-one events dataset groups create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.groups.create({...e,account_id:l})),{successLabel:`Created`});return}r.description===void 0&&(r.description=await h(`description`,`The description field`)),r.name===void 0&&(r.name=await h(`name`,`The name field`));let d=f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.groups.create({...d,account_id:l})),{successLabel:`Created`})})};function se(e){return e.usage(`$0 cloudforce-one events dataset groups delete <group-id>
35
+
36
+ Delete a group for an account`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <group-id>`,describe:`Delete a group for an account`,builder:se,handler:async r=>c({command:`cloudforce-one events dataset groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
37
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.groups.delete({account_id:l,group_id:r[`group-id`]})),{successLabel:`Deleted`})})};function le(e){return e.usage(`$0 cloudforce-one events dataset groups get group
38
+
39
+ List groups for an account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`group`,describe:`List groups for an account`,builder:le,handler:async r=>c({command:`cloudforce-one events dataset groups get group`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups get group`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.groups.get.group({account_id:l})),{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 cloudforce-one events dataset groups get v2 <group-id>
40
+
41
+ Read a group for an account`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`v2 <group-id>`,describe:`Read a group for an account`,builder:de,handler:async r=>c({command:`cloudforce-one events dataset groups get v2`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups get v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.groups.get.v2({account_id:l,group_id:r[`group-id`]})),{successLabel:`Loaded`})})},pe={command:`get`,describe:`Operations for events.dataset.groups.get`,builder:e=>e.command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 cloudforce-one events dataset groups members create <group-id>
42
+
43
+ Create a group member`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`account-tag`,{type:`string`,description:`The accountTag field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const he={command:`create <group-id>`,describe:`Create a group member`,builder:me,handler:async r=>c({command:`cloudforce-one events dataset groups members create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}/members`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({accountTag:p(r[`account-tag`],`account-tag`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.groups.members.create({...e,account_id:l,group_id:r[`group-id`]})),{successLabel:`Created`});return}let d=f({accountTag:p(r[`account-tag`],`account-tag`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.groups.members.create({...d,account_id:l,group_id:r[`group-id`]})),{successLabel:`Created`})})};function ge(e){return e.usage(`$0 cloudforce-one events dataset groups members delete <member-id>
44
+
45
+ Delete a group member`).positional(`member-id`,{type:`string`,description:`Member ID`,demandOption:!0}).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _e={command:`delete <member-id>`,describe:`Delete a group member`,builder:ge,handler:async r=>c({command:`cloudforce-one events dataset groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}/members/${r[`member-id`]==null?`<member-id>`:encodeURIComponent(String(r[`member-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``),"member-id":String(r[`member-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
46
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.groups.members.delete({account_id:l,group_id:r[`group-id`],member_id:r[`member-id`]})),{successLabel:`Deleted`})})};function ve(e){return e.usage(`$0 cloudforce-one events dataset groups members get <group-id>
47
+
48
+ List group members`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get <group-id>`,describe:`List group members`,builder:ve,handler:async r=>c({command:`cloudforce-one events dataset groups members get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}/members`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.groups.members.get({account_id:l,group_id:r[`group-id`]})),{successLabel:`Loaded`})})},be={command:`members`,describe:`Operations for events.dataset.groups.members`,builder:e=>e.command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.usage(`$0 cloudforce-one events dataset groups update <group-id>
49
+
50
+ Update a group`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Se={command:`update <group-id>`,describe:`Update a group`,builder:xe,handler:async r=>c({command:`cloudforce-one events dataset groups update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.groups.update({...e,account_id:l,group_id:r[`group-id`]})),{successLabel:`Updated`});return}r.description===void 0&&(r.description=await h(`description`,`The description field`)),r.name===void 0&&(r.name=await h(`name`,`The name field`));let d=f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.groups.update({...d,account_id:l,group_id:r[`group-id`]})),{successLabel:`Updated`})})},Ce={command:`groups`,describe:`Operations for events.dataset.groups`,builder:e=>e.command(oe).command(ce).command(Se).command(pe).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return e.usage(`$0 cloudforce-one events dataset indicator types create create <dataset-id>
51
+
52
+ Creates a new indicator type and initializes its dedicated Durable Object`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description for the indicator type`}).option(`indicator-type`,{type:`string`,description:`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`create <dataset-id>`,describe:`Create a new indicator type`,builder:we,handler:async r=>c({command:`cloudforce-one events dataset indicator types create create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicator types create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicatorTypes/create`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),indicatorType:p(r[`indicator-type`],`indicator-type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicator.types.create.create({...e,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`});return}r[`indicator-type`]===void 0&&(r[`indicator-type`]=await h(`indicator-type`,`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`));let d=f({description:p(r.description,`description`,`text`),indicatorType:p(r[`indicator-type`],`indicator-type`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicator.types.create.create({...d,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`})})},Ee={command:`create`,describe:`Operations for events.dataset.indicator.types.create`,builder:e=>e.command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},De={command:`types`,describe:`Operations for events.dataset.indicator.types`,builder:e=>e.command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oe={command:`indicator`,describe:`Operations for events.dataset.indicator`,builder:e=>e.command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.usage(`$0 cloudforce-one events dataset indicators bulk create <dataset-id>
53
+
54
+ Creates multiple indicators at once with their respective types and related datasets.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`Global flag to automatically create indicator types if they don't exist. Individual indicators can override this with their own autoCreateType flag.`}).option(`indicators`,{type:`string`,description:`The indicators field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ae={command:`create <dataset-id>`,describe:`Creates multiple indicators in bulk`,builder:ke,handler:async r=>c({command:`cloudforce-one events dataset indicators bulk create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/bulk`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({autoCreateType:r[`auto-create-type`],indicators:d(r.indicators,`indicators`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.bulk.create({...e,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`});return}if(r.indicators===void 0)throw Error(`--indicators is required (or pass --body with this field set).`);let p=f({autoCreateType:r[`auto-create-type`],indicators:d(r.indicators,`indicators`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.bulk.create({...p,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`})})},je={command:`bulk`,describe:`Operations for events.dataset.indicators.bulk`,builder:e=>e.command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Me(e){return e.usage(`$0 cloudforce-one events dataset indicators create create <dataset-id>
55
+
56
+ Creates a new indicator with the specified type and related datasets.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist.`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ne={command:`create <dataset-id>`,describe:`Creates a new indicator`,builder:Me,handler:async r=>c({command:`cloudforce-one events dataset indicators create create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/create`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({autoCreateType:r[`auto-create-type`],indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(r[`related-events`],`related-events`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.create.create({...e,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`});return}r[`indicator-type`]===void 0&&(r[`indicator-type`]=await h(`indicator-type`,`The indicatorType field`)),r.value===void 0&&(r.value=await h(`value`,`The value field`));let m=f({autoCreateType:r[`auto-create-type`],indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(r[`related-events`],`related-events`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.create.create({...m,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`})})},Pe={command:`create`,describe:`Operations for events.dataset.indicators.create`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fe(e){return e.usage(`$0 cloudforce-one events dataset indicators delete <indicator-id>
57
+
58
+ Deletes a specific indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ie={command:`delete <indicator-id>`,describe:`Deletes an indicator`,builder:Fe,handler:async r=>c({command:`cloudforce-one events dataset indicators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
59
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.indicators.delete({account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`]})),{successLabel:`Deleted`})})};function Le(e){return e.usage(`$0 cloudforce-one events dataset indicators get indicator <indicator-id>
60
+
61
+ Retrieves a specific indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`indicator <indicator-id>`,describe:`Reads an indicator`,builder:Le,handler:async r=>c({command:`cloudforce-one events dataset indicators get indicator`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators get indicator`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.indicators.get.indicator({account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`]})),{successLabel:`Loaded`})})},ze={command:`get`,describe:`Operations for events.dataset.indicators.get`,builder:e=>e.command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Be(e){return e.usage(`$0 cloudforce-one events dataset indicators patch <indicator-id>
62
+
63
+ Updates an existing indicator's properties.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ve={command:`patch <indicator-id>`,describe:`Updates an indicator`,builder:Be,handler:async r=>c({command:`cloudforce-one events dataset indicators patch`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(r[`related-events`],`related-events`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.indicators.patch({...e,account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`]})),{successLabel:`Updated`});return}let m=f({indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(r[`related-events`],`related-events`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.indicators.patch({...m,account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`]})),{successLabel:`Updated`})})};function He(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships create <indicator-id>
64
+
65
+ Creates a new relationship with the indicator as the source entity. Indicator↔indicator relationships are not supported.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,choices:[`event`,`tag`]}).option(`type`,{type:`string`,description:`Relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ue={command:`create <indicator-id>`,describe:`Create a relationship for an indicator`,builder:He,handler:async r=>c({command:`cloudforce-one events dataset indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({confidence:r.confidence,targetId:p(r[`target-id`],`target-id`,`text`),targetType:p(r[`target-type`],`target-type`,`text`),type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.create({...e,account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`]})),{successLabel:`Created`});return}r[`target-id`]===void 0&&(r[`target-id`]=await h(`target-id`,`UUID of the target entity.`)),r[`target-type`]===void 0&&(r[`target-type`]=await g(`target-type`,`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,[`event`,`tag`])),r.type===void 0&&(r.type=await h(`type`,`Relationship type.`));let d=f({confidence:r.confidence,targetId:p(r[`target-id`],`target-id`,`text`),targetType:p(r[`target-type`],`target-type`,`text`),type:p(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.create({...d,account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`]})),{successLabel:`Created`})})};function We(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships delete <rel-uuid>
66
+
67
+ Deletes a relationship by UUID. Idempotent: returns deleted=false if not found.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ge={command:`delete <rel-uuid>`,describe:`Delete a relationship`,builder:We,handler:async r=>c({command:`cloudforce-one events dataset indicators relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}/relationships/${r[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(r[`rel-uuid`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``),"rel-uuid":String(r[`rel-uuid`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
68
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.delete({account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`],rel_uuid:r[`rel-uuid`]})),{successLabel:`Deleted`})})};function Ke(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships list
69
+
70
+ Returns sparse relationship edges. Optionally hydrate related entities via \`expand\`.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters, AND-combined. Fields: entityType (other-end type), type (relationship type), confidence (0–100), metadata.<key>. Example: [{"field":"type","op":"equals","value":"appears_in"},{"field":"confidence","op":"gte","value":50}]`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Keyset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qe={command:`list`,describe:`List relationships for an indicator`,builder:v(Ke),handler:async r=>c({command:`cloudforce-one events dataset indicators relationships list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={search:r.search,expand:r.expand,cursor:r.cursor,pageSize:r[`page-size`]};if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.dataset.indicators.relationships.list({account_id:u,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`],...c})),{successLabel:`Loaded`})})};function Je(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships update <rel-uuid>
71
+
72
+ Partially updates a relationship by UUID. Only provided fields are changed.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ye={command:`update <rel-uuid>`,describe:`Update a relationship`,builder:Je,handler:async r=>c({command:`cloudforce-one events dataset indicators relationships update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/${r[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(r[`indicator-id`]))}/relationships/${r[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(r[`rel-uuid`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"indicator-id":String(r[`indicator-id`]??``),"rel-uuid":String(r[`rel-uuid`]??``)},bodyKind:`json`,body:r.body===void 0?f({confidence:r.confidence,type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.update({...e,account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`],rel_uuid:r[`rel-uuid`]})),{successLabel:`Updated`});return}let d=f({confidence:r.confidence,type:p(r.type,`type`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.update({...d,account_id:l,dataset_id:r[`dataset-id`],indicator_id:r[`indicator-id`],rel_uuid:r[`rel-uuid`]})),{successLabel:`Updated`})})},Xe={command:`relationships`,describe:`Operations for events.dataset.indicators.relationships`,builder:e=>e.command(Ue).command(Ge).command(qe).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ze(e){return e.usage(`$0 cloudforce-one events dataset indicators tags get <dataset-id>
73
+
74
+ Returns all mirrored tags from the indicator dataset (DO mirror table). No pagination.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`get <dataset-id>`,describe:`List mirrored tags for an indicator dataset`,builder:Ze,handler:async r=>c({command:`cloudforce-one events dataset indicators tags get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset indicators tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/indicators/tags`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.indicators.tags.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})})},$e={command:`tags`,describe:`Operations for events.dataset.indicators.tags`,builder:e=>e.command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},et={command:`indicators`,describe:`Operations for events.dataset.indicators`,builder:e=>e.command(Ie).command(Ve).command(je).command(Pe).command(ze).command(Xe).command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.usage(`$0 cloudforce-one events dataset move create <dataset-id>
75
+
76
+ Moves specified events from one dataset to another dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). Raw data is always deleted from the source.`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nt={command:`create <dataset-id>`,describe:`Moves specified events from one dataset to another dataset`,builder:tt,handler:async r=>c({command:`cloudforce-one events dataset move create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},r,async()=>{let c={keepRawData:r[`keep-raw-data`]};if(r.dryRun){o({command:`cf cloudforce-one events dataset move create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/move`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},query:c,bodyKind:`json`,body:r.body===void 0?f({destDatasetId:p(r[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:r[`event-ids`]}):u(r.body)});return}let l=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.cloudforceOne.events.dataset.move.create({...e,account_id:d,dataset_id:r[`dataset-id`],...c})),{successLabel:`Created`});return}if(r[`dest-dataset-id`]===void 0&&(r[`dest-dataset-id`]=await h(`dest-dataset-id`,`The destDatasetId field`)),r[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let m=f({destDatasetId:p(r[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:r[`event-ids`]});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.cloudforceOne.events.dataset.move.create({...m,account_id:d,dataset_id:r[`dataset-id`],...c})),{successLabel:`Created`})})},rt={command:`move`,describe:`Operations for events.dataset.move`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function it(e){return e.usage(`$0 cloudforce-one events dataset permissions create <dataset-id>
77
+
78
+ Create a permission`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).option(`subject-id`,{type:`string`,description:`The subjectId field`}).option(`subject-type`,{type:`string`,description:`The subjectType field`,choices:[`account`,`group`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const at={command:`create <dataset-id>`,describe:`Create a permission for dataset`,builder:it,handler:async r=>c({command:`cloudforce-one events dataset permissions create`,classification:{safeFlags:[`role`,`subject-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset permissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({role:p(r.role,`role`,`text`),subjectId:p(r[`subject-id`],`subject-id`,`text`),subjectType:p(r[`subject-type`],`subject-type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.permissions.create({...e,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`});return}r.role===void 0&&(r.role=await g(`role`,`The role field`,[`read`,`write`])),r[`subject-id`]===void 0&&(r[`subject-id`]=await h(`subject-id`,`The subjectId field`)),r[`subject-type`]===void 0&&(r[`subject-type`]=await g(`subject-type`,`The subjectType field`,[`account`,`group`]));let d=f({role:p(r.role,`role`,`text`),subjectId:p(r[`subject-id`],`subject-id`,`text`),subjectType:p(r[`subject-type`],`subject-type`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.dataset.permissions.create({...d,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Created`})})};function ot(e){return e.usage(`$0 cloudforce-one events dataset permissions delete <grant-id>
79
+
80
+ Delete a permission`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const st={command:`delete <grant-id>`,describe:`Delete a permission for dataset`,builder:ot,handler:async r=>c({command:`cloudforce-one events dataset permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset permissions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/permissions/${r[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(r[`grant-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"grant-id":String(r[`grant-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
81
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.permissions.delete({account_id:l,dataset_id:r[`dataset-id`],grant_id:r[`grant-id`]})),{successLabel:`Deleted`})})};function ct(e){return e.usage(`$0 cloudforce-one events dataset permissions get <dataset-id>
82
+
83
+ List permissions`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`get <dataset-id>`,describe:`List permissions for dataset`,builder:ct,handler:async r=>c({command:`cloudforce-one events dataset permissions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset permissions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.permissions.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})})};function ut(e){return e.usage(`$0 cloudforce-one events dataset permissions update <grant-id>
84
+
85
+ Update a permission`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const dt={command:`update <grant-id>`,describe:`Update a permission for dataset`,builder:ut,handler:async r=>c({command:`cloudforce-one events dataset permissions update`,classification:{safeFlags:[`role`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset permissions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/permissions/${r[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(r[`grant-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``),"grant-id":String(r[`grant-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({role:p(r.role,`role`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.permissions.update({...e,account_id:l,dataset_id:r[`dataset-id`],grant_id:r[`grant-id`]})),{successLabel:`Updated`});return}r.role===void 0&&(r.role=await g(`role`,`The role field`,[`read`,`write`]));let d=f({role:p(r.role,`role`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.dataset.permissions.update({...d,account_id:l,dataset_id:r[`dataset-id`],grant_id:r[`grant-id`]})),{successLabel:`Updated`})})},ft={command:`permissions`,describe:`Operations for events.dataset.permissions`,builder:e=>e.command(at).command(st).command(lt).command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pt(e){return e.usage(`$0 cloudforce-one events dataset tags indicators get <tag-uuid>
86
+
87
+ Returns indicators associated with the provided tag UUID, with pagination. By default fans out across every indicator dataset the account can read; pass datasetIds to scope to UUIDs, analytics datasets, or operational datasets. Analytics datasets do not expose tag associations, so the analytics scope returns an empty result.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to scope to (repeat the param for multiple), or one standalone scope: 'all'/'*', 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. Analytics datasets do not expose tag associations, so 'analytics' returns an empty result. Omit to search all readable datasets.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-event`,{type:`string`,description:`Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter.`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`get <tag-uuid>`,describe:`List indicators related to a tag`,builder:v(pt),handler:async r=>c({command:`cloudforce-one events dataset tags indicators get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasetIds:r[`dataset-ids`],page:r.page,pageSize:r[`page-size`],indicatorType:r[`indicator-type`],relatedEvent:r[`related-event`],search:r.search};if(r.dryRun){o({command:`cf cloudforce-one events dataset tags indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}/indicators`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.dataset.tags.indicators.get({account_id:u,tag_uuid:r[`tag-uuid`],...c})),{successLabel:`Loaded`})})},ht={command:`indicators`,describe:`Operations for events.dataset.tags.indicators`,builder:e=>e.command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`tags`,describe:`Operations for events.dataset.tags`,builder:e=>e.command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _t(e){return e.usage(`$0 cloudforce-one events dataset target industries get <dataset-id>
88
+
89
+ Lists all target industries for a specific dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`get <dataset-id>`,describe:`Lists all target industries for a specific dataset`,builder:_t,handler:async r=>c({command:`cloudforce-one events dataset target industries get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events dataset target industries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/targetIndustries`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.dataset.target.industries.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})})},yt={command:`industries`,describe:`Operations for events.dataset.target.industries`,builder:e=>e.command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bt={command:`target`,describe:`Operations for events.dataset.target`,builder:e=>e.command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`dataset`,describe:`Operations for events.dataset`,builder:e=>e.command(X).command(Q).command(J).command(ie).command(Ce).command(Oe).command(et).command(rt).command(ft).command(gt).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function St(e){return e.usage(`$0 cloudforce-one events datasets populate create
90
+
91
+ Populate dataset-specific lookup tables from existing Events data with batch processing`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ct={command:`create`,describe:`Populate dataset-specific lookup tables from existing Events data with batch processing`,builder:St,handler:async r=>c({command:`cloudforce-one events datasets populate create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events datasets populate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/datasets/populate`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.events.datasets.populate.create({account_id:l})),{successLabel:`Created`})})},wt={command:`populate`,describe:`Operations for events.datasets.populate`,builder:e=>e.command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tt={command:`datasets`,describe:`Operations for events.datasets`,builder:e=>e.command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Et(e){return e.usage(`$0 cloudforce-one events delete delete <dataset-id>
92
+
93
+ Deletes one or more events`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`event-ids`,{type:`string`,description:`Array of Event IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Dt={command:`delete <dataset-id>`,describe:`Deletes one or more events`,builder:Et,handler:async r=>c({command:`cloudforce-one events delete delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{let c={eventIds:r[`event-ids`]};if(r.dryRun){o({command:`cf cloudforce-one events delete delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/events`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await _({force:!!r.force})){process.stderr.write(`Aborted.
94
+ `);return}a(await s(`Deleting`,async()=>l.cloudforceOne.events.delete.delete({account_id:u,dataset_id:r[`dataset-id`],...c})),{successLabel:`Deleted`})})},Ot={command:`delete`,describe:`Operations for events.delete`,builder:e=>e.command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kt(e){return e.usage(`$0 cloudforce-one events graphql create graph ql
95
+
96
+ Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const At={command:`ql`,describe:`GraphQL endpoint for event aggregation`,builder:kt,handler:async r=>c({command:`cloudforce-one events graphql create graph ql`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events graphql create graph ql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/graphql`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.events.graphql.create.graph.ql({account_id:l})),{successLabel:`Created`})})};function jt(e){return e.usage(`$0 cloudforce-one events graphql create graph qlv2
97
+
98
+ Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`qlv2`,describe:`GraphQL endpoint for event aggregation`,builder:jt,handler:async r=>c({command:`cloudforce-one events graphql create graph qlv2`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events graphql create graph qlv2`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/events/graphql`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.events.graphql.create.graph.qlv2({account_id:l})),{successLabel:`Created`})})},Nt={command:`graph`,describe:`Operations for events.graphql.create.graph`,builder:e=>e.command(At).command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`create`,describe:`Operations for events.graphql.create`,builder:e=>e.command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ft={command:`graphql`,describe:`Operations for events.graphql`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function It(e){return e.usage(`$0 cloudforce-one events indicator types get
99
+
100
+ Lists indicator types across multiple datasets`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*', 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, queries all accessible datasets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lt={command:`get`,describe:`Lists indicator types across multiple datasets`,builder:It,handler:async r=>c({command:`cloudforce-one events indicator types get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasetIds:r[`dataset-ids`]};if(r.dryRun){o({command:`cf cloudforce-one events indicator types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/indicator-types`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.indicator.types.get({account_id:u,...c})),{successLabel:`Loaded`})})},Rt={command:`types`,describe:`Operations for events.indicator.types`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},zt={command:`indicator`,describe:`Operations for events.indicator`,builder:e=>e.command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bt(e){return e.usage(`$0 cloudforce-one events indicators get
101
+
102
+ Retrieves indicators across specified datasets, ordered by createdAt descending then UUID, dataset ID, and shard ID ascending. Use the standalone datasetIds value 'all'/'*' for legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If no datasetIds are provided, uses the default dataset.`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' for legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, uses the default dataset.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType, uuid. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the 'in' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`name`,{type:`string`,description:`Filter indicators by value using substring match (LIKE). Legacy alternative to structured search.`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-events`,{type:`string`,description:`Filter by related event IDs`}).option(`tags`,{type:`string`,description:`Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value.`}).option(`tag-search`,{type:`string`,description:'Structured tag-metadata filter as a JSON array of {field, op, value} objects. Operates against the per-dataset IndicatorTag mirror so you can find indicators by tag attributes (origin country, motive, sophistication, priority, etc.) without a separate Tags lookup. Common dashboard usage: drill from a country into indicators, e.g. tagSearch=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Operators: equals, not, gt/gte/lt/lte (numeric only), contains/like/find/startsWith/endsWith (string only), in. AND-joined across entries; combined with `tags`, a matching tag must satisfy both. Max 10 entries per request, max 100 values per \'in\'. Performance notes: `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`created-after`,{type:`string`,description:`Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z').`}).option(`created-before`,{type:`string`,description:`Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z').`}).option(`related-events-limit`,{type:`number`,description:`Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events.`}).option(`include-tags`,{type:`boolean`,description:`Whether to include full tag details for each indicator. Defaults to true.`}).option(`include-total-count`,{type:`boolean`,description:`Whether to compute total count via COUNT(*). Defaults to false for performance. total_count is null unless this is true and the complete fan-out succeeds.`}).option(`format`,{type:`string`,description:`Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:"Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit. Cannot be combined with `cursor`.",choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `pagination.cursor`. When provided, all filters, datasetIds, page, `pageSize`, `includeTags` and `relatedEventsLimit` come from the cursor — do not resend them. Sending any filter, `page`, `pageSize`, `includeTags`, `relatedEventsLimit`, `includeTotalCount=true`, or `cache=from-graph` alongside a cursor yields a 400 `CursorFilterConflictError`. A cursor issued for a different entity, an unsupported version, or a dataset that has since been reconfigured as analytics-only yields a 400 `InvalidCursorError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vt={command:`get`,describe:`Lists indicators across multiple datasets`,builder:v(Bt),handler:async r=>c({command:`cloudforce-one events indicators get`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},r,async()=>{let c={datasetIds:r[`dataset-ids`],page:r.page,pageSize:r[`page-size`],search:r.search,name:r.name,indicatorType:r[`indicator-type`],relatedEvents:r[`related-events`],tags:r.tags,tagSearch:r[`tag-search`],createdAfter:r[`created-after`],createdBefore:r[`created-before`],relatedEventsLimit:r[`related-events-limit`],includeTags:r[`include-tags`],includeTotalCount:r[`include-total-count`],format:r.format,cache:r.cache,cursor:r.cursor};if(r.dryRun){o({command:`cf cloudforce-one events indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.indicators.get({account_id:u,...c})),{successLabel:`Loaded`})})},Ht={command:`indicators`,describe:`Operations for events.indicators`,builder:e=>e.command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ut(e){return e.usage(`$0 cloudforce-one events queries create-create
103
+
104
+ Create a new saved event query for the account`).option(`alert-enabled`,{type:`boolean`,description:`Enable alerts for this query`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Enable alert rollup for this query`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Enable rule for this query`}).option(`rule-scope`,{type:`string`,description:`Scope for the rule`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Wt={command:`create-create`,describe:`Create a saved event query`,builder:Ut,handler:async r=>c({command:`cloudforce-one events queries create-create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events queries create-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/queries/create`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({alert_enabled:r[`alert-enabled`],alert_rollup_enabled:r[`alert-rollup-enabled`],name:p(r.name,`name`,`text`),query_json:p(r[`query-json`],`query-json`,`text`),rule_enabled:r[`rule-enabled`],rule_scope:p(r[`rule-scope`],`rule-scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.queries.createCreate({...e,account_id:l})),{successLabel:`Created`});return}if(r[`alert-enabled`]===void 0)throw Error(`--alert-enabled is required (or pass --body with this field set).`);if(r[`alert-rollup-enabled`]===void 0)throw Error(`--alert-rollup-enabled is required (or pass --body with this field set).`);if(r.name===void 0&&(r.name=await h(`name`,`Unique name for the saved query`)),r[`query-json`]===void 0&&(r[`query-json`]=await h(`query-json`,`JSON string containing the query parameters`)),r[`rule-enabled`]===void 0)throw Error(`--rule-enabled is required (or pass --body with this field set).`);let d=f({alert_enabled:r[`alert-enabled`],alert_rollup_enabled:r[`alert-rollup-enabled`],name:p(r.name,`name`,`text`),query_json:p(r[`query-json`],`query-json`,`text`),rule_enabled:r[`rule-enabled`],rule_scope:p(r[`rule-scope`],`rule-scope`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.queries.createCreate({...d,account_id:l})),{successLabel:`Created`})})};function Gt(e){return e.usage(`$0 cloudforce-one events queries create <query-id>
105
+
106
+ Update an existing saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`Enable alerts for this query`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Enable alert rollup for this query`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Enable rule for this query`}).option(`rule-scope`,{type:`string`,description:`Scope for the rule`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Kt={command:`create <query-id>`,describe:`Update a saved event query`,builder:Gt,handler:async r=>c({command:`cloudforce-one events queries create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({alert_enabled:r[`alert-enabled`],alert_rollup_enabled:r[`alert-rollup-enabled`],name:p(r.name,`name`,`text`),query_json:p(r[`query-json`],`query-json`,`text`),rule_enabled:r[`rule-enabled`],rule_scope:p(r[`rule-scope`],`rule-scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.queries.create({...e,account_id:l,query_id:r[`query-id`]})),{successLabel:`Created`});return}let d=f({alert_enabled:r[`alert-enabled`],alert_rollup_enabled:r[`alert-rollup-enabled`],name:p(r.name,`name`,`text`),query_json:p(r[`query-json`],`query-json`,`text`),rule_enabled:r[`rule-enabled`],rule_scope:p(r[`rule-scope`],`rule-scope`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.queries.create({...d,account_id:l,query_id:r[`query-id`]})),{successLabel:`Created`})})};function qt(e){return e.usage(`$0 cloudforce-one events queries delete <query-id>
107
+
108
+ Delete a saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Jt={command:`delete <query-id>`,describe:`Delete a saved event query`,builder:qt,handler:async r=>c({command:`cloudforce-one events queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
109
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.queries.delete({account_id:l,query_id:r[`query-id`]})),{successLabel:`Deleted`})})};function Yt(e){return e.usage(`$0 cloudforce-one events queries get event
110
+
111
+ Retrieve all saved event queries for the account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xt={command:`event`,describe:`List all saved event queries`,builder:Yt,handler:async r=>c({command:`cloudforce-one events queries get event`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events queries get event`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/queries`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.queries.get.event({account_id:l})),{successLabel:`Loaded`})})};function Zt(e){return e.usage(`$0 cloudforce-one events queries get v2 <query-id>
112
+
113
+ Retrieve a saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qt={command:`v2 <query-id>`,describe:`Read a saved event query`,builder:Zt,handler:async r=>c({command:`cloudforce-one events queries get v2`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events queries get v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.queries.get.v2({account_id:l,query_id:r[`query-id`]})),{successLabel:`Loaded`})})},$t={command:`get`,describe:`Operations for events.queries.get`,builder:e=>e.command(Xt).command(Qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function en(e){return e.usage(`$0 cloudforce-one events queries patch <query-id>
114
+
115
+ Update an existing saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`Enable alerts for this query`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Enable alert rollup for this query`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Enable rule for this query`}).option(`rule-scope`,{type:`string`,description:`Scope for the rule`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tn={command:`patch <query-id>`,describe:`Update a saved event query`,builder:en,handler:async r=>c({command:`cloudforce-one events queries patch`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events queries patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({alert_enabled:r[`alert-enabled`],alert_rollup_enabled:r[`alert-rollup-enabled`],name:p(r.name,`name`,`text`),query_json:p(r[`query-json`],`query-json`,`text`),rule_enabled:r[`rule-enabled`],rule_scope:p(r[`rule-scope`],`rule-scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.queries.patch({...e,account_id:l,query_id:r[`query-id`]})),{successLabel:`Updated`});return}let d=f({alert_enabled:r[`alert-enabled`],alert_rollup_enabled:r[`alert-rollup-enabled`],name:p(r.name,`name`,`text`),query_json:p(r[`query-json`],`query-json`,`text`),rule_enabled:r[`rule-enabled`],rule_scope:p(r[`rule-scope`],`rule-scope`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.queries.patch({...d,account_id:l,query_id:r[`query-id`]})),{successLabel:`Updated`})})},nn={command:`queries`,describe:`Operations for events.queries`,builder:e=>e.command(Kt).command(Wt).command(Jt).command(tn).command($t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rn(e){return e.usage(`$0 cloudforce-one events raw create <raw-id>
116
+
117
+ Updates a raw event`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const an={command:`create <raw-id>`,describe:`Updates a raw event`,builder:rn,handler:async r=>c({command:`cloudforce-one events raw create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events raw create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/raw/${r[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(r[`raw-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``),"raw-id":String(r[`raw-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({source:p(r.source,`source`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.raw.create({...e,account_id:l,event_id:r[`event-id`],raw_id:r[`raw-id`]})),{successLabel:`Created`});return}let d=f({source:p(r.source,`source`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.raw.create({...d,account_id:l,event_id:r[`event-id`],raw_id:r[`raw-id`]})),{successLabel:`Created`})})},on={command:`raw`,describe:`Operations for events.raw`,builder:e=>e.command(an).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function sn(e){return e.usage(`$0 cloudforce-one events relate create create <event-id>
118
+
119
+ Creates event references for a event`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`events`,{type:`string`,array:!0,description:`The events field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const cn={command:`create <event-id>`,describe:`Creates event references for a event`,builder:sn,handler:async r=>c({command:`cloudforce-one events relate create create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events relate create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/relate/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/create`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({events:r.events}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.relate.create.create({...e,account_id:l,event_id:r[`event-id`]})),{successLabel:`Created`});return}if(r.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=f({events:r.events});a(await s(`Creating`,async()=>c.cloudforceOne.events.relate.create.create({...d,account_id:l,event_id:r[`event-id`]})),{successLabel:`Created`})})},ln={command:`create`,describe:`Operations for events.relate.create`,builder:e=>e.command(cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},un={command:`relate`,describe:`Operations for events.relate`,builder:e=>e.command(ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dn(e){return e.usage(`$0 cloudforce-one events relationships create create
120
+
121
+ Creates a directed relationship between two events. The relationship is from parent to child with a specified type.`).option(`child-ids`,{type:`string`,array:!0,description:`Array of UUIDs for child events. Single child = 1:1 relationship, multiple = 1:many relationships`}).option(`dataset-id`,{type:`string`,description:`Dataset identifier where the events are stored`}).option(`parent-id`,{type:`string`,description:`UUID of the parent event that will be the source of the relationship`}).option(`relationship-type`,{type:`string`,description:`Type of relationship to create between parent and child events`,choices:[`related_to`,`caused_by`,`attributed_to`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fn={command:`create`,describe:`Create a relationship between two events`,builder:dn,handler:async r=>c({command:`cloudforce-one events relationships create create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events relationships create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/relationships/create`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({childIds:r[`child-ids`],datasetId:p(r[`dataset-id`],`dataset-id`,`text`),parentId:p(r[`parent-id`],`parent-id`,`text`),relationshipType:p(r[`relationship-type`],`relationship-type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.relationships.create.create({...e,account_id:l})),{successLabel:`Created`});return}if(r[`child-ids`]===void 0)throw Error(`--child-ids is required (or pass --body with this field set).`);r[`dataset-id`]===void 0&&(r[`dataset-id`]=await h(`dataset-id`,`Dataset identifier where the events are stored`)),r[`parent-id`]===void 0&&(r[`parent-id`]=await h(`parent-id`,`UUID of the parent event that will be the source of the relationship`)),r[`relationship-type`]===void 0&&(r[`relationship-type`]=await g(`relationship-type`,`Type of relationship to create between parent and child events`,[`related_to`,`caused_by`,`attributed_to`]));let d=f({childIds:r[`child-ids`],datasetId:p(r[`dataset-id`],`dataset-id`,`text`),parentId:p(r[`parent-id`],`parent-id`,`text`),relationshipType:p(r[`relationship-type`],`relationship-type`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.relationships.create.create({...d,account_id:l})),{successLabel:`Created`})})},pn={command:`create`,describe:`Operations for events.relationships.create`,builder:e=>e.command(fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mn(e){return e.usage("$0 cloudforce-one events relationships get <event-id>\n\nThe `event_id` must be defined (to list existing events (and their IDs), use the [`Filter and List Events`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/methods/list/) endpoint). Also, must provide query parameters.").positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`direction`,{type:`string`,description:`The direction to traverse the graph. Defaults to 'both' to search all.`,choices:[`ancestors`,`descendants`,`both`]}).option(`max-depth`,{type:`number`,description:`The maximum depth to traverse. Defaults to 5.`}).option(`relationship-types`,{type:`string`,description:`An optional array of relationship types to filter by.`}).option(`indicator-type-ids`,{type:`string`,description:`An optional array of indicator type IDs to filter the results by.`}).option(`dataset-id`,{type:`string`,description:`The dataset ID to search within.`,demandOption:!0}).option(`include-parent`,{type:`boolean`,description:`Whether to include the starting event in the results. Defaults to true.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hn={command:`get <event-id>`,describe:`Filter and list events related to specific event`,builder:v(mn),handler:async r=>c({command:`cloudforce-one events relationships get`,classification:{safeFlags:[`direction`,`include-parent`,`dry-run`]}},r,async()=>{let c={direction:r.direction,maxDepth:r[`max-depth`],relationshipTypes:r[`relationship-types`],indicatorTypeIds:r[`indicator-type-ids`],datasetId:r[`dataset-id`],includeParent:r[`include-parent`],page:r.page,pageSize:r[`page-size`]};if(r.dryRun){o({command:`cf cloudforce-one events relationships get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/by-id/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/relationships`,pathParams:{"event-id":String(r[`event-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.relationships.get({account_id:u,event_id:r[`event-id`],...c})),{successLabel:`Loaded`})})},gn={command:`relationships`,describe:`Operations for events.relationships`,builder:e=>e.command(hn).command(pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _n(e){return e.usage("$0 cloudforce-one events tags categories actors list\n\nReturns all known Actors from the shared CFONE catalog. Non-CFONE accounts receive a redacted public projection: identity (`uuid`, `value`, `categoryUuid`, `categoryName`), metadata (`description`, `dateOfDiscovery`, `tlp`, `confidence`, `properties`), origin (`originCountryISO`, `originCountryISO_annotated`), and public aliases/references (`aliasGroupNames`, `aliases`, `externalReferences`, `externalReferences_annotated`). CFONE-internal fields (internal aliases, attribution, motive, opsec level, etc.) are stripped from the response.").option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`value`,{type:`string`,description:`Free-text substring match on actor name (Tag.value).`}).option(`filters`,{type:`string`,description:'Structured filters as a JSON array of {field, op, value} objects. Same shape as the events search API. Common use: filter actors by country with filters=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Max 10 entries per request, max 100 values per \'in\'. Non-CFONE callers may only filter on fields that are also public-readable (`value`, `categoryName`, `aliasGroupNames`, `originCountryISO`); filtering on a redacted field returns 400. Performance notes: `originCountryISO` uses its B-tree index for equals/in. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vn={command:`list`,describe:`Lists all Actors`,builder:v(_n),handler:async r=>c({command:`cloudforce-one events tags categories actors list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,pageSize:r[`page-size`],value:r.value,filters:r.filters};if(r.dryRun){o({command:`cf cloudforce-one events tags categories actors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/categories/actors`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.tags.categories.actors.list({account_id:u,...c})),{successLabel:`Loaded`})})},yn={command:`actors`,describe:`Operations for events.tags.categories.actors`,builder:e=>e.command(vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bn(e){return e.usage(`$0 cloudforce-one events tags categories create create
122
+
123
+ Creates a new Source-of-Truth tag category for an account.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects defining custom fields for tags in this category. Persisted as JSON; returned as a parsed array. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const xn={command:`create`,describe:`Creates a new tag category (SoT)`,builder:bn,handler:async r=>c({command:`cloudforce-one events tags categories create create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags categories create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/categories/create`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`),schema:d(r.schema,`schema`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.tags.categories.create.create({...e,account_id:l})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await h(`name`,`The name field`));let m=f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`),schema:d(r.schema,`schema`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.tags.categories.create.create({...m,account_id:l})),{successLabel:`Created`})})},Sn={command:`create`,describe:`Operations for events.tags.categories.create`,builder:e=>e.command(xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cn(e){return e.usage(`$0 cloudforce-one events tags categories delete <category-uuid>
124
+
125
+ Deletes a Source-of-Truth tag category by UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const wn={command:`delete <category-uuid>`,describe:`Deletes a tag category (SoT)`,builder:Cn,handler:async r=>c({command:`cloudforce-one events tags categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tag-categories/${r[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(r[`category-uuid`]))}`,pathParams:{"category-uuid":String(r[`category-uuid`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
126
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.tags.categories.delete({account_id:l,category_uuid:r[`category-uuid`]})),{successLabel:`Deleted`})})};function Tn(e){return e.usage(`$0 cloudforce-one events tags categories get-by-id <category-uuid>
127
+
128
+ Returns a single Source-of-Truth tag category by UUID, including its full schema.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const En={command:`get-by-id <category-uuid>`,describe:`Gets a tag category by UUID (SoT)`,builder:Tn,handler:async r=>c({command:`cloudforce-one events tags categories get-by-id`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags categories get-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tag-categories/${r[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(r[`category-uuid`]))}`,pathParams:{"category-uuid":String(r[`category-uuid`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.tags.categories.getById({account_id:l,category_uuid:r[`category-uuid`]})),{successLabel:`Loaded`})})};function Dn(e){return e.usage(`$0 cloudforce-one events tags categories get
129
+
130
+ Returns all Source-of-Truth tag categories for an account.`).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const On={command:`get`,describe:`Lists all tag categories (SoT)`,builder:Dn,handler:async r=>c({command:`cloudforce-one events tags categories get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={search:r.search};if(r.dryRun){o({command:`cf cloudforce-one events tags categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/categories`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.tags.categories.get({account_id:u,...c})),{successLabel:`Loaded`})})};function kn(e){return e.usage(`$0 cloudforce-one events tags categories patch <category-uuid>
131
+
132
+ Updates a Source-of-Truth tag category by UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects. When provided, replaces the existing field schema. When omitted, the existing schema is preserved. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const An={command:`patch <category-uuid>`,describe:`Updates a tag category (SoT)`,builder:kn,handler:async r=>c({command:`cloudforce-one events tags categories patch`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags categories patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tag-categories/${r[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(r[`category-uuid`]))}`,pathParams:{"category-uuid":String(r[`category-uuid`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`),schema:d(r.schema,`schema`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.tags.categories.patch({...e,account_id:l,category_uuid:r[`category-uuid`]})),{successLabel:`Updated`});return}let m=f({description:p(r.description,`description`,`text`),name:p(r.name,`name`,`text`),schema:d(r.schema,`schema`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.tags.categories.patch({...m,account_id:l,category_uuid:r[`category-uuid`]})),{successLabel:`Updated`})})},jn={command:`categories`,describe:`Operations for events.tags.categories`,builder:e=>e.command(wn).command(On).command(En).command(An).command(yn).command(Sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mn(e){return e.usage(`$0 cloudforce-one events tags delete <tag-uuid>
133
+
134
+ Deletes a Source-of-Truth tag by UUID.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Nn={command:`delete <tag-uuid>`,describe:`Deletes a tag (SoT)`,builder:Mn,handler:async r=>c({command:`cloudforce-one events tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
135
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.events.tags.delete({account_id:l,tag_uuid:r[`tag-uuid`]})),{successLabel:`Deleted`})})};function Pn(e){return e.usage(`$0 cloudforce-one events tags get-by-id <tag-uuid>
136
+
137
+ Returns a single Source-of-Truth tag by UUID, including custom fields (properties).`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fn={command:`get-by-id <tag-uuid>`,describe:`Gets a tag by UUID (SoT)`,builder:Pn,handler:async r=>c({command:`cloudforce-one events tags get-by-id`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags get-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.tags.getById({account_id:l,tag_uuid:r[`tag-uuid`]})),{successLabel:`Loaded`})})};function In(e){return e.usage("$0 cloudforce-one events tags get\n\nReturns all Source-of-Truth tags for an account. Supports legacy free-text `search` on tag value and `categoryUuid` exact match, plus a structured `filters` JSON array for filtering by metadata fields (originCountryISO, actorCategory, motive, priority, etc.). Country values may be passed as alpha-2, alpha-3, name, or common alias.").option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:"Free-text substring match on tag value AND custom-field properties. Searches case-insensitively inside both `Tag.value` and the serialized `Tag.properties` JSON blob (keys, values, and annotation metadata like confidence/tlp are all searchable). Same serialized-text tradeoff as `aliasGroupNames` — substrings can cross JSON boundaries."}).option(`category-uuid`,{type:`string`,description:`CategoryUuid`}).option(`filters`,{type:`string`,description:'Structured filters as a JSON array of {field, op, value} objects. Searchable fields: uuid, value, categoryName, description, dateOfDiscovery, tlp, confidence, actorCategory, motive, attributionOrganization, originCountryISO, aliases, externalReferences, opsecLevel, sophisticationLevel, activeDuration, priority, lastSeen, aliasGroupNames. Operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use \'in\' for bulk OR within a single field, e.g. filters=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Multiple entries are AND-joined. Max 10 entries per request, max 100 values per \'in\'. Per-field notes: `uuid` accepts only \'equals\' and \'in\' (other operators throw ValidationError) — matched against the canonical lowercase storage but callers may pass either case (the server lowercases before comparison); index-backed by the column\'s UNIQUE constraint and intended for batched UUID → tag resolution. `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries (a search for "apt28" will also match "apt280" if both appear in the same tag\'s alias list).'}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ln={command:`get`,describe:`Lists all tags (SoT)`,builder:v(In),handler:async r=>c({command:`cloudforce-one events tags get`,classification:{safeFlags:[`cache`,`dry-run`]}},r,async()=>{let c={page:r.page,pageSize:r[`page-size`],search:r.search,categoryUuid:r[`category-uuid`],filters:r.filters,cache:r.cache};if(r.dryRun){o({command:`cf cloudforce-one events tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.tags.get({account_id:u,...c})),{successLabel:`Loaded`})})};function Rn(e){return e.usage(`$0 cloudforce-one events tags patch <tag-uuid>
138
+
139
+ Updates a Source-of-Truth tag by UUID.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. When changed, existing `properties` are re-validated against the new category's schema (400 on mismatch). Set to null to unlink (typeless; properties stop being validated)."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Omit to preserve existing.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Omit to preserve existing.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Internal structured aliases ({ value, confidence 1-10, tlp }). CFONE-only: never returned to non-CFONE accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`tlp`,{type:`string`,description:`Tag-level TLP marking. Omit to preserve existing. Cannot be cleared to null.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const zn={command:`patch <tag-uuid>`,describe:`Updates a tag (SoT)`,builder:Rn,handler:async r=>c({command:`cloudforce-one events tags patch`,classification:{safeFlags:[`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``)},bodyKind:`json`,body:r.body===void 0?f({aliasGroupNames:r[`alias-group-names`],aliasGroupNamesInternal:r[`alias-group-names-internal`],aliases:d(r.aliases,`aliases`),categoryUuid:p(r[`category-uuid`],`category-uuid`,`text`),confidence:r.confidence,dateOfDiscovery:p(r[`date-of-discovery`],`date-of-discovery`,`text`),description:p(r.description,`description`,`text`),externalReferenceLinks:r[`external-reference-links`],externalReferences:d(r[`external-references`],`external-references`),internalAliases:d(r[`internal-aliases`],`internal-aliases`),internalDescription:p(r[`internal-description`],`internal-description`,`text`),lastSeen:p(r[`last-seen`],`last-seen`,`text`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.tags.patch({...e,account_id:l,tag_uuid:r[`tag-uuid`]})),{successLabel:`Updated`});return}let m=f({aliasGroupNames:r[`alias-group-names`],aliasGroupNamesInternal:r[`alias-group-names-internal`],aliases:d(r.aliases,`aliases`),categoryUuid:p(r[`category-uuid`],`category-uuid`,`text`),confidence:r.confidence,dateOfDiscovery:p(r[`date-of-discovery`],`date-of-discovery`,`text`),description:p(r.description,`description`,`text`),externalReferenceLinks:r[`external-reference-links`],externalReferences:d(r[`external-references`],`external-references`),internalAliases:d(r[`internal-aliases`],`internal-aliases`),internalDescription:p(r[`internal-description`],`internal-description`,`text`),lastSeen:p(r[`last-seen`],`last-seen`,`text`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.events.tags.patch({...m,account_id:l,tag_uuid:r[`tag-uuid`]})),{successLabel:`Updated`})})};function Bn(e){return e.usage(`$0 cloudforce-one events tags relationships create <tag-uuid>
140
+
141
+ Creates a new relationship with the tag as the source entity. Requires a datasetId to locate the Indicators DO.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`dataset-id`,{type:`string`,description:`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,choices:[`event`,`indicator`]}).option(`type`,{type:`string`,description:`Relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vn={command:`create <tag-uuid>`,describe:`Create a relationship for a tag`,builder:Bn,handler:async r=>c({command:`cloudforce-one events tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events tags relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``)},bodyKind:`json`,body:r.body===void 0?f({confidence:r.confidence,datasetId:p(r[`dataset-id`],`dataset-id`,`text`),targetId:p(r[`target-id`],`target-id`,`text`),targetType:p(r[`target-type`],`target-type`,`text`),type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.events.tags.relationships.create({...e,account_id:l,tag_uuid:r[`tag-uuid`]})),{successLabel:`Created`});return}r[`dataset-id`]===void 0&&(r[`dataset-id`]=await h(`dataset-id`,`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`)),r[`target-id`]===void 0&&(r[`target-id`]=await h(`target-id`,`UUID of the target entity.`)),r[`target-type`]===void 0&&(r[`target-type`]=await g(`target-type`,`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,[`event`,`indicator`])),r.type===void 0&&(r.type=await h(`type`,`Relationship type.`));let d=f({confidence:r.confidence,datasetId:p(r[`dataset-id`],`dataset-id`,`text`),targetId:p(r[`target-id`],`target-id`,`text`),targetType:p(r[`target-type`],`target-type`,`text`),type:p(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.events.tags.relationships.create({...d,account_id:l,tag_uuid:r[`tag-uuid`]})),{successLabel:`Created`})})};function Hn(e){return e.usage(`$0 cloudforce-one events tags relationships delete <rel-uuid>
142
+
143
+ Deletes a relationship by UUID. Idempotent: returns deleted=false if not found. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Un={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:Hn,handler:async r=>c({command:`cloudforce-one events tags relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{let c={datasetId:r[`dataset-id`]};if(r.dryRun){o({command:`cf cloudforce-one events tags relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}/relationships/${r[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(r[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``),"rel-uuid":String(r[`rel-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await _({force:!!r.force})){process.stderr.write(`Aborted.
144
+ `);return}a(await s(`Deleting`,async()=>l.cloudforceOne.events.tags.relationships.delete({account_id:u,tag_uuid:r[`tag-uuid`],rel_uuid:r[`rel-uuid`],...c})),{successLabel:`Deleted`})})};function Wn(e){return e.usage(`$0 cloudforce-one events tags relationships list
145
+
146
+ Returns sparse relationship edges. Optionally hydrate related entities via \`expand\`. Fans out across all accessible indicator dataset shards. Analytics datasets do not expose tag associations, so the analytics scope returns an empty result.`).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`datasets`,{type:`string`,description:`Comma-separated dataset UUIDs to scope to, or one standalone scope: 'all'/'*', 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. Analytics datasets do not expose tag associations, so 'analytics' returns an empty result. Omit for all.`}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters (same as indicator list search).`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Offset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gn={command:`list`,describe:`List relationships for a tag`,builder:v(Wn),handler:async r=>c({command:`cloudforce-one events tags relationships list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasets:r.datasets,search:r.search,expand:r.expand,cursor:r.cursor,pageSize:r[`page-size`]};if(r.dryRun){o({command:`cf cloudforce-one events tags relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.events.tags.relationships.list({account_id:u,tag_uuid:r[`tag-uuid`],...c})),{successLabel:`Loaded`})})};function Kn(e){return e.usage(`$0 cloudforce-one events tags relationships update <rel-uuid>
147
+
148
+ Partially updates a relationship by UUID. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const qn={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:Kn,handler:async r=>c({command:`cloudforce-one events tags relationships update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasetId:r[`dataset-id`]};if(r.dryRun){o({command:`cf cloudforce-one events tags relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/${r[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(r[`tag-uuid`]))}/relationships/${r[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(r[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(r[`tag-uuid`]??``),"rel-uuid":String(r[`rel-uuid`]??``)},query:c,bodyKind:`json`,body:r.body===void 0?f({confidence:r.confidence,type:p(r.type,`type`,`text`)}):u(r.body)});return}let l=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>l.cloudforceOne.events.tags.relationships.update({...e,account_id:d,tag_uuid:r[`tag-uuid`],rel_uuid:r[`rel-uuid`],...c})),{successLabel:`Updated`});return}let m=f({confidence:r.confidence,type:p(r.type,`type`,`text`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>l.cloudforceOne.events.tags.relationships.update({...m,account_id:d,tag_uuid:r[`tag-uuid`],rel_uuid:r[`rel-uuid`],...c})),{successLabel:`Updated`})})},Jn={command:`relationships`,describe:`Operations for events.tags.relationships`,builder:e=>e.command(Vn).command(Un).command(Gn).command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Yn={command:`tags`,describe:`Operations for events.tags`,builder:e=>e.command(Nn).command(Ln).command(Fn).command(zn).command(jn).command(Jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xn(e){return e.usage(`$0 cloudforce-one events target industries catalog get
149
+
150
+ Lists all target industries from industry map catalog`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`get`,describe:`Lists all target industries from industry map catalog`,builder:Xn,handler:async r=>c({command:`cloudforce-one events target industries catalog get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events target industries catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/targetIndustries/catalog`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.events.target.industries.catalog.get({account_id:l})),{successLabel:`Loaded`})})},Qn={command:`catalog`,describe:`Operations for events.target.industries.catalog`,builder:e=>e.command(Zn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$n={command:`industries`,describe:`Operations for events.target.industries`,builder:e=>e.command(Qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},er={command:`target`,describe:`Operations for events.target`,builder:e=>e.command($n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tr(e){return e.usage(`$0 cloudforce-one events update bulk patch
151
+
152
+ Updates multiple events with the same field values. Maximum 100 events per request.`).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the events to update. Required to prevent cross-account modifications.`}).option(`event-ids`,{type:`string`,array:!0,description:`List of event UUIDs to update (1-100)`}).option(`updates-attacker`,{type:`string`,description:`The updates.attacker field`}).option(`updates-attacker-country`,{type:`string`,description:`The updates.attackerCountry field`}).option(`updates-category`,{type:`string`,description:`The updates.category field`}).option(`updates-created-at`,{type:`string`,description:`The updates.createdAt field`}).option(`updates-event`,{type:`string`,description:`The updates.event field`}).option(`updates-indicator`,{type:`string`,description:`The updates.indicator field`}).option(`updates-indicator-type`,{type:`string`,description:`The updates.indicatorType field`}).option(`updates-insight`,{type:`string`,description:`The updates.insight field`}).option(`updates-raw-source`,{type:`string`,description:`The updates.raw.source field`}).option(`updates-raw-tlp`,{type:`string`,description:`The updates.raw.tlp field`}).option(`updates-target-country`,{type:`string`,description:`The updates.targetCountry field`}).option(`updates-target-industry`,{type:`string`,description:`The updates.targetIndustry field`}).option(`updates-tlp`,{type:`string`,description:`The updates.tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nr={command:`patch`,describe:`Bulk update events`,builder:tr,handler:async r=>c({command:`cloudforce-one events update bulk patch`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one events update bulk patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/update/bulk`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({datasetId:p(r[`dataset-id`],`dataset-id`,`text`),eventIds:r[`event-ids`],updates:{attacker:p(r[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:p(r[`updates-attacker-country`],`updates-attacker-country`,`text`),category:p(r[`updates-category`],`updates-category`,`text`),createdAt:p(r[`updates-created-at`],`updates-created-at`,`text`),event:p(r[`updates-event`],`updates-event`,`text`),indicator:p(r[`updates-indicator`],`updates-indicator`,`text`),indicatorType:p(r[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:p(r[`updates-insight`],`updates-insight`,`text`),raw:{source:p(r[`updates-raw-source`],`updates-raw-source`,`text`),tlp:p(r[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:p(r[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:p(r[`updates-target-industry`],`updates-target-industry`,`text`),tlp:p(r[`updates-tlp`],`updates-tlp`,`text`)}}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.events.update.bulk.patch({...e,account_id:l})),{successLabel:`Updated`});return}if(r[`dataset-id`]===void 0&&(r[`dataset-id`]=await h(`dataset-id`,`Dataset ID containing the events to update. Required to prevent cross-account modifications.`)),r[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let d=f({datasetId:p(r[`dataset-id`],`dataset-id`,`text`),eventIds:r[`event-ids`],updates:{attacker:p(r[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:p(r[`updates-attacker-country`],`updates-attacker-country`,`text`),category:p(r[`updates-category`],`updates-category`,`text`),createdAt:p(r[`updates-created-at`],`updates-created-at`,`text`),event:p(r[`updates-event`],`updates-event`,`text`),indicator:p(r[`updates-indicator`],`updates-indicator`,`text`),indicatorType:p(r[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:p(r[`updates-insight`],`updates-insight`,`text`),raw:{source:p(r[`updates-raw-source`],`updates-raw-source`,`text`),tlp:p(r[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:p(r[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:p(r[`updates-target-industry`],`updates-target-industry`,`text`),tlp:p(r[`updates-tlp`],`updates-tlp`,`text`)}});a(await s(`Updating`,async()=>c.cloudforceOne.events.update.bulk.patch({...d,account_id:l})),{successLabel:`Updated`})})},rr={command:`bulk`,describe:`Operations for events.update.bulk`,builder:e=>e.command(nr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ir={command:`update`,describe:`Operations for events.update`,builder:e=>e.command(rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ar={command:`events`,describe:`Operations for events`,builder:e=>e.command(G).command(L).command(U).command(xt).command(Tt).command(Ot).command(Ft).command(zt).command(Ht).command(nn).command(on).command(un).command(gn).command(Yn).command(er).command(ir).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function or(e){return e.usage(`$0 cloudforce-one priority-intelligence constants get
153
+
154
+ 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 sr={command:`get`,describe:`Get PIR constants (methods, dimensions, and TLP values)`,builder:or,handler:async r=>c({command:`cloudforce-one priority-intelligence constants get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/constants`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.priorityIntelligence.constants.get({account_id:l})),{successLabel:`Loaded`})})},cr={command:`constants`,describe:`Operations for priority-intelligence.constants`,builder:e=>e.command(sr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lr(e){return e.usage(`$0 cloudforce-one priority-intelligence create
155
+
156
+ Creates a new PIR for the account. Subject to the account's annual PIR quota from the cfone.priority_intelligence_requirement_limit entitlement.`).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`priority`,{type:`number`,description:`The priority field`,default:0}).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`tlp`,{type:`string`,description:`The tlp field`,default:`amber`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ur={command:`create`,describe:`Create a priority intelligence requirement`,builder:lr,handler:async r=>c({command:`cloudforce-one priority-intelligence create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.create({...e,account_id:l})),{successLabel:`Created`});return}r.requirement===void 0&&(r.requirement=await h(`requirement`,`The requirement field`));let d=f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.create({...d,account_id:l})),{successLabel:`Created`})})};function dr(e){return e.usage(`$0 cloudforce-one priority-intelligence delete <priority-id>
157
+
158
+ Soft-deletes a PIR. The PIR will no longer count against quota.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fr={command:`delete <priority-id>`,describe:`Delete a priority intelligence requirement`,builder:dr,handler:async r=>c({command:`cloudforce-one priority-intelligence delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${r[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(r[`priority-id`]))}`,pathParams:{"priority-id":String(r[`priority-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
159
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.priorityIntelligence.delete({account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Deleted`})})};function pr(e){return e.usage(`$0 cloudforce-one priority-intelligence get <priority-id>
160
+
161
+ Returns a single free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mr={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:pr,handler:async r=>c({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${r[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(r[`priority-id`]))}`,pathParams:{"priority-id":String(r[`priority-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.priorityIntelligence.get({account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Loaded`})})};function hr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests create
162
+
163
+ Uses bounded full-span top-N candidates and daily event-date buckets. Results are conservative rather than an exact historical replay.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`backtest-days`,{type:`number`,description:`The backtest_days field`,default:30}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gr={command:`create`,describe:`Backtest account-interest change detection`,builder:hr,handler:async r=>c({command:`cloudforce-one priority-intelligence interests backtests create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests backtests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({as_of:p(r[`as-of`],`as-of`,`text`),backtest_days:r[`backtest-days`],candidate_limit:r[`candidate-limit`],dataset_ids:r[`dataset-ids`],emerging_min_current_count:r[`emerging-min-current-count`],established_min_absolute_delta:r[`established-min-absolute-delta`],established_min_prior_count:r[`established-min-prior-count`],established_min_relative_delta:r[`established-min-relative-delta`],window_days:r[`window-days`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.backtests.create({...e,account_id:l})),{successLabel:`Created`});return}let d=f({as_of:p(r[`as-of`],`as-of`,`text`),backtest_days:r[`backtest-days`],candidate_limit:r[`candidate-limit`],dataset_ids:r[`dataset-ids`],emerging_min_current_count:r[`emerging-min-current-count`],established_min_absolute_delta:r[`established-min-absolute-delta`],established_min_prior_count:r[`established-min-prior-count`],established_min_relative_delta:r[`established-min-relative-delta`],window_days:r[`window-days`]});a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.backtests.create({...d,account_id:l})),{successLabel:`Created`})})};function _r(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests get <backtest-id>
164
+
165
+ Returns a previously completed account-interest backtest by ID. The backtest must belong to this account.`).positional(`backtest-id`,{type:`string`,description:`Backtest UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vr={command:`get <backtest-id>`,describe:`Get a persisted account-interest backtest`,builder:_r,handler:async r=>c({command:`cloudforce-one priority-intelligence interests backtests get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests backtests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests/${r[`backtest-id`]==null?`<backtest-id>`:encodeURIComponent(String(r[`backtest-id`]))}`,pathParams:{"backtest-id":String(r[`backtest-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.priorityIntelligence.interests.backtests.get({account_id:l,backtest_id:r[`backtest-id`]})),{successLabel:`Loaded`})})},yr={command:`backtests`,describe:`Operations for priority-intelligence.interests.backtests`,builder:e=>e.command(gr).command(vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function br(e){return e.usage(`$0 cloudforce-one priority-intelligence interests create
166
+
167
+ Creates a structured account interest used by Priority Intelligence Option 2 evaluations. Interests are evaluated independently from free-form PIR requirements.`).option(`dimension`,{type:`string`,description:`The dimension field`,choices:[`actor`,`targetIndustry`,`category`,`country`,`attackerCountry`,`targetCountry`,`mitreAttack`,`killChain`,`mitreCapec`]}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const xr={command:`create`,describe:`Create an account interest for PIR Option 2`,builder:br,handler:async r=>c({command:`cloudforce-one priority-intelligence interests create`,classification:{safeFlags:[`dimension`,`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({dimension:p(r.dimension,`dimension`,`text`),enabled:r.enabled,value:p(r.value,`value`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.create({...e,account_id:l})),{successLabel:`Created`});return}r.dimension===void 0&&(r.dimension=await g(`dimension`,`The dimension field`,[`actor`,`targetIndustry`,`category`,`country`,`attackerCountry`,`targetCountry`,`mitreAttack`,`killChain`,`mitreCapec`])),r.value===void 0&&(r.value=await h(`value`,`The value field`));let d=f({dimension:p(r.dimension,`dimension`,`text`),enabled:r.enabled,value:p(r.value,`value`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.create({...d,account_id:l})),{successLabel:`Created`})})};function Sr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests delete <interest-id>
168
+
169
+ Deletes a structured account interest so later Priority Intelligence Option 2 evaluations no longer include it.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Cr={command:`delete <interest-id>`,describe:`Delete an account interest for PIR Option 2`,builder:Sr,handler:async r=>c({command:`cloudforce-one priority-intelligence interests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/${r[`interest-id`]==null?`<interest-id>`:encodeURIComponent(String(r[`interest-id`]))}`,pathParams:{"interest-id":String(r[`interest-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
170
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.priorityIntelligence.interests.delete({account_id:l,interest_id:r[`interest-id`]})),{successLabel:`Deleted`})})};function wr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations create
171
+
172
+ Compares the trailing event-date window with the preceding window. Results are precision-gated to enabled account interests. Late ingestion can cause an older event to appear in a later evaluation, so results describe changes in event-dated intelligence rather than exact adversary-activity timing.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Tr={command:`create`,describe:`Evaluate recent event-dated changes for account interests`,builder:wr,handler:async r=>c({command:`cloudforce-one priority-intelligence interests evaluations create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests evaluations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({as_of:p(r[`as-of`],`as-of`,`text`),candidate_limit:r[`candidate-limit`],dataset_ids:r[`dataset-ids`],emerging_min_current_count:r[`emerging-min-current-count`],established_min_absolute_delta:r[`established-min-absolute-delta`],established_min_prior_count:r[`established-min-prior-count`],established_min_relative_delta:r[`established-min-relative-delta`],window_days:r[`window-days`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.evaluations.create({...e,account_id:l})),{successLabel:`Created`});return}let d=f({as_of:p(r[`as-of`],`as-of`,`text`),candidate_limit:r[`candidate-limit`],dataset_ids:r[`dataset-ids`],emerging_min_current_count:r[`emerging-min-current-count`],established_min_absolute_delta:r[`established-min-absolute-delta`],established_min_prior_count:r[`established-min-prior-count`],established_min_relative_delta:r[`established-min-relative-delta`],window_days:r[`window-days`]});a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.evaluations.create({...d,account_id:l})),{successLabel:`Created`})})};function Er(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations get <evaluation-id>
173
+
174
+ Returns a previously completed live account-interest evaluation by ID. The evaluation must belong to this account.`).positional(`evaluation-id`,{type:`string`,description:`Evaluation UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dr={command:`get <evaluation-id>`,describe:`Get a persisted account-interest evaluation`,builder:Er,handler:async r=>c({command:`cloudforce-one priority-intelligence interests evaluations get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests evaluations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations/${r[`evaluation-id`]==null?`<evaluation-id>`:encodeURIComponent(String(r[`evaluation-id`]))}`,pathParams:{"evaluation-id":String(r[`evaluation-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.priorityIntelligence.interests.evaluations.get({account_id:l,evaluation_id:r[`evaluation-id`]})),{successLabel:`Loaded`})})},Or={command:`evaluations`,describe:`Operations for priority-intelligence.interests.evaluations`,builder:e=>e.command(Tr).command(Dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests list
175
+
176
+ Lists structured account interests for Priority Intelligence Option 2. Filter by enabled state and paginate results.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`enabled`,{type:`string`,description:`Enabled`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ar={command:`list`,describe:`List account interests for PIR Option 2`,builder:v(kr),handler:async r=>c({command:`cloudforce-one priority-intelligence interests list`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],enabled:r.enabled};if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.priorityIntelligence.interests.list({account_id:u,...c})),{successLabel:`Loaded`})})};function jr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests update <interest-id>
177
+
178
+ Updates a structured account interest used by Priority Intelligence Option 2 evaluations. Changing the value re-resolves the interest against the current catalog.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mr={command:`update <interest-id>`,describe:`Update an account interest for PIR Option 2`,builder:jr,handler:async r=>c({command:`cloudforce-one priority-intelligence interests update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence interests update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/${r[`interest-id`]==null?`<interest-id>`:encodeURIComponent(String(r[`interest-id`]))}`,pathParams:{"interest-id":String(r[`interest-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({enabled:r.enabled,value:p(r.value,`value`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.interests.update({...e,account_id:l,interest_id:r[`interest-id`]})),{successLabel:`Updated`});return}let d=f({enabled:r.enabled,value:p(r.value,`value`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.interests.update({...d,account_id:l,interest_id:r[`interest-id`]})),{successLabel:`Updated`})})},Nr={command:`interests`,describe:`Operations for priority-intelligence.interests`,builder:e=>e.command(xr).command(Cr).command(Ar).command(Mr).command(yr).command(Or).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pr(e){return e.usage(`$0 cloudforce-one priority-intelligence list
179
+
180
+ Lists free-form Priority Intelligence Requirements for the account. Results are scoped to the authenticated account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fr={command:`list`,describe:`List priority intelligence requirements for an account`,builder:Pr,handler:async r=>c({command:`cloudforce-one priority-intelligence list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.priorityIntelligence.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Ir(e){return e.usage(`$0 cloudforce-one priority-intelligence quota create
181
+
182
+ Returns the account's annual PIR quota including total allowed, remaining, and anniversary dates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lr={command:`create`,describe:`Get PIR quota for an account`,builder:Ir,handler:async r=>c({command:`cloudforce-one priority-intelligence quota create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence quota create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/quota`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.quota.create({account_id:l})),{successLabel:`Created`})})},Rr={command:`quota`,describe:`Operations for priority-intelligence.quota`,builder:e=>e.command(Lr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zr(e){return e.usage(`$0 cloudforce-one priority-intelligence update <priority-id>
183
+
184
+ Updates a free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Br={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:zr,handler:async r=>c({command:`cloudforce-one priority-intelligence update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one priority-intelligence update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${r[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(r[`priority-id`]))}`,pathParams:{"priority-id":String(r[`priority-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.update({...e,account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Updated`});return}let d=f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.update({...d,account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Updated`})})},Vr={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(ur).command(fr).command(mr).command(Fr).command(Br).command(cr).command(Nr).command(Rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hr(e){return e.usage(`$0 cloudforce-one requests asset-new create <request-id>
185
+
186
+ Uploads a new asset to a Cloudforce One intelligence request.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`source`,{type:`string`,description:`Asset file to upload.`})}const Ur={command:`create <request-id>`,describe:`Create a New Request Asset`,builder:Hr,handler:async l=>c({command:`cloudforce-one requests asset-new create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf cloudforce-one requests asset-new create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${l[`request-id`]==null?`<request-id>`:encodeURIComponent(String(l[`request-id`]))}/asset/new`,pathParams:{"request-id":String(l[`request-id`]??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file,source:l.source}});return}let c=await i(l),u=l.local?e:await t();if(l.accountId=u,l.file!==void 0||l.body!==void 0||l.source!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);l.source!==void 0&&e.append(`source`,String(p(l.source,`source`,`text`)??``)),a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/requests/${encodeURIComponent(String(l[`request-id`]))}/asset/new`,{body:e})),{successLabel:`Created`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/requests/${encodeURIComponent(String(l[`request-id`]))}/asset/new`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>c.cloudforceOne.requests.assetNew.create({account_id:u,request_id:l[`request-id`]})),{successLabel:`Created`})})},Wr={command:`asset-new`,describe:`Operations for requests.asset-new`,builder:e=>e.command(Ur).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gr(e){return e.usage(`$0 cloudforce-one requests assets create <request-id>
187
+
188
+ Lists assets attached to a Cloudforce One intelligence request.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Kr={command:`create <request-id>`,describe:`List Request Assets`,builder:Gr,handler:async r=>c({command:`cloudforce-one requests assets create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/asset`,pathParams:{"request-id":String(r[`request-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({page:r.page,per_page:r[`per-page`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.assets.create({...e,account_id:l,request_id:r[`request-id`]})),{successLabel:`Created`});return}if(r.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(r[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:r.page,per_page:r[`per-page`]});a(await s(`Creating`,async()=>c.cloudforceOne.requests.assets.create({...d,account_id:l,request_id:r[`request-id`]})),{successLabel:`Created`})})};function qr(e){return e.usage(`$0 cloudforce-one requests assets delete <asset-id>
189
+
190
+ Removes an asset from a Cloudforce One intelligence request.`).positional(`asset-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Jr={command:`delete <asset-id>`,describe:`Delete a Request Asset`,builder:qr,handler:async r=>c({command:`cloudforce-one requests assets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests assets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/asset/${r[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(r[`asset-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``),"asset-id":String(r[`asset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
191
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.requests.assets.delete({account_id:l,request_id:r[`request-id`],asset_id:r[`asset-id`]})),{successLabel:`Deleted`})})};function Yr(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
192
+
193
+ Download a file asset from R2 storage. Customer can only download from their own account.`).positional(`asset-id`,{type:`string`,description:`Asset UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Xr={command:`download <asset-id>`,describe:`Download asset (Customer)`,builder:Yr,handler:async r=>c({command:`cloudforce-one requests assets download`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests assets download`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/assets/${r[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(r[`asset-id`]))}/download`,pathParams:{"project-type":String(r[`project-type`]??``),"request-id":String(r[`request-id`]??``),"asset-id":String(r[`asset-id`]??``)},bodyKind:`none`});return}await i(r);let a=r.local?e:await t();r.accountId=a;let c=await s(`Loading`,async()=>te(`/accounts/${a}/cloudforce-one/v2/requests/${encodeURIComponent(String(r[`project-type`]))}/${encodeURIComponent(String(r[`request-id`]))}/assets/${encodeURIComponent(String(r[`asset-id`]))}/download`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));ee(r.text===!0?c.toString(`utf-8`):c)})};function Zr(e){return e.usage(`$0 cloudforce-one requests assets get <asset-id>
194
+
195
+ Retrieves an asset attached to a Cloudforce One intelligence request.`).positional(`asset-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qr={command:`get <asset-id>`,describe:`Get a Request Asset`,builder:Zr,handler:async r=>c({command:`cloudforce-one requests assets get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests assets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/asset/${r[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(r[`asset-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``),"asset-id":String(r[`asset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.assets.get({account_id:l,request_id:r[`request-id`],asset_id:r[`asset-id`]})),{successLabel:`Loaded`})})};function $r(e){return e.usage(`$0 cloudforce-one requests assets list
196
+
197
+ List all file assets for a request. Customer can only list assets from their own account.`).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ei={command:`list`,describe:`List assets in request (Customer)`,builder:v($r),handler:async r=>c({command:`cloudforce-one requests assets list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/assets/list`,pathParams:{"project-type":String(r[`project-type`]??``),"request-id":String(r[`request-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.assets.list({account_id:l,project_type:r[`project-type`],request_id:r[`request-id`]})),{successLabel:`Loaded`})})};function ti(e){return e.usage(`$0 cloudforce-one requests assets update <asset-id>
198
+
199
+ Updates an asset in a Cloudforce One intelligence request.`).positional(`asset-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`source`,{type:`string`,description:`Asset file to upload.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ni={command:`update <asset-id>`,describe:`Update a Request Asset`,builder:ti,handler:async r=>c({command:`cloudforce-one requests assets update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests assets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/asset/${r[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(r[`asset-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``),"asset-id":String(r[`asset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({source:p(r.source,`source`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.requests.assets.update({...e,account_id:l,request_id:r[`request-id`],asset_id:r[`asset-id`]})),{successLabel:`Updated`});return}let d=f({source:p(r.source,`source`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.requests.assets.update({...d,account_id:l,request_id:r[`request-id`],asset_id:r[`asset-id`]})),{successLabel:`Updated`})})};function ri(e){return e.usage(`$0 cloudforce-one requests assets upload <request-id>
200
+
201
+ Upload a file asset to R2 storage and associate it with a request. Customer can only upload to their own account.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`description`,{type:`string`,description:`Optional description of the asset`}).option(`metadata`,{type:`string`,description:`Optional JSON string of key-value pairs (e.g., '{"key1":"value1"}')`})}const ii={command:`upload <request-id>`,describe:`Upload asset to request (Customer)`,builder:v(ri),handler:async l=>c({command:`cloudforce-one requests assets upload`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf cloudforce-one requests assets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${l[`project-type`]==null?`<project-type>`:encodeURIComponent(String(l[`project-type`]))}/${l[`request-id`]==null?`<request-id>`:encodeURIComponent(String(l[`request-id`]))}/assets/upload`,pathParams:{"project-type":String(l[`project-type`]??``),"request-id":String(l[`request-id`]??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file,description:l.description,metadata:l.metadata}});return}let c=await i(l),u=l.local?e:await t();if(l.accountId=u,l.file!==void 0||l.body!==void 0||l.description!==void 0||l.metadata!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);l.description!==void 0&&e.append(`description`,String(p(l.description,`description`,`text`)??``)),l.metadata!==void 0&&e.append(`metadata`,String(p(l.metadata,`metadata`,`text`)??``)),a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/v2/requests/${encodeURIComponent(String(l[`project-type`]))}/${encodeURIComponent(String(l[`request-id`]))}/assets/upload`,{body:e})),{successLabel:`Created`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/v2/requests/${encodeURIComponent(String(l[`project-type`]))}/${encodeURIComponent(String(l[`request-id`]))}/assets/upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>c.cloudforceOne.requests.assets.upload({account_id:u,project_type:l[`project-type`],request_id:l[`request-id`]})),{successLabel:`Created`})})},ai={command:`assets`,describe:`Operations for requests.assets`,builder:e=>e.command(Kr).command(Jr).command(Xr).command(Qr).command(ei).command(ni).command(ii).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oi(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestGet <request-id>
202
+
203
+ Retrieves details for a specific Cloudforce One intelligence request.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const si={command:`cloudforceOneRequestGet <request-id>`,describe:`Get a Request`,builder:oi,handler:async r=>c({command:`cloudforce-one requests cloudforceOneRequestGet`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests cloudforceOneRequestGet`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.cloudforceOneRequestGet({account_id:l,request_id:r[`request-id`]})),{successLabel:`Loaded`})})};function ci(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestList
204
+
205
+ Lists Cloudforce One intelligence requests with filtering and pagination.`).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`request-type`,{type:`string`,description:`Requested information from request.`}).option(`sort-by`,{type:`string`,description:`Field to sort results by.`}).option(`sort-order`,{type:`string`,description:`Sort order (asc or desc).`,choices:[`asc`,`desc`]}).option(`status`,{type:`string`,description:`Request Status.`,choices:[`open`,`accepted`,`reported`,`approved`,`completed`,`declined`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const li={command:`cloudforceOneRequestList`,describe:`List Requests`,builder:ci,handler:async r=>c({command:`cloudforce-one requests cloudforceOneRequestList`,classification:{safeFlags:[`sort-order`,`status`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests cloudforceOneRequestList`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({page:r.page,per_page:r[`per-page`],request_type:p(r[`request-type`],`request-type`,`text`),sort_by:p(r[`sort-by`],`sort-by`,`text`),sort_order:p(r[`sort-order`],`sort-order`,`text`),status:p(r.status,`status`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestList({...e,account_id:l})),{successLabel:`Created`});return}if(r.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(r[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:r.page,per_page:r[`per-page`],request_type:p(r[`request-type`],`request-type`,`text`),sort_by:p(r[`sort-by`],`sort-by`,`text`),sort_order:p(r[`sort-order`],`sort-order`,`text`),status:p(r.status,`status`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestList({...d,account_id:l})),{successLabel:`Created`})})};function ui(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestNew
206
+
207
+ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability should be provided. If one is not provided, a default will be assigned.`).option(`content`,{type:`string`,description:`Request content.`}).option(`priority`,{type:`string`,description:`Priority for analyzing the request.`}).option(`request-type`,{type:`string`,description:`Requested information from request.`}).option(`summary`,{type:`string`,description:`Brief description of the request.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const di={command:`cloudforceOneRequestNew`,describe:`Create a New Request.`,builder:ui,handler:async r=>c({command:`cloudforce-one requests cloudforceOneRequestNew`,classification:{safeFlags:[`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests cloudforceOneRequestNew`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/new`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({content:p(r.content,`content`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),summary:p(r.summary,`summary`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestNew({body:e,account_id:l})),{successLabel:`Created`});return}let d=f({content:p(r.content,`content`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),summary:p(r.summary,`summary`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestNew({body:d,account_id:l})),{successLabel:`Created`})})};function fi(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestUpdate <request-id>
208
+
209
+ Updating a request alters the request in the Cloudforce One queue. This API may be used to update any attributes of the request after the initial submission. Only fields that you choose to update need to be add to the request body.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`content`,{type:`string`,description:`Request content.`}).option(`priority`,{type:`string`,description:`Priority for analyzing the request.`}).option(`request-type`,{type:`string`,description:`Requested information from request.`}).option(`summary`,{type:`string`,description:`Brief description of the request.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pi={command:`cloudforceOneRequestUpdate <request-id>`,describe:`Update a Request`,builder:fi,handler:async r=>c({command:`cloudforce-one requests cloudforceOneRequestUpdate`,classification:{safeFlags:[`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests cloudforceOneRequestUpdate`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({content:p(r.content,`content`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),summary:p(r.summary,`summary`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestUpdate({body:e,account_id:l,request_id:r[`request-id`]})),{successLabel:`Updated`});return}let d=f({content:p(r.content,`content`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),summary:p(r.summary,`summary`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestUpdate({body:d,account_id:l,request_id:r[`request-id`]})),{successLabel:`Updated`})})};function mi(e){return e.usage(`$0 cloudforce-one requests constants
210
+
211
+ Retrieves constant values used in Cloudforce One requests, including valid statuses and types.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hi={command:`constants`,describe:`Get Request Priority, Status, and TLP constants`,builder:mi,handler:async r=>c({command:`cloudforce-one requests constants`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests constants`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/constants`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.constants({account_id:l})),{successLabel:`Loaded`})})};function gi(e){return e.usage(`$0 cloudforce-one requests delete <request-id>
212
+
213
+ Deletes a Cloudforce One intelligence request and all associated data.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _i={command:`delete <request-id>`,describe:`Delete a Request`,builder:gi,handler:async r=>c({command:`cloudforce-one requests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
214
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.requests.delete({account_id:l,request_id:r[`request-id`]})),{successLabel:`Deleted`})})};function vi(e){return e.usage(`$0 cloudforce-one requests getRequestList <project-type>
215
+
216
+ Retrieves a paginated list of RFIs with filtering and sorting options.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`status`,{type:`string`,description:`Status filter. Projects with a narrowed dashboard vocabulary accept only their customer-facing values.`}).option(`search`,{type:`string`,description:`Search`}).option(`created-by`,{type:`string`,description:"Filter by creator email. NOTE: For the `legal-response` project type this query parameter is **rejected with HTTP 400** — the server derives the filter from the authenticated user's JWT automatically and does not accept a client-supplied value. Requests to `legal-response` with no valid JWT identity are rejected with HTTP 401."}).option(`assignee`,{type:`string`,description:`Assignee`}).option(`request-type`,{type:`string`,description:`RequestType`}).option(`priority`,{type:`string`,description:`Priority`}).option(`tlp`,{type:`string`,description:`Tlp`}).option(`id`,{type:`string`,description:`ID`}).option(`readable-id`,{type:`string`,description:`ReadableId`}).option(`summary`,{type:`string`,description:`Summary`}).option(`filter-account-id`,{type:`string`,description:`AccountId`}).option(`metadata`,{type:`string`,description:`JSON string object of metadata filters. Supports two formats: 1) Simple values for exact match (backward compatible): {"status": "open"} 2) Operator objects for advanced filtering: {"identifiers": {"operator": "contains_line", "value": "blah.com"}}. Available operators: 'eq' (exact match, default), 'contains' (substring match), 'contains_line' (match complete line in newline-separated text). Date fields are automatically normalized to YYYY-MM-DD format.`}).option(`order-by`,{type:`string`,description:`OrderBy`}).option(`order`,{type:`string`,description:`Order`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yi={command:`getRequestList <project-type>`,describe:`List RFIs`,builder:v(vi),handler:async r=>c({command:`cloudforce-one requests getRequestList`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,pageSize:r[`page-size`],status:r.status,search:r.search,createdBy:r[`created-by`],assignee:r.assignee,requestType:r[`request-type`],priority:r.priority,tlp:r.tlp,id:r.id,readableId:r[`readable-id`],summary:r.summary,accountId:r[`filter-account-id`],metadata:r.metadata,orderBy:r[`order-by`],order:r.order};if(r.dryRun){o({command:`cf cloudforce-one requests getRequestList`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}`,pathParams:{"project-type":String(r[`project-type`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.requests.getRequestList({account_id:u,project_type:r[`project-type`],...c})),{successLabel:`Loaded`})})};function bi(e){return e.usage(`$0 cloudforce-one requests getRequestRead <request-id>
217
+
218
+ Retrieves a specific RFI by its UUID with related data.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xi={command:`getRequestRead <request-id>`,describe:`Get an RFI by ID`,builder:v(bi),handler:async r=>c({command:`cloudforce-one requests getRequestRead`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests getRequestRead`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}`,pathParams:{"project-type":String(r[`project-type`]??``),"request-id":String(r[`request-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.getRequestRead({account_id:l,project_type:r[`project-type`],request_id:r[`request-id`]})),{successLabel:`Loaded`})})};function Si(e){return e.usage(`$0 cloudforce-one requests legal-response access-check
219
+
220
+ Returns whether the JWT-authenticated user's email is on the legal-response allowlist. This endpoint is purely informational for UI gating; actual access enforcement is performed by \`legalResponseMiddleware\` on real legal-response endpoints. Read-only — no Durable Object writes are performed.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ci={command:`access-check`,describe:`Check if current user is allowlisted for Legal Response`,builder:Si,handler:async r=>c({command:`cloudforce-one requests legal-response access-check`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests legal-response access-check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/legal-response/access-check`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.legalResponse.accessCheck({account_id:l})),{successLabel:`Loaded`})})},wi={command:`legal-response`,describe:`Operations for requests.legal-response`,builder:e=>e.command(Ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ti(e){return e.usage(`$0 cloudforce-one requests message create <request-id>
221
+
222
+ Adds a message to a Cloudforce One intelligence request conversation.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`content`,{type:`string`,description:`Content of message.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ei={command:`create <request-id>`,describe:`Create a New Request Message`,builder:Ti,handler:async r=>c({command:`cloudforce-one requests message create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests message create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/message/new`,pathParams:{"request-id":String(r[`request-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({content:p(r.content,`content`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.message.create({body:e,account_id:l,request_id:r[`request-id`]})),{successLabel:`Created`});return}let d=f({content:p(r.content,`content`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.requests.message.create({body:d,account_id:l,request_id:r[`request-id`]})),{successLabel:`Created`})})};function Di(e){return e.usage(`$0 cloudforce-one requests message delete <message-id>
223
+
224
+ Removes a message from a Cloudforce One intelligence request thread.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oi={command:`delete <message-id>`,describe:`Delete a Request Message`,builder:Di,handler:async r=>c({command:`cloudforce-one requests message delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests message delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/message/${r[`message-id`]==null?`<message-id>`:encodeURIComponent(String(r[`message-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``),"message-id":String(r[`message-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
225
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.requests.message.delete({account_id:l,request_id:r[`request-id`],message_id:r[`message-id`]})),{successLabel:`Deleted`})})};function ki(e){return e.usage(`$0 cloudforce-one requests message get <request-id>
226
+
227
+ Lists messages in a Cloudforce One intelligence request conversation.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`sort-by`,{type:`string`,description:`Field to sort results by.`}).option(`sort-order`,{type:`string`,description:`Sort order (asc or desc).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ai={command:`get <request-id>`,describe:`List Request Messages`,builder:ki,handler:async r=>c({command:`cloudforce-one requests message get`,classification:{safeFlags:[`sort-order`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests message get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/message`,pathParams:{"request-id":String(r[`request-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({page:r.page,per_page:r[`per-page`],sort_by:p(r[`sort-by`],`sort-by`,`text`),sort_order:p(r[`sort-order`],`sort-order`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.message.get({...e,account_id:l,request_id:r[`request-id`]})),{successLabel:`Created`});return}if(r.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(r[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:r.page,per_page:r[`per-page`],sort_by:p(r[`sort-by`],`sort-by`,`text`),sort_order:p(r[`sort-order`],`sort-order`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.requests.message.get({...d,account_id:l,request_id:r[`request-id`]})),{successLabel:`Created`})})};function ji(e){return e.usage(`$0 cloudforce-one requests message update <message-id>
228
+
229
+ Updates a message in a Cloudforce One intelligence request thread.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`content`,{type:`string`,description:`Content of message.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mi={command:`update <message-id>`,describe:`Update a Request Message`,builder:ji,handler:async r=>c({command:`cloudforce-one requests message update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests message update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/message/${r[`message-id`]==null?`<message-id>`:encodeURIComponent(String(r[`message-id`]))}`,pathParams:{"request-id":String(r[`request-id`]??``),"message-id":String(r[`message-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({content:p(r.content,`content`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.requests.message.update({body:e,account_id:l,request_id:r[`request-id`],message_id:r[`message-id`]})),{successLabel:`Updated`});return}let d=f({content:p(r.content,`content`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.requests.message.update({body:d,account_id:l,request_id:r[`request-id`],message_id:r[`message-id`]})),{successLabel:`Updated`})})},Ni={command:`message`,describe:`Operations for requests.message`,builder:e=>e.command(Ei).command(Oi).command(Ai).command(Mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pi(e){return e.usage(`$0 cloudforce-one requests messages create <request-id>
230
+
231
+ Creates a customer dashboard message on an RFI request. Messages are always published on send. Workflow-enabled projects require Idempotency-Key and atomically record message activity and any policy transition. For token-billed project types, substantive follow-on messages consume message tokens and are subject to quarterly quota enforcement.`).positional(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`author-id`,{type:`string`,description:`The author_id field`}).option(`author-name`,{type:`string`,description:`The author_name field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`,default:!1}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`],default:`red`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fi={command:`create <request-id>`,describe:`Create a customer follow-on message on an RFI request`,builder:Pi,handler:async d=>c({command:`cloudforce-one requests messages create`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){o({command:`cf cloudforce-one requests messages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${d[`project-type`]==null?`<project-type>`:encodeURIComponent(String(d[`project-type`]))}/${d[`request-id`]==null?`<request-id>`:encodeURIComponent(String(d[`request-id`]))}/messages/new`,pathParams:{"project-type":String(d[`project-type`]??``),"request-id":String(d[`request-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({attachment_asset_ids:d[`attachment-asset-ids`],author_id:p(d[`author-id`],`author-id`,`text`),author_name:p(d[`author-name`],`author-name`,`text`),content:p(d.content,`content`,`text`),publish:d.publish,tlp:p(d.tlp,`tlp`,`text`)}):u(d.body)});return}let m=await i(d),g=d.local?e:await t();if(d.accountId=g,d.body){let e=u(d.body);a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${g}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/new`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}d.content===void 0&&(d.content=await h(`content`,`The content field`));let _={};d[`attachment-asset-ids`]!==void 0&&l(_,[`attachment_asset_ids`],d[`attachment-asset-ids`]),d[`author-id`]!==void 0&&l(_,[`author_id`],p(d[`author-id`],`author-id`,`text`)),d[`author-name`]!==void 0&&l(_,[`author_name`],p(d[`author-name`],`author-name`,`text`)),d.content!==void 0&&l(_,[`content`],p(d.content,`content`,`text`)),d.publish!==void 0&&l(_,[`publish`],d.publish),d.tlp!==void 0&&l(_,[`tlp`],p(d.tlp,`tlp`,`text`)),a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${g}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/new`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function Ii(e){return e.usage(`$0 cloudforce-one requests messages get <message-id>
232
+
233
+ Returns the details for a specific message belonging to an RFI request.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Li={command:`get <message-id>`,describe:`Read a single message for an RFI request`,builder:Ii,handler:async r=>c({command:`cloudforce-one requests messages get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests messages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/messages/${r[`message-id`]==null?`<message-id>`:encodeURIComponent(String(r[`message-id`]))}`,pathParams:{"project-type":String(r[`project-type`]??``),"request-id":String(r[`request-id`]??``),"message-id":String(r[`message-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.messages.get({account_id:l,project_type:r[`project-type`],request_id:r[`request-id`],message_id:r[`message-id`]})),{successLabel:`Loaded`})})};function Ri(e){return e.usage(`$0 cloudforce-one requests messages list
234
+
235
+ Retrieves the published, non-deleted messages visible to the agent for an RFI request, with pagination.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`page`,{type:`string`,description:`Page`}).option(`per-page`,{type:`string`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zi={command:`list`,describe:`List messages for an RFI request`,builder:Ri,handler:async r=>c({command:`cloudforce-one requests messages list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf cloudforce-one requests messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}/messages`,pathParams:{"project-type":String(r[`project-type`]??``),"request-id":String(r[`request-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.requests.messages.list({account_id:u,project_type:r[`project-type`],request_id:r[`request-id`],...c})),{successLabel:`Loaded`})})};function Bi(e){return e.usage(`$0 cloudforce-one requests messages update <message-id>
236
+
237
+ Updates an existing message, typically to publish a draft by setting publish=true. Workflow-enabled publication requires Idempotency-Key and atomically records message activity and any policy transition.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vi={command:`update <message-id>`,describe:`Update/publish a message for an RFI request`,builder:Bi,handler:async d=>c({command:`cloudforce-one requests messages update`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){o({command:`cf cloudforce-one requests messages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${d[`project-type`]==null?`<project-type>`:encodeURIComponent(String(d[`project-type`]))}/${d[`request-id`]==null?`<request-id>`:encodeURIComponent(String(d[`request-id`]))}/messages/${d[`message-id`]==null?`<message-id>`:encodeURIComponent(String(d[`message-id`]))}`,pathParams:{"project-type":String(d[`project-type`]??``),"request-id":String(d[`request-id`]??``),"message-id":String(d[`message-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({attachment_asset_ids:d[`attachment-asset-ids`],content:p(d.content,`content`,`text`),publish:d.publish,tlp:p(d.tlp,`tlp`,`text`)}):u(d.body)});return}let m=await i(d),_=d.local?e:await t();if(d.accountId=_,d.body){let e=u(d.body);a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${_}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/${encodeURIComponent(String(d[`message-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}if(d.content===void 0&&(d.content=await h(`content`,`The content field`)),d.publish===void 0)throw Error(`--publish is required (or pass --body with this field set).`);d.tlp===void 0&&(d.tlp=await g(`tlp`,`The tlp field`,[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]));let v={};d[`attachment-asset-ids`]!==void 0&&l(v,[`attachment_asset_ids`],d[`attachment-asset-ids`]),d.content!==void 0&&l(v,[`content`],p(d.content,`content`,`text`)),d.publish!==void 0&&l(v,[`publish`],d.publish),d.tlp!==void 0&&l(v,[`tlp`],p(d.tlp,`tlp`,`text`)),a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${_}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/${encodeURIComponent(String(d[`message-id`]))}`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},Hi={command:`messages`,describe:`Operations for requests.messages`,builder:e=>e.command(Fi).command(Li).command(zi).command(Vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ui(e){return e.usage(`$0 cloudforce-one requests metadata list
238
+
239
+ Get custom metadata fields available for the specified project type`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-type`,{type:`string`,description:`Filter fields to those applicable to this request type. Fields without request type restrictions are always included.`}).option(`country`,{type:`string`,description:`Exclude fields restricted for this alpha-2 country code`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wi={command:`list`,describe:`List metadata fields for an RFI type`,builder:v(Ui),handler:async r=>c({command:`cloudforce-one requests metadata list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={request_type:r[`request-type`],country:r.country};if(r.dryRun){o({command:`cf cloudforce-one requests metadata list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/metadata`,pathParams:{"project-type":String(r[`project-type`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.requests.metadata.list({account_id:u,project_type:r[`project-type`],...c})),{successLabel:`Loaded`})})},Gi={command:`metadata`,describe:`Operations for requests.metadata`,builder:e=>e.command(Wi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ki(e){return e.usage(`$0 cloudforce-one requests postRequestCreate <project-type>
240
+
241
+ Creates a new Request for Information with the specified project type and details.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description (optional). Defaults to an empty string when omitted.`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use `low`, `routine`, `high`, `urgent`; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases. Defaults to `routine`.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).option(`request-type`,{type:`string`,description:`Optional request type for the request`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`title`,{type:`string`,description:`RFI title (optional). When omitted, the server generates a summary from the request type and readable ID.`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. Canonical values are `clear`, `green`, `amber`, `amber-strict`, `red`, `purple`. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const qi={command:`postRequestCreate <project-type>`,describe:`Creates a new RFI`,builder:v(Ki),handler:async r=>c({command:`cloudforce-one requests postRequestCreate`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests postRequestCreate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}`,pathParams:{"project-type":String(r[`project-type`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),eventId:p(r[`event-id`],`event-id`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),subtypeId:p(r[`subtype-id`],`subtype-id`,`text`),title:p(r.title,`title`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.postRequestCreate({...e,account_id:l,project_type:r[`project-type`]})),{successLabel:`Created`});return}let d=f({description:p(r.description,`description`,`text`),eventId:p(r[`event-id`],`event-id`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),subtypeId:p(r[`subtype-id`],`subtype-id`,`text`),title:p(r.title,`title`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.requests.postRequestCreate({...d,account_id:l,project_type:r[`project-type`]})),{successLabel:`Created`})})};function $(e){return e.usage(`$0 cloudforce-one requests priority create
242
+
243
+ Creates a new priority intelligence request in Cloudforce One.`).option(`labels`,{type:`string`,array:!0,description:`List of labels.`}).option(`priority`,{type:`number`,description:`Priority.`}).option(`requirement`,{type:`string`,description:`Requirement.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ji={command:`create`,describe:`Create a New Priority Intelligence Requirement`,builder:$,handler:async r=>c({command:`cloudforce-one requests priority create`,classification:{safeFlags:[`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests priority create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/priority/new`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.priority.create({body:e,account_id:l})),{successLabel:`Created`});return}if(r.labels===void 0)throw Error(`--labels is required (or pass --body with this field set).`);if(r.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);r.requirement===void 0&&(r.requirement=await h(`requirement`,`Requirement.`)),r.tlp===void 0&&(r.tlp=await g(`tlp`,`The CISA defined Traffic Light Protocol (TLP).`,[`clear`,`amber`,`amber-strict`,`green`,`red`]));let d=f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.requests.priority.create({body:d,account_id:l})),{successLabel:`Created`})})};function Yi(e){return e.usage(`$0 cloudforce-one requests priority delete <priority-id>
244
+
245
+ Deletes a priority intelligence request from Cloudforce One.`).positional(`priority-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Xi={command:`delete <priority-id>`,describe:`Delete a Priority Intelligence Requirement`,builder:Yi,handler:async r=>c({command:`cloudforce-one requests priority delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests priority delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/priority/${r[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(r[`priority-id`]))}`,pathParams:{"priority-id":String(r[`priority-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
246
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.requests.priority.delete({account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Deleted`})})};function Zi(e){return e.usage(`$0 cloudforce-one requests priority get <priority-id>
247
+
248
+ Retrieves a specific priority intelligence request from Cloudforce One.`).positional(`priority-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qi={command:`get <priority-id>`,describe:`Get a Priority Intelligence Requirement`,builder:Zi,handler:async r=>c({command:`cloudforce-one requests priority get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests priority get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/priority/${r[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(r[`priority-id`]))}`,pathParams:{"priority-id":String(r[`priority-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.priority.get({account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Loaded`})})};function $i(e){return e.usage(`$0 cloudforce-one requests priority list
249
+
250
+ Lists priority intelligence requests in Cloudforce One.`).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ea={command:`list`,describe:`List Priority Intelligence Requirements`,builder:$i,handler:async r=>c({command:`cloudforce-one requests priority list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests priority list`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/priority`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({page:r.page,per_page:r[`per-page`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.requests.priority.list({...e,account_id:l})),{successLabel:`Created`});return}if(r.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(r[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:r.page,per_page:r[`per-page`]});a(await s(`Creating`,async()=>c.cloudforceOne.requests.priority.list({...d,account_id:l})),{successLabel:`Created`})})};function ta(e){return e.usage(`$0 cloudforce-one requests priority quota
251
+
252
+ Retrieves quota usage for Cloudforce One priority requests.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const na={command:`quota`,describe:`Get Priority Intelligence Requirement Quota`,builder:ta,handler:async r=>c({command:`cloudforce-one requests priority quota`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests priority quota`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/priority/quota`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.priority.quota({account_id:l})),{successLabel:`Loaded`})})};function ra(e){return e.usage(`$0 cloudforce-one requests priority update <priority-id>
253
+
254
+ Updates a priority intelligence request in Cloudforce One.`).positional(`priority-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`labels`,{type:`string`,array:!0,description:`List of labels.`}).option(`priority`,{type:`number`,description:`Priority.`}).option(`requirement`,{type:`string`,description:`Requirement.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ia={command:`update <priority-id>`,describe:`Update a Priority Intelligence Requirement`,builder:ra,handler:async r=>c({command:`cloudforce-one requests priority update`,classification:{safeFlags:[`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests priority update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/priority/${r[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(r[`priority-id`]))}`,pathParams:{"priority-id":String(r[`priority-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.requests.priority.update({body:e,account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Updated`});return}if(r.labels===void 0)throw Error(`--labels is required (or pass --body with this field set).`);if(r.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);r.requirement===void 0&&(r.requirement=await h(`requirement`,`Requirement.`)),r.tlp===void 0&&(r.tlp=await g(`tlp`,`The CISA defined Traffic Light Protocol (TLP).`,[`clear`,`amber`,`amber-strict`,`green`,`red`]));let d=f({labels:r.labels,priority:r.priority,requirement:p(r.requirement,`requirement`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.requests.priority.update({body:d,account_id:l,priority_id:r[`priority-id`]})),{successLabel:`Updated`})})},aa={command:`priority`,describe:`Operations for requests.priority`,builder:e=>e.command(Ji).command(Xi).command(Qi).command(ea).command(na).command(ia).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oa(e){return e.usage(`$0 cloudforce-one requests putRequestUpdate <request-id>
255
+
256
+ Updates an existing RFI with the provided fields. Only provided fields will be updated.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use a distinct `low` level; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).option(`request-type`,{type:`string`,description:`Request type. May only be changed while the request is still open; changing it recalculates the request's token cost.`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`summary`,{type:`string`,description:`RFI summary`}).option(`title`,{type:`string`,description:`RFI title (alias for summary field)`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const sa={command:`putRequestUpdate <request-id>`,describe:`Update an RFI`,builder:v(oa),handler:async r=>c({command:`cloudforce-one requests putRequestUpdate`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests putRequestUpdate`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/${r[`request-id`]==null?`<request-id>`:encodeURIComponent(String(r[`request-id`]))}`,pathParams:{"project-type":String(r[`project-type`]??``),"request-id":String(r[`request-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),eventId:p(r[`event-id`],`event-id`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),subtypeId:p(r[`subtype-id`],`subtype-id`,`text`),summary:p(r.summary,`summary`,`text`),title:p(r.title,`title`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.requests.putRequestUpdate({...e,account_id:l,project_type:r[`project-type`],request_id:r[`request-id`]})),{successLabel:`Updated`});return}let d=f({description:p(r.description,`description`,`text`),eventId:p(r[`event-id`],`event-id`,`text`),priority:p(r.priority,`priority`,`text`),request_type:p(r[`request-type`],`request-type`,`text`),subtypeId:p(r[`subtype-id`],`subtype-id`,`text`),summary:p(r.summary,`summary`,`text`),title:p(r.title,`title`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.requests.putRequestUpdate({...d,account_id:l,project_type:r[`project-type`],request_id:r[`request-id`]})),{successLabel:`Updated`})})};function ca(e){return e.usage(`$0 cloudforce-one requests quota
257
+
258
+ Retrieves quota usage for Cloudforce One standard requests.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const la={command:`quota`,describe:`Get Request Quota`,builder:ca,handler:async r=>c({command:`cloudforce-one requests quota`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests quota`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/quota`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.quota({account_id:l})),{successLabel:`Loaded`})})};function ua(e){return e.usage(`$0 cloudforce-one requests types
259
+
260
+ Lists available request types for Cloudforce One intelligence requests.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const da={command:`types`,describe:`Get Request Types`,builder:ua,handler:async r=>c({command:`cloudforce-one requests types`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests types`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/requests/types`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.types({account_id:l})),{successLabel:`Loaded`})})};function fa(e){return e.usage(`$0 cloudforce-one requests user get <project-type>
261
+
262
+ Get the current user's profile in a specific RFI project.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pa={command:`get <project-type>`,describe:`Get current user profile`,builder:fa,handler:async r=>c({command:`cloudforce-one requests user get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one requests user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/requests/${r[`project-type`]==null?`<project-type>`:encodeURIComponent(String(r[`project-type`]))}/user/me`,pathParams:{"project-type":String(r[`project-type`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.requests.user.get({account_id:l,project_type:r[`project-type`]})),{successLabel:`Loaded`})})},ma={command:`user`,describe:`Operations for requests.user`,builder:e=>e.command(pa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ha={command:`requests`,describe:`Additional request operations — priority listing and asset creation`,builder:e=>e.command(si).command(li).command(di).command(pi).command(hi).command(_i).command(yi).command(xi).command(qi).command(sa).command(la).command(da).command(Wr).command(ai).command(wi).command(Ni).command(Hi).command(Gi).command(aa).command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ga(e){return e.usage(`$0 cloudforce-one rules approvals cancel <id>
263
+
264
+ Cancel a pending rule approval. Only its original requester may cancel it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _a={command:`cancel <id>`,describe:`Cancel a pending approval`,builder:ga,handler:async r=>c({command:`cloudforce-one rules approvals cancel`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules approvals cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/approvals/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/cancel`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.rules.approvals.cancel({account_id:l,id:r.id})),{successLabel:`Created`})})};function va(e){return e.usage(`$0 cloudforce-one rules approvals get <id>
265
+
266
+ Get a single rule approval with current rule data.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ya={command:`get <id>`,describe:`Get rule approval details`,builder:va,handler:async r=>c({command:`cloudforce-one rules approvals get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules approvals get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/approvals/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.approvals.get({account_id:l,id:r.id})),{successLabel:`Loaded`})})};function ba(e){return e.usage(`$0 cloudforce-one rules approvals list
267
+
268
+ Returns rule approvals with optional status, revision, reviewer-scope, and mutation-type filtering.`).option(`status`,{type:`string`,description:`Selects approval statuses. Repeat the parameter to OR-match statuses (for example, status=pending&status=rejected). Use status=all alone to disable status filtering.`,choices:[`pending`,`approved`,`rejected`,`cancelled`,`all`]}).option(`latest-only`,{type:`string`,description:`When true, returns the newest revision in each approval chain.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`reviewer-scope`,{type:`string`,description:`Limits approvals to the specified reviewer scope.`,choices:[`default`,`email`,`unresolved`]}).option(`change-type`,{type:`string`,description:`Limits approvals to the specified mutation type.`,choices:[`create`,`update`,`delete`]}).option(`rule-id`,{type:`string`,description:`Filter approvals by rule ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xa={command:`list`,describe:`List rule approvals`,builder:v(ba),handler:async r=>c({command:`cloudforce-one rules approvals list`,classification:{safeFlags:[`status`,`latest-only`,`reviewer-scope`,`change-type`,`dry-run`]}},r,async()=>{let c={status:r.status,latest_only:r[`latest-only`],limit:r.limit,offset:r.offset,reviewer_scope:r[`reviewer-scope`],change_type:r[`change-type`],rule_id:r[`rule-id`]};if(r.dryRun){o({command:`cf cloudforce-one rules approvals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/approvals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.rules.approvals.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Sa(e){return e.usage(`$0 cloudforce-one rules approvals resubmit <id>
269
+
270
+ Create a new pending revision from a rejected rule approval. Only the original requester may resubmit the latest revision.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`The commit_message field`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ca={command:`resubmit <id>`,describe:`Revise and resubmit a rejected approval`,builder:Sa,handler:async r=>c({command:`cloudforce-one rules approvals resubmit`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/approvals/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/resubmit`,pathParams:{id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({commit_message:p(r[`commit-message`],`commit-message`,`text`),content:p(r.content,`content`,`text`),description:p(r.description,`description`,`text`),enabled:r.enabled,name:p(r.name,`name`,`text`),namespaces:r.namespaces}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.approvals.resubmit({...e,account_id:l,id:r.id})),{successLabel:`Created`});return}let d=f({commit_message:p(r[`commit-message`],`commit-message`,`text`),content:p(r.content,`content`,`text`),description:p(r.description,`description`,`text`),enabled:r.enabled,name:p(r.name,`name`,`text`),namespaces:r.namespaces});a(await s(`Creating`,async()=>c.cloudforceOne.rules.approvals.resubmit({...d,account_id:l,id:r.id})),{successLabel:`Created`})})},wa={command:`approvals`,describe:`Operations for rules.approvals`,builder:e=>e.command(_a).command(ya).command(xa).command(Ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ta(e){return e.usage(`$0 cloudforce-one rules create
271
+
272
+ Create a new detection rule.`).option(`actions`,{type:`string`,description:`The actions field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`,default:!0}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`,default:!1}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`Optional WfP deployment tags (customer rules only). Internal rules leave empty.`}).option(`path`,{type:`string`,description:`The path field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ea={command:`create`,describe:`Create a rule`,builder:Ta,handler:async r=>c({command:`cloudforce-one rules create`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({actions:d(r.actions,`actions`),commit_message:p(r[`commit-message`],`commit-message`,`text`),content:p(r.content,`content`,`text`),description:p(r.description,`description`,`text`),enabled:r.enabled,is_public:r[`is-public`],meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),namespaces:r.namespaces,path:p(r.path,`path`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.create({...e,account_id:l})),{successLabel:`Created`});return}r.content===void 0&&(r.content=await h(`content`,`The content field`)),r.name===void 0&&(r.name=await h(`name`,`The name field`)),r.path===void 0&&(r.path=await h(`path`,`The path field`));let m=f({actions:d(r.actions,`actions`),commit_message:p(r[`commit-message`],`commit-message`,`text`),content:p(r.content,`content`,`text`),description:p(r.description,`description`,`text`),enabled:r.enabled,is_public:r[`is-public`],meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),namespaces:r.namespaces,path:p(r.path,`path`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.rules.create({...m,account_id:l})),{successLabel:`Created`})})};function Da(e){return e.usage(`$0 cloudforce-one rules delete <id>
273
+
274
+ Delete an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for the deletion. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oa={command:`delete <id>`,describe:`Delete a rule`,builder:Da,handler:async r=>c({command:`cloudforce-one rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({commit_message:p(r[`commit-message`],`commit-message`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
275
+ `);return}if(r.body){let e=u(r.body);a(await s(`Deleting`,async()=>c.cloudforceOne.rules.delete({...e,account_id:l,id:r.id})),{successLabel:`Deleted`});return}let d=f({commit_message:p(r[`commit-message`],`commit-message`,`text`)});a(await s(`Deleting`,async()=>c.cloudforceOne.rules.delete({...d,account_id:l,id:r.id})),{successLabel:`Deleted`})})};function ka(e){return e.usage(`$0 cloudforce-one rules deleteAll
276
+
277
+ Delete all rules in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Aa={command:`deleteAll`,describe:`Delete all rules`,builder:ka,handler:async r=>c({command:`cloudforce-one rules deleteAll`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules deleteAll`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
278
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.rules.deleteAll({account_id:l})),{successLabel:`Deleted`})})};function ja(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
279
+
280
+ Validates and compiles a complete structured email rule, then creates an immutable pending revision of its rejected approval.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ma={command:`resubmit <id>`,describe:`Revise and resubmit a rejected structured email rule approval`,builder:v(ja),handler:async r=>c({command:`cloudforce-one rules email approvals resubmit`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},r,async()=>{let c={module:r.module};if(r.dryRun){o({command:`cf cloudforce-one rules email approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/approvals/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/resubmit`,pathParams:{id:String(r.id??``)},query:c,bodyKind:`json`,body:r.body===void 0?f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)}):u(r.body)});return}let l=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.cloudforceOne.rules.email.approvals.resubmit({...e,account_id:m,id:r.id,...c})),{successLabel:`Created`});return}r[`condition-operator`]===void 0&&(r[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),r[`condition-type`]===void 0&&(r[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),r.name===void 0&&(r.name=await h(`name`,`The name field`));let _=f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.cloudforceOne.rules.email.approvals.resubmit({..._,account_id:m,id:r.id,...c})),{successLabel:`Created`})})},Na={command:`approvals`,describe:`Operations for rules.email.approvals`,builder:e=>e.command(Ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pa(e){return e.usage(`$0 cloudforce-one rules email create
281
+
282
+ Create a structured email rule.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fa={command:`create`,describe:`Create an email rule`,builder:Pa,handler:async r=>c({command:`cloudforce-one rules email create`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.email.create({...e,account_id:l})),{successLabel:`Created`});return}r[`condition-operator`]===void 0&&(r[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),r[`condition-type`]===void 0&&(r[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),r.name===void 0&&(r.name=await h(`name`,`The name field`));let m=f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)});a(await s(`Creating`,async()=>c.cloudforceOne.rules.email.create({...m,account_id:l})),{successLabel:`Created`})})};function Ia(e){return e.usage(`$0 cloudforce-one rules email delete <id>
283
+
284
+ Delete an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const La={command:`delete <id>`,describe:`Delete an email rule`,builder:Ia,handler:async r=>c({command:`cloudforce-one rules email delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
285
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.rules.email.delete({account_id:l,id:r.id})),{successLabel:`Deleted`})})};function Ra(e){return e.usage(`$0 cloudforce-one rules email get <id>
286
+
287
+ Get a structured email rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const za={command:`get <id>`,describe:`Get an email rule`,builder:Ra,handler:async r=>c({command:`cloudforce-one rules email get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.email.get({account_id:l,id:r.id})),{successLabel:`Loaded`})})};function Ba(e){return e.usage(`$0 cloudforce-one rules email list
288
+
289
+ Returns structured email rules.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Va={command:`list`,describe:`List email rules`,builder:Ba,handler:async r=>c({command:`cloudforce-one rules email list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,offset:r.offset,search:r.search};if(r.dryRun){o({command:`cf cloudforce-one rules email list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.rules.email.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Ha(e){return e.usage(`$0 cloudforce-one rules email schema get
290
+
291
+ Get the field catalog for structured email rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ua={command:`get`,describe:`Get email rule schema`,builder:Ha,handler:async r=>c({command:`cloudforce-one rules email schema get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email schema get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/schema`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.email.schema.get({account_id:l})),{successLabel:`Loaded`})})},Wa={command:`schema`,describe:`Operations for rules.email.schema`,builder:e=>e.command(Ua).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ga(e){return e.usage(`$0 cloudforce-one rules email test <id>
292
+
293
+ Test a structured email rule against sample email JSON.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`sample-json`,{type:`string`,description:`The sample_json field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ka={command:`test <id>`,describe:`Test an email rule`,builder:Ga,handler:async r=>c({command:`cloudforce-one rules email test`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/test`,pathParams:{id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({sample_json:p(r[`sample-json`],`sample-json`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.email.test({...e,account_id:l,id:r.id})),{successLabel:`Created`});return}r[`sample-json`]===void 0&&(r[`sample-json`]=await h(`sample-json`,`The sample_json field`));let d=f({sample_json:p(r[`sample-json`],`sample-json`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.rules.email.test({...d,account_id:l,id:r.id})),{successLabel:`Created`})})};function qa(e){return e.usage(`$0 cloudforce-one rules email update <id>
294
+
295
+ Updates an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`condition-operator`,`condition-type`].some(t=>e[t]!==void 0)){let t=[`condition-operator`,`condition-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --condition-* flag is set`)}return!0})}const Ja={command:`update <id>`,describe:`Update an email rule`,builder:qa,handler:async r=>c({command:`cloudforce-one rules email update`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.rules.email.update({...e,account_id:l,id:r.id})),{successLabel:`Updated`});return}let m=f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)});a(await s(`Updating`,async()=>c.cloudforceOne.rules.email.update({...m,account_id:l,id:r.id})),{successLabel:`Updated`})})};function Ya(e){return e.usage(`$0 cloudforce-one rules email updatePendingApproval <id>
296
+
297
+ Validate, compile, and replace the proposed structured email rule on a pending approval. Only the original requester may update it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xa={command:`updatePendingApproval <id>`,describe:`Update a pending structured email rule approval`,builder:v(Ya),handler:async r=>c({command:`cloudforce-one rules email updatePendingApproval`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},r,async()=>{let c={module:r.module};if(r.dryRun){o({command:`cf cloudforce-one rules email updatePendingApproval`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/approvals/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},query:c,bodyKind:`json`,body:r.body===void 0?f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)}):u(r.body)});return}let l=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>l.cloudforceOne.rules.email.updatePendingApproval({...e,account_id:m,id:r.id,...c})),{successLabel:`Updated`});return}r[`condition-operator`]===void 0&&(r[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),r[`condition-type`]===void 0&&(r[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),r.name===void 0&&(r.name=await h(`name`,`The name field`));let _=f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>l.cloudforceOne.rules.email.updatePendingApproval({..._,account_id:m,id:r.id,...c})),{successLabel:`Updated`})})};function Za(e){return e.usage(`$0 cloudforce-one rules email validate
298
+
299
+ Validates structured email rule syntax and metadata.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`existing-rule-id`,{type:`string`,description:`Existing rule ID to exclude from duplicate-name checks when validating an update.`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Qa={command:`validate`,describe:`Validate an email rule`,builder:Za,handler:async r=>c({command:`cloudforce-one rules email validate`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules email validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/structured/validate`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,existing_rule_id:p(r[`existing-rule-id`],`existing-rule-id`,`text`),meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.email.validate({...e,account_id:l})),{successLabel:`Created`});return}r[`condition-operator`]===void 0&&(r[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),r[`condition-type`]===void 0&&(r[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),r.name===void 0&&(r.name=await h(`name`,`The name field`));let m=f({condition:{operator:p(r[`condition-operator`],`condition-operator`,`text`),type:p(r[`condition-type`],`condition-type`,`text`)},description:p(r.description,`description`,`text`),enabled:r.enabled,existing_rule_id:p(r[`existing-rule-id`],`existing-rule-id`,`text`),meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),status:p(r.status,`status`,`text`),strings:d(r.strings,`strings`)});a(await s(`Creating`,async()=>c.cloudforceOne.rules.email.validate({...m,account_id:l})),{successLabel:`Created`})})},$a={command:`email`,describe:`Operations for rules.email`,builder:e=>e.command(Fa).command(La).command(za).command(Va).command(Ka).command(Ja).command(Xa).command(Qa).command(Na).command(Wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function eo(e){return e.usage(`$0 cloudforce-one rules exemptions create
300
+
301
+ Add regex patterns to per-account exemption rules (union semantics). Missing keys leave that type untouched; duplicates are silently deduped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const to={command:`create`,describe:`Add patterns to exemption rules`,builder:eo,handler:async r=>c({command:`cloudforce-one rules exemptions create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules exemptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({namespace:r.namespace,tag_match:r[`tag-match`],worker_name:r[`worker-name`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.exemptions.create({body:e,account_id:l})),{successLabel:`Created`});return}let d=f({namespace:r.namespace,tag_match:r[`tag-match`],worker_name:r[`worker-name`]});a(await s(`Creating`,async()=>c.cloudforceOne.rules.exemptions.create({body:d,account_id:l})),{successLabel:`Created`})})};function no(e){return e.usage(`$0 cloudforce-one rules exemptions delete
302
+
303
+ Remove regex patterns from per-account exemption rules. Missing keys leave that type untouched; non-existent patterns are silently skipped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ro={command:`delete`,describe:`Remove patterns from exemption rules`,builder:no,handler:async r=>c({command:`cloudforce-one rules exemptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules exemptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({namespace:r.namespace,tag_match:r[`tag-match`],worker_name:r[`worker-name`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
304
+ `);return}if(r.body){let e=u(r.body);a(await s(`Deleting`,async()=>c.cloudforceOne.rules.exemptions.delete({body:e,account_id:l})),{successLabel:`Deleted`});return}let d=f({namespace:r.namespace,tag_match:r[`tag-match`],worker_name:r[`worker-name`]});a(await s(`Deleting`,async()=>c.cloudforceOne.rules.exemptions.delete({body:d,account_id:l})),{successLabel:`Deleted`})})};function io(e){return e.usage(`$0 cloudforce-one rules exemptions get
305
+
306
+ Get all exemption rule patterns for the account, grouped by type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ao={command:`get`,describe:`Get exemption rules for an account`,builder:io,handler:async r=>c({command:`cloudforce-one rules exemptions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules exemptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.exemptions.get({account_id:l})),{successLabel:`Loaded`})})};function oo(e){return e.usage(`$0 cloudforce-one rules exemptions update
307
+
308
+ Replace existing exemption patterns with new values. Each key maps to an array of {old_pattern, new_pattern} entries. Missing keys leave that type untouched. Fails if any old pattern is not found or any new pattern already exists.`).option(`namespace`,{type:`string`,description:`The namespace field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tag-match`,{type:`string`,description:`The tag_match field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`worker-name`,{type:`string`,description:`The worker_name field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const so={command:`update`,describe:`Update exemption rule patterns`,builder:oo,handler:async r=>c({command:`cloudforce-one rules exemptions update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules exemptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({namespace:d(r.namespace,`namespace`),tag_match:d(r[`tag-match`],`tag-match`),worker_name:d(r[`worker-name`],`worker-name`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.rules.exemptions.update({...e,account_id:l})),{successLabel:`Updated`});return}let p=f({namespace:d(r.namespace,`namespace`),tag_match:d(r[`tag-match`],`tag-match`),worker_name:d(r[`worker-name`],`worker-name`)});a(await s(`Updating`,async()=>c.cloudforceOne.rules.exemptions.update({...p,account_id:l})),{successLabel:`Updated`})})},co={command:`exemptions`,describe:`Operations for rules.exemptions`,builder:e=>e.command(to).command(ro).command(ao).command(so).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lo(e){return e.usage(`$0 cloudforce-one rules get <id>
309
+
310
+ Get a single rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uo={command:`get <id>`,describe:`Get a rule`,builder:lo,handler:async r=>c({command:`cloudforce-one rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.get({account_id:l,id:r.id})),{successLabel:`Loaded`})})};function fo(e){return e.usage(`$0 cloudforce-one rules list
311
+
312
+ Returns all rules for an account with optional filtering.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const po={command:`list`,describe:`List rules`,builder:v(fo),handler:async r=>c({command:`cloudforce-one rules list`,classification:{safeFlags:[`recursive`,`is-public`,`dry-run`]}},r,async()=>{let c={namespace:r.namespace,path:r.path,recursive:r.recursive,search:r.search,is_public:r[`is-public`],limit:r.limit,offset:r.offset};if(r.dryRun){o({command:`cf cloudforce-one rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.rules.list({account_id:u,...c})),{successLabel:`Loaded`})})};function mo(e){return e.usage(`$0 cloudforce-one rules managed get
313
+
314
+ Get DFP managed rule metadata (name and description) from YARA rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ho={command:`get`,describe:`Get managed rules`,builder:mo,handler:async r=>c({command:`cloudforce-one rules managed get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/managed`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.managed.get({account_id:l})),{successLabel:`Loaded`})})},go={command:`managed`,describe:`Operations for rules.managed`,builder:e=>e.command(ho).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _o(e){return e.usage(`$0 cloudforce-one rules search
315
+
316
+ Search rules using hybrid, vector, keyword, or exact retrieval, backed by AI Search with a SQL fallback.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`query`,{type:`string`,description:`Natural-language or keyword search query.`,demandOption:!0}).option(`search-mode`,{type:`string`,description:`Retrieval strategy used for the query.`,choices:[`exact`,`hybrid`,`vector`,`keyword`]}).option(`language`,{type:`string`,description:`Limits results to the specified rule language.`,choices:[`yara`,`js`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vo={command:`search`,describe:`Search rules`,builder:v(_o),handler:async r=>c({command:`cloudforce-one rules search`,classification:{safeFlags:[`recursive`,`is-public`,`search-mode`,`language`,`dry-run`]}},r,async()=>{let c={namespace:r.namespace,path:r.path,recursive:r.recursive,search:r.search,is_public:r[`is-public`],limit:r.limit,offset:r.offset,query:r.query,mode:r[`search-mode`],language:r.language};if(r.dryRun){o({command:`cf cloudforce-one rules search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/search`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.rules.search({account_id:u,...c})),{successLabel:`Loaded`})})};function yo(e){return e.usage(`$0 cloudforce-one rules stats get
317
+
318
+ Get statistics about rules for the dashboard.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bo={command:`get`,describe:`Get dashboard stats`,builder:yo,handler:async r=>c({command:`cloudforce-one rules stats get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules stats get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/stats`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.stats.get({account_id:l})),{successLabel:`Loaded`})})},xo={command:`stats`,describe:`Operations for rules.stats`,builder:e=>e.command(bo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function So(e){return e.usage(`$0 cloudforce-one rules tree get
319
+
320
+ Get the folder tree structure for rules navigation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Co={command:`get`,describe:`Get folder tree structure`,builder:So,handler:async r=>c({command:`cloudforce-one rules tree get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules tree get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/tree`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.rules.tree.get({account_id:l})),{successLabel:`Loaded`})})},wo={command:`tree`,describe:`Operations for rules.tree`,builder:e=>e.command(Co).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function To(e){return e.usage(`$0 cloudforce-one rules update <id>
321
+
322
+ Updates an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`Path change goes through approval workflow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Eo={command:`update <id>`,describe:`Update a rule`,builder:To,handler:async r=>c({command:`cloudforce-one rules update`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({commit_message:p(r[`commit-message`],`commit-message`,`text`),content:p(r.content,`content`,`text`),description:p(r.description,`description`,`text`),enabled:r.enabled,is_public:r[`is-public`],meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),namespaces:r.namespaces,path:p(r.path,`path`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.rules.update({...e,account_id:l,id:r.id})),{successLabel:`Updated`});return}let m=f({commit_message:p(r[`commit-message`],`commit-message`,`text`),content:p(r.content,`content`,`text`),description:p(r.description,`description`,`text`),enabled:r.enabled,is_public:r[`is-public`],meta:d(r.meta,`meta`),name:p(r.name,`name`,`text`),namespaces:r.namespaces,path:p(r.path,`path`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.rules.update({...m,account_id:l,id:r.id})),{successLabel:`Updated`})})};function Do(e){return e.usage(`$0 cloudforce-one rules validate
323
+
324
+ Validates rule syntax, name uniqueness, namespace, and metadata.`).option(`content`,{type:`string`,description:`The content field`}).option(`exclude-rule-id`,{type:`string`,description:`The excludeRuleId field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`The path field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oo={command:`validate`,describe:`Validate rule with context`,builder:Do,handler:async r=>c({command:`cloudforce-one rules validate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one rules validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/rules/validate`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({content:p(r.content,`content`,`text`),excludeRuleId:p(r[`exclude-rule-id`],`exclude-rule-id`,`text`),name:p(r.name,`name`,`text`),namespaces:r.namespaces,path:p(r.path,`path`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.rules.validate({...e,account_id:l})),{successLabel:`Created`});return}r.content===void 0&&(r.content=await h(`content`,`The content field`)),r.name===void 0&&(r.name=await h(`name`,`The name field`));let d=f({content:p(r.content,`content`,`text`),excludeRuleId:p(r[`exclude-rule-id`],`exclude-rule-id`,`text`),name:p(r.name,`name`,`text`),namespaces:r.namespaces,path:p(r.path,`path`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.rules.validate({...d,account_id:l})),{successLabel:`Created`})})},ko={command:`rules`,describe:`Rule management operations`,builder:e=>e.command(Ea).command(Oa).command(Aa).command(uo).command(po).command(vo).command(Eo).command(Oo).command(wa).command($a).command(co).command(go).command(xo).command(wo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ao(e){return e.usage(`$0 cloudforce-one scans config create
325
+
326
+ Creates a new scan configuration for Cloudforce One's network scanning service.`).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const jo={command:`create`,describe:`Create a new Scan Config`,builder:Ao,handler:async r=>c({command:`cloudforce-one scans config create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one scans config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({frequency:r.frequency,ips:r.ips,ports:r.ports}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.scans.config.create({...e,account_id:l})),{successLabel:`Created`});return}if(r.ips===void 0)throw Error(`--ips is required (or pass --body with this field set).`);let d=f({frequency:r.frequency,ips:r.ips,ports:r.ports});a(await s(`Creating`,async()=>c.cloudforceOne.scans.config.create({...d,account_id:l})),{successLabel:`Created`})})};function Mo(e){return e.usage(`$0 cloudforce-one scans config delete <config-id>
327
+
328
+ Deletes a scan configuration from Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const No={command:`delete <config-id>`,describe:`Delete a Scan Config`,builder:Mo,handler:async r=>c({command:`cloudforce-one scans config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one scans config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/scans/config/${r[`config-id`]==null?`<config-id>`:encodeURIComponent(String(r[`config-id`]))}`,pathParams:{"config-id":String(r[`config-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
329
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.scans.config.delete({account_id:l,config_id:r[`config-id`]})),{successLabel:`Deleted`})})};function Po(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
330
+
331
+ Updates an existing scan configuration in Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fo={command:`edit <config-id>`,describe:`Update an existing Scan Config`,builder:Po,handler:async r=>c({command:`cloudforce-one scans config edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one scans config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/scans/config/${r[`config-id`]==null?`<config-id>`:encodeURIComponent(String(r[`config-id`]))}`,pathParams:{"config-id":String(r[`config-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({frequency:r.frequency,ips:r.ips,ports:r.ports}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.scans.config.edit({...e,account_id:l,config_id:r[`config-id`]})),{successLabel:`Updated`});return}let d=f({frequency:r.frequency,ips:r.ips,ports:r.ports});a(await s(`Updating`,async()=>c.cloudforceOne.scans.config.edit({...d,account_id:l,config_id:r[`config-id`]})),{successLabel:`Updated`})})};function Io(e){return e.usage(`$0 cloudforce-one scans config list
332
+
333
+ Lists scan configurations for Cloudforce One's network scanning service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lo={command:`list`,describe:`List Scan Configs`,builder:Io,handler:async r=>c({command:`cloudforce-one scans config list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one scans config list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.scans.config.list({account_id:l})),{successLabel:`Loaded`})})},Ro={command:`config`,describe:`Operations for scans.config`,builder:e=>e.command(jo).command(No).command(Fo).command(Lo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zo(e){return e.usage(`$0 cloudforce-one scans results get <config-id>
334
+
335
+ Retrieves the latest scan results for a Cloudforce One scan configuration, including discovered open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bo={command:`get <config-id>`,describe:`Get the Latest Scan Result`,builder:zo,handler:async r=>c({command:`cloudforce-one scans results get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one scans results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/scans/results/${r[`config-id`]==null?`<config-id>`:encodeURIComponent(String(r[`config-id`]))}`,pathParams:{"config-id":String(r[`config-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.scans.results.get({account_id:l,config_id:r[`config-id`]})),{successLabel:`Loaded`})})};function Vo(e){return e.usage(`$0 cloudforce-one scans results getBanners <config-id>
336
+
337
+ Retrieves the latest banner grab results for a Cloudforce One scan configuration, including service banners from open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ho={command:`getBanners <config-id>`,describe:`Get the Latest Banner Grab Result`,builder:Vo,handler:async r=>c({command:`cloudforce-one scans results getBanners`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one scans results getBanners`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/banner/${r[`config-id`]==null?`<config-id>`:encodeURIComponent(String(r[`config-id`]))}`,pathParams:{"config-id":String(r[`config-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.scans.results.getBanners({account_id:l,config_id:r[`config-id`]})),{successLabel:`Loaded`})})},Uo={command:`results`,describe:`Operations for scans.results`,builder:e=>e.command(Bo).command(Ho).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wo={command:`scans`,describe:`Scan URLs, IPs, and domains for threat intelligence indicators`,builder:e=>e.command(Ro).command(Uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Go(e){return e.usage(`$0 cloudforce-one threat-events attackers list
338
+
339
+ Lists known threat attackers tracked in Cloudforce One threat intelligence.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query attackers from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ko={command:`list`,describe:`Lists attackers across multiple datasets`,builder:Go,handler:async r=>c({command:`cloudforce-one threat-events attackers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasetIds:r[`dataset-ids`]};if(r.dryRun){o({command:`cf cloudforce-one threat-events attackers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/attackers`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.attackers.list({account_id:u,...c})),{successLabel:`Loaded`})})},qo={command:`attackers`,describe:`Operations for threat-events.attackers`,builder:e=>e.command(Ko).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jo(e){return e.usage("$0 cloudforce-one threat-events bulk-create\n\nThe `datasetId` parameter must be defined. To list existing datasets (and their IDs) in your account, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint.").option(`data`,{type:`string`,description:`The data field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dataset-id`,{type:`string`,description:`The datasetId field`}).option(`include-created-events`,{type:`boolean`,description:`When true, response includes array of created event UUIDs and shard IDs. Useful for tracking which events were created and where.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Yo={command:`bulk-create`,describe:`Creates bulk events`,builder:Jo,handler:async r=>c({command:`cloudforce-one threat-events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/create/bulk`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({data:d(r.data,`data`),datasetId:p(r[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:r[`include-created-events`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.bulkCreate({...e,account_id:l})),{successLabel:`Created`});return}if(r.data===void 0)throw Error(`--data is required (or pass --body with this field set).`);r[`dataset-id`]===void 0&&(r[`dataset-id`]=await h(`dataset-id`,`The datasetId field`));let m=f({data:d(r.data,`data`),datasetId:p(r[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:r[`include-created-events`]});a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.bulkCreate({...m,account_id:l})),{successLabel:`Created`})})};function Xo(e){return e.usage(`$0 cloudforce-one threat-events categories create
340
+
341
+ Creates a new threat event category in Cloudforce One for organizing and classifying threat events.`).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Zo={command:`create`,describe:`Creates a new category`,builder:Xo,handler:async r=>c({command:`cloudforce-one threat-events categories create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/categories/create`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({killChain:r[`kill-chain`],mitreAttack:r[`mitre-attack`],mitreCapec:r[`mitre-capec`],name:p(r.name,`name`,`text`),shortname:p(r.shortname,`shortname`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.categories.create({...e,account_id:l})),{successLabel:`Created`});return}if(r[`kill-chain`]===void 0)throw Error(`--kill-chain is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await h(`name`,`The name field`));let d=f({killChain:r[`kill-chain`],mitreAttack:r[`mitre-attack`],mitreCapec:r[`mitre-capec`],name:p(r.name,`name`,`text`),shortname:p(r.shortname,`shortname`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.categories.create({...d,account_id:l})),{successLabel:`Created`})})};function Qo(e){return e.usage(`$0 cloudforce-one threat-events categories delete <category-id>
342
+
343
+ Removes a threat event category from Cloudforce One.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $o={command:`delete <category-id>`,describe:`Deletes a category`,builder:Qo,handler:async r=>c({command:`cloudforce-one threat-events categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${r[`category-id`]==null?`<category-id>`:encodeURIComponent(String(r[`category-id`]))}`,pathParams:{"category-id":String(r[`category-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
344
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.categories.delete({account_id:l,category_id:r[`category-id`]})),{successLabel:`Deleted`})})};function es(e){return e.usage(`$0 cloudforce-one threat-events categories edit <category-id>
345
+
346
+ Partially updates a threat event category in Cloudforce One, modifying specific fields without replacing the entire category.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ts={command:`edit <category-id>`,describe:`Updates a category`,builder:es,handler:async r=>c({command:`cloudforce-one threat-events categories edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events categories edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${r[`category-id`]==null?`<category-id>`:encodeURIComponent(String(r[`category-id`]))}`,pathParams:{"category-id":String(r[`category-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({killChain:r[`kill-chain`],mitreAttack:r[`mitre-attack`],mitreCapec:r[`mitre-capec`],name:p(r.name,`name`,`text`),shortname:p(r.shortname,`shortname`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.categories.edit({...e,account_id:l,category_id:r[`category-id`]})),{successLabel:`Updated`});return}let d=f({killChain:r[`kill-chain`],mitreAttack:r[`mitre-attack`],mitreCapec:r[`mitre-capec`],name:p(r.name,`name`,`text`),shortname:p(r.shortname,`shortname`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.categories.edit({...d,account_id:l,category_id:r[`category-id`]})),{successLabel:`Updated`})})};function ns(e){return e.usage(`$0 cloudforce-one threat-events categories get <category-id>
347
+
348
+ Retrieves details for a specific threat event category.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rs={command:`get <category-id>`,describe:`Reads a category`,builder:ns,handler:async r=>c({command:`cloudforce-one threat-events categories get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${r[`category-id`]==null?`<category-id>`:encodeURIComponent(String(r[`category-id`]))}`,pathParams:{"category-id":String(r[`category-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.categories.get({account_id:l,category_id:r[`category-id`]})),{successLabel:`Loaded`})})};function is(e){return e.usage(`$0 cloudforce-one threat-events categories list
349
+
350
+ Lists all threat event categories configured for classifying and organizing threat events.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query categories from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const as={command:`list`,describe:`Lists categories across multiple datasets`,builder:is,handler:async r=>c({command:`cloudforce-one threat-events categories list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasetIds:r[`dataset-ids`]};if(r.dryRun){o({command:`cf cloudforce-one threat-events categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/categories`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.categories.list({account_id:u,...c})),{successLabel:`Loaded`})})},os={command:`categories`,describe:`Operations for threat-events.categories`,builder:e=>e.command(Zo).command($o).command(ts).command(rs).command(as).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ss(e){return e.usage(`$0 cloudforce-one threat-events countries list
351
+
352
+ Lists countries referenced in Cloudforce One threat intelligence data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cs={command:`list`,describe:`Retrieves countries information for all countries`,builder:ss,handler:async r=>c({command:`cloudforce-one threat-events countries list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events countries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/countries`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.countries.list({account_id:l})),{successLabel:`Loaded`})})},ls={command:`countries`,describe:`Operations for threat-events.countries`,builder:e=>e.command(cs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function us(e){return e.usage("$0 cloudforce-one threat-events create <account-id-path>\n\nTo create a dataset, see the [`Create Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/) endpoint. When `datasetId` parameter is unspecified, it will be created in a default dataset named `Cloudforce One Threat Events`.").positional(`account-id-path`,{type:`string`,description:`Account ID.`,demandOption:!0}).option(`account-id-body`,{type:`number`,description:`The accountId field`}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`dataset-id`,{type:`string`,description:`The datasetId field`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`indicators`,{type:`string`,description:`Array of indicators for this event. Supports multiple indicators per event for complex scenarios. Provide as a JSON array of objects or @path/to/file.json.`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`source-resource-id`,{type:`string`,description:`The source.resourceId field`}).option(`source-resource-type`,{type:`string`,description:`The source.resourceType field`,choices:[`article`]}).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).option(`source-title`,{type:`string`,description:`Threat Signals article title; null for historical provenance without a stored title.`}).option(`tags`,{type:`string`,array:!0,description:`The tags field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`source-resource-id`,`source-resource-type`,`source-system`,`source-title`].some(t=>e[t]!==void 0)){let t=[`source-resource-id`,`source-resource-type`,`source-system`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const ds={command:`create <account-id-path>`,describe:`Creates a new event`,builder:us,handler:async e=>c({command:`cloudforce-one threat-events create`,classification:{safeFlags:[`source-resource-type`,`source-system`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf cloudforce-one threat-events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/cloudforce-one/events/create`,pathParams:{"account-id-path":String(e[`account-id-path`]??``)},bodyKind:`json`,body:e.body===void 0?f({accountId:e[`account-id-body`],attacker:p(e.attacker,`attacker`,`text`),attackerCountry:p(e[`attacker-country`],`attacker-country`,`text`),category:p(e.category,`category`,`text`),datasetId:p(e[`dataset-id`],`dataset-id`,`text`),date:p(e.date,`date`,`text`),event:p(e.event,`event`,`text`),indicator:p(e.indicator,`indicator`,`text`),indicatorType:p(e[`indicator-type`],`indicator-type`,`text`),indicators:d(e.indicators,`indicators`),insight:p(e.insight,`insight`,`text`),raw:{source:p(e[`raw-source`],`raw-source`,`text`),tlp:p(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:p(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:p(e[`source-resource-type`],`source-resource-type`,`text`),system:p(e[`source-system`],`source-system`,`text`),title:p(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:p(e[`target-country`],`target-country`,`text`),targetIndustry:p(e[`target-industry`],`target-industry`,`text`),tlp:p(e.tlp,`tlp`,`text`)}):u(e.body)});return}let t=await i(e);if(e.body){let n=u(e.body);a(await s(`Creating`,async()=>t.cloudforceOne.threatEvents.create({...n,account_id_path:e[`account-id-path`]})),{successLabel:`Created`});return}e.category===void 0&&(e.category=await h(`category`,`The category field`)),e.date===void 0&&(e.date=await h(`date`,`The date field`)),e.event===void 0&&(e.event=await h(`event`,`The event field`)),e.tlp===void 0&&(e.tlp=await h(`tlp`,`The tlp field`));let n=f({accountId:e[`account-id-body`],attacker:p(e.attacker,`attacker`,`text`),attackerCountry:p(e[`attacker-country`],`attacker-country`,`text`),category:p(e.category,`category`,`text`),datasetId:p(e[`dataset-id`],`dataset-id`,`text`),date:p(e.date,`date`,`text`),event:p(e.event,`event`,`text`),indicator:p(e.indicator,`indicator`,`text`),indicatorType:p(e[`indicator-type`],`indicator-type`,`text`),indicators:d(e.indicators,`indicators`),insight:p(e.insight,`insight`,`text`),raw:{source:p(e[`raw-source`],`raw-source`,`text`),tlp:p(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:p(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:p(e[`source-resource-type`],`source-resource-type`,`text`),system:p(e[`source-system`],`source-system`,`text`),title:p(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:p(e[`target-country`],`target-country`,`text`),targetIndustry:p(e[`target-industry`],`target-industry`,`text`),tlp:p(e.tlp,`tlp`,`text`)});a(await s(`Creating`,async()=>t.cloudforceOne.threatEvents.create({...n,account_id_path:e[`account-id-path`]})),{successLabel:`Created`})})};function fs(e){return e.usage(`$0 cloudforce-one threat-events datasets create
353
+
354
+ Creates a new threat event dataset in Cloudforce One for organizing related threat events.`).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ps={command:`create`,describe:`Creates a dataset`,builder:fs,handler:async r=>c({command:`cloudforce-one threat-events datasets create`,classification:{safeFlags:[`is-public`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/create`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({isPublic:r[`is-public`],name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.datasets.create({...e,account_id:l})),{successLabel:`Created`});return}if(r[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await h(`name`,`Used to describe the dataset within the account context.`));let d=f({isPublic:r[`is-public`],name:p(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.datasets.create({...d,account_id:l})),{successLabel:`Created`})})};function ms(e){return e.usage(`$0 cloudforce-one threat-events datasets edit <dataset-id>
355
+
356
+ Partially updates a threat event dataset in Cloudforce One, modifying specific fields without replacing the entire dataset configuration.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const hs={command:`edit <dataset-id>`,describe:`Updates an existing dataset`,builder:ms,handler:async r=>c({command:`cloudforce-one threat-events datasets edit`,classification:{safeFlags:[`is-public`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events datasets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({isPublic:r[`is-public`],name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.datasets.edit({...e,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Updated`});return}if(r[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await h(`name`,`Used to describe the dataset within the account context.`));let d=f({isPublic:r[`is-public`],name:p(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.datasets.edit({...d,account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Updated`})})};function gs(e){return e.usage(`$0 cloudforce-one threat-events datasets get <dataset-id>
357
+
358
+ Retrieves details for a specific threat event dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _s={command:`get <dataset-id>`,describe:`Reads a dataset`,builder:gs,handler:async r=>c({command:`cloudforce-one threat-events datasets get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.datasets.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})})};function vs(e){return e.usage(`$0 cloudforce-one threat-events datasets list
359
+
360
+ Lists all threat event datasets configured in Cloudforce One.`).option(`include-deleted`,{type:`boolean`,description:"When true, include soft-deleted datasets in the response. Each item includes a `deletedAt` field (ISO 8601 or null). Default: false."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ys={command:`list`,describe:`Lists all datasets in an account`,builder:vs,handler:async r=>c({command:`cloudforce-one threat-events datasets list`,classification:{safeFlags:[`include-deleted`,`dry-run`]}},r,async()=>{let c={includeDeleted:r[`include-deleted`]};if(r.dryRun){o({command:`cf cloudforce-one threat-events datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/dataset`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.datasets.list({account_id:u,...c})),{successLabel:`Loaded`})})};function bs(e){return e.usage(`$0 cloudforce-one threat-events datasets raw <event-id>
361
+
362
+ Retrieves the raw data associated with an event. Searches across all shards in the dataset.`).positional(`event-id`,{type:`string`,description:`Event ID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xs={command:`raw <event-id>`,describe:`Reads raw data for an event by UUID`,builder:bs,handler:async r=>c({command:`cloudforce-one threat-events datasets raw`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events datasets raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/raw`,pathParams:{"event-id":String(r[`event-id`]??``),"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.datasets.raw({account_id:l,dataset_id:r[`dataset-id`],event_id:r[`event-id`]})),{successLabel:`Loaded`})})},Ss={command:`datasets`,describe:`Operations for threat-events.datasets`,builder:e=>e.command(ps).command(hs).command(_s).command(ys).command(xs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cs(e){return e.usage(`$0 cloudforce-one threat-events edit <event-id>
363
+
364
+ Partially updates a threat event in Cloudforce One, modifying specific fields without replacing the entire event.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ws={command:`edit <event-id>`,describe:`Updates an event`,builder:Cs,handler:async r=>c({command:`cloudforce-one threat-events edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({attacker:p(r.attacker,`attacker`,`text`),attackerCountry:p(r[`attacker-country`],`attacker-country`,`text`),category:p(r.category,`category`,`text`),createdAt:p(r[`created-at`],`created-at`,`text`),datasetId:p(r[`dataset-id`],`dataset-id`,`text`),date:p(r.date,`date`,`text`),event:p(r.event,`event`,`text`),indicator:p(r.indicator,`indicator`,`text`),indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),insight:p(r.insight,`insight`,`text`),raw:{source:p(r[`raw-source`],`raw-source`,`text`),tlp:p(r[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:p(r[`target-country`],`target-country`,`text`),targetIndustry:p(r[`target-industry`],`target-industry`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.edit({...e,account_id:l,event_id:r[`event-id`]})),{successLabel:`Updated`});return}r[`dataset-id`]===void 0&&(r[`dataset-id`]=await h(`dataset-id`,`Dataset ID containing the event to update.`));let d=f({attacker:p(r.attacker,`attacker`,`text`),attackerCountry:p(r[`attacker-country`],`attacker-country`,`text`),category:p(r.category,`category`,`text`),createdAt:p(r[`created-at`],`created-at`,`text`),datasetId:p(r[`dataset-id`],`dataset-id`,`text`),date:p(r.date,`date`,`text`),event:p(r.event,`event`,`text`),indicator:p(r.indicator,`indicator`,`text`),indicatorType:p(r[`indicator-type`],`indicator-type`,`text`),insight:p(r.insight,`insight`,`text`),raw:{source:p(r[`raw-source`],`raw-source`,`text`),tlp:p(r[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:p(r[`target-country`],`target-country`,`text`),targetIndustry:p(r[`target-industry`],`target-industry`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.edit({...d,account_id:l,event_id:r[`event-id`]})),{successLabel:`Updated`})})};function Ts(e){return e.usage(`$0 cloudforce-one threat-events event-tags create <event-id>
365
+
366
+ Adds a tag to a threat event in Cloudforce One for classification and filtering.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`tags`,{type:`string`,array:!0,description:`The tags field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Es={command:`create <event-id>`,describe:`Adds a tag to an event`,builder:Ts,handler:async r=>c({command:`cloudforce-one threat-events event-tags create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events event-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/event_tag/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/create`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({tags:r.tags}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.eventTags.create({...e,account_id:l,event_id:r[`event-id`]})),{successLabel:`Created`});return}if(r.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=f({tags:r.tags});a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.eventTags.create({...d,account_id:l,event_id:r[`event-id`]})),{successLabel:`Created`})})};function Ds(e){return e.usage(`$0 cloudforce-one threat-events event-tags delete <event-id>
367
+
368
+ Removes a tag from a threat event in Cloudforce One.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`tags`,{type:`string`,array:!0,description:`The tags field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Os={command:`delete <event-id>`,describe:`Removes a tag from an event`,builder:Ds,handler:async r=>c({command:`cloudforce-one threat-events event-tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events event-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/event_tag/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({tags:r.tags}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
369
+ `);return}if(r.body){let e=u(r.body);a(await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.eventTags.delete({...e,account_id:l,event_id:r[`event-id`]})),{successLabel:`Deleted`});return}if(r.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=f({tags:r.tags});a(await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.eventTags.delete({...d,account_id:l,event_id:r[`event-id`]})),{successLabel:`Deleted`})})},ks={command:`event-tags`,describe:`Operations for threat-events.event-tags`,builder:e=>e.command(Es).command(Os).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function As(e){return e.usage(`$0 cloudforce-one threat-events get <event-id>
370
+
371
+ This Method is deprecated. Please use /events/dataset/:dataset_id/events/:event_id instead.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const js={command:`get <event-id>`,describe:`Reads an event`,builder:As,handler:async r=>c({command:`cloudforce-one threat-events get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.get({account_id:l,event_id:r[`event-id`]})),{successLabel:`Loaded`})})};function Ms(e){return e.usage(`$0 cloudforce-one threat-events indicator-types list
372
+
373
+ This Method is deprecated. Please use /events/dataset/:dataset_id/indicatorTypes instead.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ns={command:`list`,describe:`Lists all indicator types`,builder:Ms,handler:async r=>c({command:`cloudforce-one threat-events indicator-types list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events indicator-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/indicatorTypes`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.indicatorTypes.list({account_id:l})),{successLabel:`Loaded`})})},Ps={command:`indicator-types`,describe:`Operations for threat-events.indicator-types`,builder:e=>e.command(Ns).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fs(e){return e.usage("$0 cloudforce-one threat-events list\n\nUse `datasetId=all` or `datasetId=*` for the legacy all-datasets scope, `datasetId=analytics` for datasets with `isAnalytics=true`, or `datasetId=operational` for datasets with `isAnalytics=false` (limited to 50). Scope values must be used alone. When `datasetId` is unspecified, events are listed from the default Cloudforce One Threat Events dataset. To list existing datasets, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint.").option(`cursor`,{type:`string`,description:`Cursor for pagination. When provided, filters are embedded in the cursor so you only need to pass cursor and pageSize. Returned in the previous response's result_info.cursor field. Use cursor-based pagination for deep pagination (beyond 100,000 records) or for optimal performance.`}).option(`search`,{type:`string`,description:`Search`}).option(`page`,{type:`number`,description:`Page number (1-indexed) for offset-based pagination. Limited to offset of 100,000 records. For deep pagination, use cursor-based pagination instead.`}).option(`page-size`,{type:`number`,description:`Number of results per page. Maximum 25,000.`}).option(`order-by`,{type:`string`,description:`OrderBy`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`dataset-id`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' for the legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, uses the default dataset.`}).option(`force-refresh`,{type:`boolean`,description:`ForceRefresh`}).option(`format`,{type:`string`,description:`Format`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Is={command:`list`,describe:`Filter and list events`,builder:v(Fs),handler:async r=>c({command:`cloudforce-one threat-events list`,classification:{safeFlags:[`order`,`force-refresh`,`format`,`cache`,`dry-run`]}},r,async()=>{let c={cursor:r.cursor,search:r.search,page:r.page,pageSize:r[`page-size`],orderBy:r[`order-by`],order:r.order,datasetId:r[`dataset-id`],forceRefresh:r[`force-refresh`],format:r.format,cache:r.cache};if(r.dryRun){o({command:`cf cloudforce-one threat-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Ls(e){return e.usage(`$0 cloudforce-one threat-events raw edit <raw-id>
374
+
375
+ Partially updates raw threat event data in Cloudforce One, modifying specific fields of the event.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Rs={command:`edit <raw-id>`,describe:`Updates a raw event`,builder:Ls,handler:async r=>c({command:`cloudforce-one threat-events raw edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events raw edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/raw/${r[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(r[`raw-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``),"raw-id":String(r[`raw-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({source:p(r.source,`source`,`text`),tlp:p(r.tlp,`tlp`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.raw.edit({...e,account_id:l,event_id:r[`event-id`],raw_id:r[`raw-id`]})),{successLabel:`Updated`});return}let d=f({source:p(r.source,`source`,`text`),tlp:p(r.tlp,`tlp`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatEvents.raw.edit({...d,account_id:l,event_id:r[`event-id`],raw_id:r[`raw-id`]})),{successLabel:`Updated`})})};function zs(e){return e.usage(`$0 cloudforce-one threat-events raw get <raw-id>
376
+
377
+ Retrieves raw threat event data for a specific event in Cloudforce One.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bs={command:`get <raw-id>`,describe:`Reads data for a raw event`,builder:zs,handler:async r=>c({command:`cloudforce-one threat-events raw get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}/raw/${r[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(r[`raw-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``),"raw-id":String(r[`raw-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatEvents.raw.get({account_id:l,event_id:r[`event-id`],raw_id:r[`raw-id`]})),{successLabel:`Loaded`})})},Vs={command:`raw`,describe:`Operations for threat-events.raw`,builder:e=>e.command(Rs).command(Bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hs(e){return e.usage(`$0 cloudforce-one threat-events relate delete <event-id>
378
+
379
+ Removes a reference link between related threat events in Cloudforce One.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`events`,{type:`string`,array:!0,description:`The events field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Us={command:`delete <event-id>`,describe:`Removes an event reference`,builder:Hs,handler:async r=>c({command:`cloudforce-one threat-events relate delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events relate delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/relate/${r[`event-id`]==null?`<event-id>`:encodeURIComponent(String(r[`event-id`]))}`,pathParams:{"event-id":String(r[`event-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({events:r.events}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
380
+ `);return}if(r.body){let e=u(r.body);a(await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.relate.delete({...e,account_id:l,event_id:r[`event-id`]})),{successLabel:`Deleted`});return}if(r.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=f({events:r.events});a(await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.relate.delete({...d,account_id:l,event_id:r[`event-id`]})),{successLabel:`Deleted`})})},Ws={command:`relate`,describe:`Operations for threat-events.relate`,builder:e=>e.command(Us).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gs(e){return e.usage('$0 cloudforce-one threat-events search\n\nUse `datasetId: ["all"]` or `datasetId: ["*"]` for the legacy all-datasets scope, `datasetId: ["analytics"]` for datasets with `isAnalytics=true`, or `datasetId: ["operational"]` for datasets with `isAnalytics=false` (limited to 50). Scope values must be used alone. When `datasetId` is unspecified, events are listed from the default Cloudforce One Threat Events dataset. To list existing datasets, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint.').option(`force-refresh`,{type:`boolean`,description:`ForceRefresh`}).option(`format`,{type:`string`,description:`Output format for event data. 'json' returns the default format, 'stix2' returns STIX 2.1 Sighting SROs with linked Indicator SDOs, Observed Data SDOs, and SCOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:`Cursor for pagination. When provided, filters are embedded in the cursor so you only need to pass cursor and pageSize.`}).option(`dataset-id`,{type:`string`,array:!0,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' for the legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, uses the default dataset.`}).option(`order`,{type:`string`,description:`The order field`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`The orderBy field`}).option(`page`,{type:`number`,description:`The page field`}).option(`page-size`,{type:`number`,description:`The pageSize field`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Use the 'in' operator with an array value to bulk-check up to 100 values. Multiple conditions are AND'd together. Max 10 conditions per request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ks={command:`search`,describe:`Filter and list events`,builder:v(Gs),handler:async r=>c({command:`cloudforce-one threat-events search`,classification:{safeFlags:[`force-refresh`,`format`,`cache`,`order`,`dry-run`]}},r,async()=>{let c={forceRefresh:r[`force-refresh`],format:r.format,cache:r.cache};if(r.dryRun){o({command:`cf cloudforce-one threat-events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:c,bodyKind:`json`,body:r.body===void 0?f({cursor:p(r.cursor,`cursor`,`text`),datasetId:r[`dataset-id`],order:p(r.order,`order`,`text`),orderBy:p(r[`order-by`],`order-by`,`text`),page:r.page,pageSize:r[`page-size`],search:d(r.search,`search`)}):u(r.body)});return}let l=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.search({...e,account_id:m,...c})),{successLabel:`Loaded`});return}let h=f({cursor:p(r.cursor,`cursor`,`text`),datasetId:r[`dataset-id`],order:p(r.order,`order`,`text`),orderBy:p(r[`order-by`],`order-by`,`text`),page:r.page,pageSize:r[`page-size`],search:d(r.search,`search`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.search({...h,account_id:m,...c})),{successLabel:`Loaded`})})};function qs(e){return e.usage(`$0 cloudforce-one threat-events tags create
381
+
382
+ Creates a new tag to be used accross threat events.`).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. Optional — when present, `properties` is validated against this category's schema. When absent, the tag is typeless and properties are accepted free-form."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Optional.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Optional.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Internal structured aliases ({ value, confidence 1-10, tlp }). CFONE-only: never returned to non-CFONE accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`tlp`,{type:`string`,description:`Tag-level TLP handling marking. Optional. Allowed values: red, amber, amber-strict, green, clear, purple, amber+strict.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Js={command:`create`,describe:`Creates a new tag`,builder:qs,handler:async r=>c({command:`cloudforce-one threat-events tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-events tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/tags/create`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({aliasGroupNames:r[`alias-group-names`],aliasGroupNamesInternal:r[`alias-group-names-internal`],aliases:d(r.aliases,`aliases`),categoryUuid:p(r[`category-uuid`],`category-uuid`,`text`),confidence:r.confidence,dateOfDiscovery:p(r[`date-of-discovery`],`date-of-discovery`,`text`),description:p(r.description,`description`,`text`),externalReferenceLinks:r[`external-reference-links`],externalReferences:d(r[`external-references`],`external-references`),internalAliases:d(r[`internal-aliases`],`internal-aliases`),internalDescription:p(r[`internal-description`],`internal-description`,`text`),lastSeen:p(r[`last-seen`],`last-seen`,`text`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.tags.create({...e,account_id:l})),{successLabel:`Created`});return}r.value===void 0&&(r.value=await h(`value`,`The value field`));let m=f({aliasGroupNames:r[`alias-group-names`],aliasGroupNamesInternal:r[`alias-group-names-internal`],aliases:d(r.aliases,`aliases`),categoryUuid:p(r[`category-uuid`],`category-uuid`,`text`),confidence:r.confidence,dateOfDiscovery:p(r[`date-of-discovery`],`date-of-discovery`,`text`),description:p(r.description,`description`,`text`),externalReferenceLinks:r[`external-reference-links`],externalReferences:d(r[`external-references`],`external-references`),internalAliases:d(r[`internal-aliases`],`internal-aliases`),internalDescription:p(r[`internal-description`],`internal-description`,`text`),lastSeen:p(r[`last-seen`],`last-seen`,`text`),tlp:p(r.tlp,`tlp`,`text`),value:p(r.value,`value`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatEvents.tags.create({...m,account_id:l})),{successLabel:`Created`})})},Ys={command:`tags`,describe:`Operations for threat-events.tags`,builder:e=>e.command(Js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xs(e){return e.usage(`$0 cloudforce-one threat-events target-industries list
383
+
384
+ Retrieves the catalog of industry classifications used in Cloudforce One threat intelligence.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query target industries from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zs={command:`list`,describe:`Lists target industries across multiple datasets`,builder:Xs,handler:async r=>c({command:`cloudforce-one threat-events target-industries list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={datasetIds:r[`dataset-ids`]};if(r.dryRun){o({command:`cf cloudforce-one threat-events target-industries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/events/targetIndustries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatEvents.targetIndustries.list({account_id:u,...c})),{successLabel:`Loaded`})})},Qs={command:`target-industries`,describe:`Operations for threat-events.target-industries`,builder:e=>e.command(Zs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$s={command:`threat-events`,describe:`Operations for threat-events`,builder:e=>e.command(Yo).command(ds).command(ws).command(js).command(Is).command(Ks).command(qo).command(os).command(ls).command(Ss).command(ks).command(Ps).command(Vs).command(Ws).command(Ys).command(Qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ec(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
385
+
386
+ Bulk update Threat Signals article read status.`).option(`article-ids`,{type:`string`,array:!0,description:`The article_ids field`}).option(`read`,{type:`boolean`,description:`The read field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tc={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:ec,handler:async r=>c({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles bulk-mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({article_ids:r[`article-ids`],read:r.read}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.bulkMarkRead({...e,account_id:l})),{successLabel:`Updated`});return}if(r[`article-ids`]===void 0)throw Error(`--article-ids is required (or pass --body with this field set).`);if(r.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let d=f({article_ids:r[`article-ids`],read:r.read});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.bulkMarkRead({...d,account_id:l})),{successLabel:`Updated`})})};function nc(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
387
+
388
+ Get Threat Signals article content.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`format`,{type:`string`,description:`Format`,choices:[`text`,`html`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rc={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:v(nc),handler:async r=>c({command:`cloudforce-one threat-signals articles get-content`,classification:{safeFlags:[`format`,`dry-run`]}},r,async()=>{let c={format:r.format};if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles get-content`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}/content`,pathParams:{"article-id":String(r[`article-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.articles.getContent({account_id:u,article_id:r[`article-id`],...c})),{successLabel:`Loaded`})})};function ic(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
389
+
390
+ Get Threat Signals article.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ac={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:ic,handler:async r=>c({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}`,pathParams:{"article-id":String(r[`article-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.articles.get({account_id:l,article_id:r[`article-id`]})),{successLabel:`Loaded`})})};function oc(e){return e.usage(`$0 cloudforce-one threat-signals articles list
391
+
392
+ List Threat Signals articles.`).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `next_cursor`. When provided, pagination, ordering, totals, and article filters come from the cursor. Sending `per_page`, `sort`, `include_total`, or any article filter alongside it returns a 400 `CursorFilterConflictError`."}).option(`per-page`,{type:`number`,description:`Per page`}).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`article-id`,{type:`string`,description:`Repeatable article UUID filter. Returns the union of matching account-owned articles; use this to list every Threat Signals article referenced by an indicator's sources.`}).option(`read`,{type:`boolean`,description:`Read`}).option(`tag-id`,{type:`string`,description:`Repeatable tag UUID filter. An article matches any selected tag.`}).option(`tag-category-id`,{type:`string`,description:`Repeatable tag-category UUID filter. An article matches any selected category; when tag_id is also present, the tag and category groups are ANDed.`}).option(`tag`,{type:`string`,description:`Legacy human-readable tag-value filter. Ignored when tag_id is supplied; prefer tag_id.`}).option(`tag-category`,{type:`string`,description:`Legacy category-name disambiguator for tag. It has no effect without tag; prefer tag_category_id.`}).option(`include-total`,{type:`boolean`,description:`Include total`}).option(`search`,{type:`string`,description:`Search`}).option(`published-after`,{type:`string`,description:`Published after`}).option(`published-before`,{type:`string`,description:`Published before`}).option(`fetched-after`,{type:`string`,description:`Fetched after`}).option(`fetched-before`,{type:`string`,description:`Fetched before`}).option(`feed-category`,{type:`string`,description:`Feed category`}).option(`source-type`,{type:`string`,description:`Source type`,choices:[`curated`,`custom`]}).option(`tag-applied-by`,{type:`string`,description:`Assignment provenance filter. When combined with tag_id or tag_category_id, the matching assignment must have this provenance.`,choices:[`ai`,`analyst`,`system`]}).option(`sort`,{type:`string`,description:`Sort`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sc={command:`list`,describe:`List Threat Signals articles`,builder:v(oc),handler:async r=>c({command:`cloudforce-one threat-signals articles list`,classification:{safeFlags:[`read`,`include-total`,`source-type`,`tag-applied-by`,`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`],feed_id:r[`feed-id`],article_id:r[`article-id`],read:r.read,tag_id:r[`tag-id`],tag_category_id:r[`tag-category-id`],tag:r.tag,tag_category:r[`tag-category`],include_total:r[`include-total`],search:r.search,published_after:r[`published-after`],published_before:r[`published-before`],fetched_after:r[`fetched-after`],fetched_before:r[`fetched-before`],feed_category:r[`feed-category`],source_type:r[`source-type`],tag_applied_by:r[`tag-applied-by`],sort:r.sort};if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.articles.list({account_id:u,...c})),{successLabel:`Loaded`})})};function cc(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
393
+
394
+ Update Threat Signals article read status.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`read`,{type:`boolean`,description:`The read field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const lc={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:cc,handler:async r=>c({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}`,pathParams:{"article-id":String(r[`article-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({read:r.read}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.markRead({...e,account_id:l,article_id:r[`article-id`]})),{successLabel:`Updated`});return}if(r.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let d=f({read:r.read});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.markRead({...d,account_id:l,article_id:r[`article-id`]})),{successLabel:`Updated`})})};function uc(e){return e.usage(`$0 cloudforce-one threat-signals articles skills diagnostic <skill-id>
395
+
396
+ Diagnose Threat Signals default tag skill.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dc={command:`diagnostic <skill-id>`,describe:`Diagnose Threat Signals default tag skill`,builder:v(uc),handler:async r=>c({command:`cloudforce-one threat-signals articles skills diagnostic`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles skills diagnostic`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}/diagnostic`,pathParams:{"article-id":String(r[`article-id`]??``),"skill-id":String(r[`skill-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.skills.diagnostic({account_id:l,article_id:r[`article-id`],skill_id:r[`skill-id`]})),{successLabel:`Created`})})};function fc(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
397
+
398
+ Get Threat Signals article skill output.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pc={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:fc,handler:async r=>c({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles skills get-output`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}/output`,pathParams:{"article-id":String(r[`article-id`]??``),"skill-id":String(r[`skill-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.articles.skills.getOutput({account_id:l,article_id:r[`article-id`],skill_id:r[`skill-id`]})),{successLabel:`Loaded`})})},mc={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(dc).command(pc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hc(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
399
+
400
+ Add tag to Threat Signals article.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`tag-id`,{type:`string`,description:`The tag_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gc={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:hc,handler:async r=>c({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles tags add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}/tags`,pathParams:{"article-id":String(r[`article-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({tag_id:p(r[`tag-id`],`tag-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.tags.add({...e,account_id:l,article_id:r[`article-id`]})),{successLabel:`Created`});return}r[`tag-id`]===void 0&&(r[`tag-id`]=await h(`tag-id`,`The tag_id field`));let d=f({tag_id:p(r[`tag-id`],`tag-id`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.tags.add({...d,account_id:l,article_id:r[`article-id`]})),{successLabel:`Created`})})};function _c(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
401
+
402
+ Generate Threat Signals article AI tags.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vc={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:_c,handler:async r=>c({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles tags generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}/tag`,pathParams:{"article-id":String(r[`article-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.tags.generate({account_id:l,article_id:r[`article-id`]})),{successLabel:`Created`})})};function yc(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
403
+
404
+ Remove tag from Threat Signals article.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const bc={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:yc,handler:async r=>c({command:`cloudforce-one threat-signals articles tags remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals articles tags remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${r[`article-id`]==null?`<article-id>`:encodeURIComponent(String(r[`article-id`]))}/tags/${r[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(r[`tag-id`]))}`,pathParams:{"article-id":String(r[`article-id`]??``),"tag-id":String(r[`tag-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
405
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.articles.tags.remove({account_id:l,article_id:r[`article-id`],tag_id:r[`tag-id`]})),{successLabel:`Deleted`})})},xc={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(gc).command(vc).command(bc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Sc={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(tc).command(ac).command(rc).command(sc).command(lc).command(mc).command(xc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cc(e){return e.usage(`$0 cloudforce-one threat-signals categories list
406
+
407
+ List Threat Signals feed categories.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wc={command:`list`,describe:`List Threat Signals feed categories`,builder:Cc,handler:async r=>c({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/categories`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.categories.list({account_id:l})),{successLabel:`Loaded`})})},Tc={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ec(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds bulk-create
408
+
409
+ Bulk create curated Threat Signals feeds.`).option(`feeds`,{type:`string`,description:`The feeds field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Dc={command:`bulk-create`,describe:`Bulk create curated Threat Signals feeds`,builder:Ec,handler:async r=>c({command:`cloudforce-one threat-signals curated-feeds bulk-create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals curated-feeds bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/bulk`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({feeds:d(r.feeds,`feeds`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.bulkCreate({...e,account_id:l})),{successLabel:`Created`});return}if(r.feeds===void 0)throw Error(`--feeds is required (or pass --body with this field set).`);let p=f({feeds:d(r.feeds,`feeds`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.bulkCreate({...p,account_id:l})),{successLabel:`Created`})})};function Oc(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds create
410
+
411
+ Create curated Threat Signals feed.`).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).option(`display-order`,{type:`number`,description:`The display_order field`}).option(`is-active`,{type:`boolean`,description:`The is_active field`,default:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`url`,{type:`string`,description:`The url field`}).option(`why-valuable`,{type:`string`,description:`The why_valuable 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 kc={command:`create`,describe:`Create curated Threat Signals feed`,builder:Oc,handler:async r=>c({command:`cloudforce-one threat-signals curated-feeds create`,classification:{safeFlags:[`category-id`,`is-active`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals curated-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({category_id:p(r[`category-id`],`category-id`,`text`),display_order:r[`display-order`],is_active:r[`is-active`],name:p(r.name,`name`,`text`),url:p(r.url,`url`,`text`),why_valuable:p(r[`why-valuable`],`why-valuable`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.create({...e,account_id:l})),{successLabel:`Created`});return}r[`category-id`]===void 0&&(r[`category-id`]=await g(`category-id`,`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,[`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`])),r.name===void 0&&(r.name=await h(`name`,`The name field`)),r.url===void 0&&(r.url=await h(`url`,`The url field`));let d=f({category_id:p(r[`category-id`],`category-id`,`text`),display_order:r[`display-order`],is_active:r[`is-active`],name:p(r.name,`name`,`text`),url:p(r.url,`url`,`text`),why_valuable:p(r[`why-valuable`],`why-valuable`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.create({...d,account_id:l})),{successLabel:`Created`})})};function Ac(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds delete <curated-feed-id>
412
+
413
+ Delete curated Threat Signals feed.`).positional(`curated-feed-id`,{type:`string`,description:`Curated feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const jc={command:`delete <curated-feed-id>`,describe:`Delete curated Threat Signals feed`,builder:Ac,handler:async r=>c({command:`cloudforce-one threat-signals curated-feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals curated-feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/${r[`curated-feed-id`]==null?`<curated-feed-id>`:encodeURIComponent(String(r[`curated-feed-id`]))}`,pathParams:{"curated-feed-id":String(r[`curated-feed-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
414
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.delete({account_id:l,curated_feed_id:r[`curated-feed-id`]})),{successLabel:`Deleted`})})};function Mc(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds list
415
+
416
+ List curated Threat Signals feeds.`).option(`category`,{type:`string`,description:`Category`}).option(`include-inactive`,{type:`boolean`,description:`Include inactive`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nc={command:`list`,describe:`List curated Threat Signals feeds`,builder:Mc,handler:async r=>c({command:`cloudforce-one threat-signals curated-feeds list`,classification:{safeFlags:[`include-inactive`,`dry-run`]}},r,async()=>{let c={category:r.category,include_inactive:r[`include-inactive`]};if(r.dryRun){o({command:`cf cloudforce-one threat-signals curated-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.curatedFeeds.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Pc(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds opt-out
417
+
418
+ Opt out of curated Threat Signals feeds.`).option(`opted-out`,{type:`boolean`,description:`The opted_out field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fc={command:`opt-out`,describe:`Opt out of curated Threat Signals feeds`,builder:Pc,handler:async r=>c({command:`cloudforce-one threat-signals curated-feeds opt-out`,classification:{safeFlags:[`opted-out`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals curated-feeds opt-out`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/opt-out`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({opted_out:r[`opted-out`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.optOut({...e,account_id:l})),{successLabel:`Updated`});return}if(r[`opted-out`]===void 0)throw Error(`--opted-out is required (or pass --body with this field set).`);let d=f({opted_out:r[`opted-out`]});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.optOut({...d,account_id:l})),{successLabel:`Updated`})})};function Ic(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds update <curated-feed-id>
419
+
420
+ Update curated Threat Signals feed.`).positional(`curated-feed-id`,{type:`string`,description:`Curated feed ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).option(`display-order`,{type:`number`,description:`The display_order field`}).option(`is-active`,{type:`boolean`,description:`The is_active field`}).option(`name`,{type:`string`,description:`The name field`}).option(`url`,{type:`string`,description:`The url field`}).option(`why-valuable`,{type:`string`,description:`The why_valuable field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Lc={command:`update <curated-feed-id>`,describe:`Update curated Threat Signals feed`,builder:Ic,handler:async r=>c({command:`cloudforce-one threat-signals curated-feeds update`,classification:{safeFlags:[`category-id`,`is-active`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals curated-feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/${r[`curated-feed-id`]==null?`<curated-feed-id>`:encodeURIComponent(String(r[`curated-feed-id`]))}`,pathParams:{"curated-feed-id":String(r[`curated-feed-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({category_id:p(r[`category-id`],`category-id`,`text`),display_order:r[`display-order`],is_active:r[`is-active`],name:p(r.name,`name`,`text`),url:p(r.url,`url`,`text`),why_valuable:p(r[`why-valuable`],`why-valuable`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.update({...e,account_id:l,curated_feed_id:r[`curated-feed-id`]})),{successLabel:`Updated`});return}let d=f({category_id:p(r[`category-id`],`category-id`,`text`),display_order:r[`display-order`],is_active:r[`is-active`],name:p(r.name,`name`,`text`),url:p(r.url,`url`,`text`),why_valuable:p(r[`why-valuable`],`why-valuable`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.update({...d,account_id:l,curated_feed_id:r[`curated-feed-id`]})),{successLabel:`Updated`})})},Rc={command:`curated-feeds`,describe:`Operations for threat-signals.curated-feeds`,builder:e=>e.command(Dc).command(kc).command(jc).command(Nc).command(Fc).command(Lc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zc(e){return e.usage(`$0 cloudforce-one threat-signals feeds create
421
+
422
+ Create Threat Signals feed.`).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).option(`curated-feed-id`,{type:`string`,description:`The curated_feed_id field`}).option(`display-name`,{type:`string`,description:`The display_name field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`poll-interval-s`,{type:`number`,description:`The poll_interval_s field`,default:300}).option(`title`,{type:`string`,description:`The title field`}).option(`url`,{type:`string`,description:`The url field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bc={command:`create`,describe:`Create Threat Signals feed`,builder:zc,handler:async r=>c({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({category_id:p(r[`category-id`],`category-id`,`text`),curated_feed_id:p(r[`curated-feed-id`],`curated-feed-id`,`text`),display_name:p(r[`display-name`],`display-name`,`text`),enabled:r.enabled,poll_interval_s:r[`poll-interval-s`],title:p(r.title,`title`,`text`),url:p(r.url,`url`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.feeds.create({...e,account_id:l})),{successLabel:`Created`});return}let d=f({category_id:p(r[`category-id`],`category-id`,`text`),curated_feed_id:p(r[`curated-feed-id`],`curated-feed-id`,`text`),display_name:p(r[`display-name`],`display-name`,`text`),enabled:r.enabled,poll_interval_s:r[`poll-interval-s`],title:p(r.title,`title`,`text`),url:p(r.url,`url`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.feeds.create({...d,account_id:l})),{successLabel:`Created`})})};function Vc(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
423
+
424
+ Delete Threat Signals feed.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Hc={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:Vc,handler:async r=>c({command:`cloudforce-one threat-signals feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
425
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.feeds.delete({account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Deleted`})})};function Uc(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
426
+
427
+ Get Threat Signals feed XML.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`format`,{type:`string`,description:`Format`,choices:[`xml`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wc={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:v(Uc),handler:async r=>c({command:`cloudforce-one threat-signals feeds get-raw`,classification:{safeFlags:[`format`,`dry-run`]}},r,async()=>{let c={format:r.format};if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds get-raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/raw`,pathParams:{"feed-id":String(r[`feed-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.feeds.getRaw({account_id:u,feed_id:r[`feed-id`],...c})),{successLabel:`Loaded`})})};function Gc(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
428
+
429
+ List Threat Signals feeds.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`limit`,{type:`number`,description:`Limit`}).option(`sort`,{type:`string`,description:`Sort`}).option(`category`,{type:`string`,description:`Category`}).option(`source-type`,{type:`string`,description:`Source type`,choices:[`curated`,`custom`]}).option(`enabled`,{type:`boolean`,description:`Enabled`}).option(`status`,{type:`string`,description:`Status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kc={command:`list`,describe:`List Threat Signals feeds`,builder:v(Gc),handler:async r=>c({command:`cloudforce-one threat-signals feeds list`,classification:{safeFlags:[`source-type`,`enabled`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],limit:r.limit,sort:r.sort,category:r.category,source_type:r[`source-type`],enabled:r.enabled,status:r.status};if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.feeds.list({account_id:u,...c})),{successLabel:`Loaded`})})};function qc(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
430
+
431
+ Trigger Threat Signals feed poll.`).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jc={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:v(qc),handler:async r=>c({command:`cloudforce-one threat-signals feeds poll`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={feed_id:r[`feed-id`]};if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds poll`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/poll`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Creating`,async()=>l.cloudforceOne.threatSignals.feeds.poll({account_id:u,...c})),{successLabel:`Created`})})};function Yc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
432
+
433
+ Get Threat Signals feed skills.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xc={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:Yc,handler:async r=>c({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/skills`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.feeds.skills.get({account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Loaded`})})};function Zc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
434
+
435
+ Set Threat Signals feed skills.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`skill-ids`,{type:`string`,array:!0,description:`The skill_ids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Qc={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:Zc,handler:async r=>c({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds skills update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}/skills`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({skill_ids:r[`skill-ids`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.skills.update({...e,account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Updated`});return}if(r[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let d=f({skill_ids:r[`skill-ids`]});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.skills.update({...d,account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Updated`})})},$c={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(Xc).command(Qc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function el(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
436
+
437
+ Update Threat Signals feed.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).option(`display-name`,{type:`string`,description:`The display_name field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`poll-interval-s`,{type:`number`,description:`The poll_interval_s field`}).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tl={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:el,handler:async r=>c({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${r[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(r[`feed-id`]))}`,pathParams:{"feed-id":String(r[`feed-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({category_id:p(r[`category-id`],`category-id`,`text`),display_name:p(r[`display-name`],`display-name`,`text`),enabled:r.enabled,poll_interval_s:r[`poll-interval-s`],title:p(r.title,`title`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.update({...e,account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Updated`});return}let d=f({category_id:p(r[`category-id`],`category-id`,`text`),display_name:p(r[`display-name`],`display-name`,`text`),enabled:r.enabled,poll_interval_s:r[`poll-interval-s`],title:p(r.title,`title`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.update({...d,account_id:l,feed_id:r[`feed-id`]})),{successLabel:`Updated`})})},nl={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(Bc).command(Hc).command(Wc).command(Kc).command(Jc).command(tl).command($c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rl(e){return e.usage(`$0 cloudforce-one threat-signals health
438
+
439
+ Check Threat Signals service health.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const il={command:`health`,describe:`Check Threat Signals service health`,builder:rl,handler:async r=>c({command:`cloudforce-one threat-signals health`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals health`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/health`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.health({account_id:l})),{successLabel:`Loaded`})})};function al(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
440
+
441
+ List Threat Signals article indicators.`).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`article-id`,{type:`string`,description:`Article ID`}).option(`search`,{type:`string`,description:`NFC-normalized and trimmed, case-insensitive literal substring search of indicator values. Requires 3–500 Unicode code points; the upper code-point bound is described here because OpenAPI string length cannot precisely express it without imposing UTF-16 semantics.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`sort`,{type:`string`,description:`Sort`}).option(`include-total`,{type:`boolean`,description:`Include total`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ol={command:`list`,describe:`List Threat Signals article indicators`,builder:al,handler:async r=>c({command:`cloudforce-one threat-signals indicators list`,classification:{safeFlags:[`include-total`,`dry-run`]}},r,async()=>{let c={feed_id:r[`feed-id`],article_id:r[`article-id`],search:r.search,per_page:r[`per-page`],sort:r.sort,include_total:r[`include-total`],cursor:r.cursor};if(r.dryRun){o({command:`cf cloudforce-one threat-signals indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/indicators`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.indicators.list({account_id:u,...c})),{successLabel:`Loaded`})})},sl={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(ol).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function cl(e){return e.usage(`$0 cloudforce-one threat-signals skills create
442
+
443
+ Create Threat Signals skill.`).option(`name`,{type:`string`,description:`The name field`}).option(`output-schema`,{type:`string`,description:`The output_schema field`}).option(`prompt`,{type:`string`,description:`The prompt field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`summary`,`tags`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ll={command:`create`,describe:`Create Threat Signals skill`,builder:cl,handler:async r=>c({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`),output_schema:p(r[`output-schema`],`output-schema`,`text`),prompt:p(r.prompt,`prompt`,`text`),type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.skills.create({...e,account_id:l})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await h(`name`,`The name field`)),r[`output-schema`]===void 0&&(r[`output-schema`]=await h(`output-schema`,`The output_schema field`)),r.prompt===void 0&&(r.prompt=await h(`prompt`,`The prompt field`)),r.type===void 0&&(r.type=await g(`type`,`The type field`,[`summary`,`tags`]));let d=f({name:p(r.name,`name`,`text`),output_schema:p(r[`output-schema`],`output-schema`,`text`),prompt:p(r.prompt,`prompt`,`text`),type:p(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.cloudforceOne.threatSignals.skills.create({...d,account_id:l})),{successLabel:`Created`})})};function ul(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
444
+
445
+ Delete Threat Signals skill.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const dl={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:ul,handler:async r=>c({command:`cloudforce-one threat-signals skills delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}`,pathParams:{"skill-id":String(r[`skill-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await _({force:!!r.force})){process.stderr.write(`Aborted.
446
+ `);return}a(await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.skills.delete({account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Deleted`})})};function fl(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
447
+
448
+ Get Threat Signals skill.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pl={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:fl,handler:async r=>c({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}`,pathParams:{"skill-id":String(r[`skill-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.skills.get({account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Loaded`})})};function ml(e){return e.usage(`$0 cloudforce-one threat-signals skills list
449
+
450
+ List Threat Signals skills.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hl={command:`list`,describe:`List Threat Signals skills`,builder:ml,handler:async r=>c({command:`cloudforce-one threat-signals skills list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.cloudforceOne.threatSignals.skills.list({account_id:u,...c})),{successLabel:`Loaded`})})};function gl(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
451
+
452
+ Get Threat Signals skill tag categories.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _l={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:v(gl),handler:async r=>c({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(r[`skill-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.get({account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Loaded`})})};function vl(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
453
+
454
+ Replace Threat Signals skill tag categories.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`category-uuids`,{type:`string`,array:!0,description:`The category_uuids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yl={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:v(vl),handler:async r=>c({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(r[`skill-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({category_uuids:r[`category-uuids`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.update({...e,account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Updated`});return}if(r[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let d=f({category_uuids:r[`category-uuids`]});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.update({...d,account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Updated`})})},bl={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(_l).command(yl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xl(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
455
+
456
+ Update Threat Signals skill.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`config`,{type:`string`,description:`The config field`}).option(`is-active`,{type:`boolean`,description:`The is_active field`}).option(`name`,{type:`string`,description:`The name field`}).option(`output-schema`,{type:`string`,description:`The output_schema field`}).option(`prompt`,{type:`string`,description:`The prompt field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Sl={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:xl,handler:async r=>c({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf cloudforce-one threat-signals skills update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${r[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(r[`skill-id`]))}`,pathParams:{"skill-id":String(r[`skill-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({config:p(r.config,`config`,`text`),is_active:r[`is-active`],name:p(r.name,`name`,`text`),output_schema:p(r[`output-schema`],`output-schema`,`text`),prompt:p(r.prompt,`prompt`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.update({...e,account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Updated`});return}let d=f({config:p(r.config,`config`,`text`),is_active:r[`is-active`],name:p(r.name,`name`,`text`),output_schema:p(r[`output-schema`],`output-schema`,`text`),prompt:p(r.prompt,`prompt`,`text`)});a(await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.update({...d,account_id:l,skill_id:r[`skill-id`]})),{successLabel:`Updated`})})},Cl={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(ll).command(dl).command(pl).command(hl).command(Sl).command(bl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wl={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(il).command(Sc).command(Tc).command(Rc).command(nl).command(sl).command(Cl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tl={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(C).command(P).command(ar).command(Vr).command(ha).command(ko).command(Wo).command($s).command(wl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Tl as default};