cf 1.0.0-beta.20 → 1.0.0-beta.21

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 (290) hide show
  1. package/README.md +1 -1
  2. package/dist/_meta/commands.json +911 -751
  3. package/dist/_meta/schemas.json +401 -382
  4. package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
  5. package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
  6. package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
  7. package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
  8. package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
  9. package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
  10. package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
  11. package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
  12. package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
  13. package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
  14. package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
  15. package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
  16. package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
  17. package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
  18. package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
  19. package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
  20. package/dist/args-BAOHroBC.mjs +2 -0
  21. package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
  22. package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
  23. package/dist/auth-B0lEsD_1.mjs +2 -0
  24. package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
  25. package/dist/auth-BtZmY6sE.mjs +2 -0
  26. package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
  27. package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
  28. package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
  29. package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
  30. package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
  31. package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
  32. package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
  33. package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
  34. package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
  35. package/dist/build-BqGmiORA.mjs +2 -0
  36. package/dist/build-CWlpWVBf.mjs +2 -0
  37. package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
  38. package/dist/cache-Bme_d2Wx.mjs +36 -0
  39. package/dist/cf-fIBhEAxU.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
  41. package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
  42. package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
  43. package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
  44. package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
  45. package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
  46. package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
  47. package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
  48. package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
  49. package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
  50. package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
  51. package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
  52. package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
  53. package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
  54. package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
  55. package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
  56. package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
  57. package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
  58. package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
  59. package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
  60. package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
  61. package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
  62. package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
  63. package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
  64. package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
  67. package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
  68. package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
  69. package/dist/containers-CzAZfmnj.mjs +380 -0
  70. package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
  71. package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
  72. package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
  73. package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
  74. package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
  75. package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
  76. package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
  77. package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
  78. package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
  79. package/dist/delegate-D7yYckA4.mjs +2 -0
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
  82. package/dist/deploy-context-Do89WayB.mjs +56 -0
  83. package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
  84. package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
  85. package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
  86. package/dist/dialog-D5lus4M4.mjs +2 -0
  87. package/dist/discover-6kAmVMPp.mjs +2 -0
  88. package/dist/discover-C06Syc2B.mjs +2 -0
  89. package/dist/dist-BtzWfAjU.mjs +453 -0
  90. package/dist/dls-ClWVxTBg.mjs +16 -0
  91. package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
  92. package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
  93. package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
  94. package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
  95. package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
  96. package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
  97. package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
  98. package/dist/email-domains-1rD1d84O.mjs +12 -0
  99. package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
  100. package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
  101. package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
  102. package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
  103. package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
  104. package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
  105. package/dist/flagship-D3v6iDdw.mjs +24 -0
  106. package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
  107. package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
  108. package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
  109. package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
  110. package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
  111. package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
  112. package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-CVx0Ya1E.mjs +43 -0
  115. package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
  116. package/dist/interactive-CHcvofEp.mjs +2 -0
  117. package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
  118. package/dist/interactive-wQM7Blhm.mjs +2 -0
  119. package/dist/internal-5cnlw9mH.mjs +4 -0
  120. package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
  121. package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
  122. package/dist/kv-CCem2sEY.mjs +12 -0
  123. package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
  125. package/dist/live-BhHzxFna.mjs +4 -0
  126. package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
  127. package/dist/local-CAs8RWYW.mjs +2 -0
  128. package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
  129. package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
  130. package/dist/log-BWdaOGOW.mjs +66 -0
  131. package/dist/log-DZfik9Jk.mjs +2 -0
  132. package/dist/login-BTiflOun.mjs +2 -0
  133. package/dist/login-Buhvx6Fi.mjs +5 -0
  134. package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
  135. package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
  136. package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
  137. package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
  138. package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
  139. package/dist/managed-defense-CtFLuvuB.mjs +18 -0
  140. package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
  141. package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
  142. package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
  143. package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
  144. package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
  145. package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
  146. package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
  147. package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
  148. package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
  149. package/dist/oauth-D_A8AcIS.mjs +4 -0
  150. package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
  151. package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
  152. package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
  153. package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
  154. package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
  155. package/dist/output-BJEgbI0G.mjs +2 -0
  156. package/dist/package-BqSbnt6u.mjs +2 -0
  157. package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
  158. package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
  159. package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
  160. package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
  161. package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
  162. package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
  163. package/dist/previews-DnZbUTym.mjs +6 -0
  164. package/dist/progress-CtGsPOpV.mjs +2 -0
  165. package/dist/prompt-YrI7ltMa.mjs +4 -0
  166. package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
  167. package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
  168. package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
  169. package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
  170. package/dist/ready-Cok0aqke.mjs +4 -0
  171. package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
  172. package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
  173. package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
  174. package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
  175. package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
  176. package/dist/request-headers-KhW_hy36.mjs +2 -0
  177. package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
  178. package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
  179. package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
  180. package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
  181. package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
  182. package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
  183. package/dist/run-Be6Js7D6.mjs +2 -0
  184. package/dist/run-DnZGQbq_.mjs +2 -0
  185. package/dist/sanitization-DkVWMHkc.mjs +2 -0
  186. package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
  187. package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
  188. package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
  189. package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
  190. package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
  191. package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
  192. package/dist/session-6xqrJWXy.mjs +2 -0
  193. package/dist/shared-DYRRG9A-.mjs +2 -0
  194. package/dist/signed-url-Ce0muRem.mjs +4 -0
  195. package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
  196. package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
  197. package/dist/spawn-BAEdy9kS.mjs +5 -0
  198. package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
  199. package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
  200. package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
  201. package/dist/src-COwxoocl.mjs +2 -0
  202. package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
  203. package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
  204. package/dist/startup-profile-CZYtQziF.mjs +2 -0
  205. package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
  206. package/dist/state-B3Uy1jPX.mjs +2 -0
  207. package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
  208. package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
  209. package/dist/tags-BP25qydR.mjs +22 -0
  210. package/dist/telemetry-CvZean4s.mjs +2 -0
  211. package/dist/telemetry-DKSJSLtq.mjs +2 -0
  212. package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
  213. package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
  214. package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
  215. package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
  216. package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
  217. package/dist/ui-Bo6DCvbS.mjs +2 -0
  218. package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
  219. package/dist/update-check-C7mfEeQ7.mjs +2 -0
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
  222. package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
  223. package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
  224. package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
  225. package/dist/version-DmTuWNZ5.mjs +2 -0
  226. package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
  227. package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
  228. package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
  229. package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
  230. package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
  231. package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
  232. package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
  233. package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
  234. package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
  235. package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
  236. package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
  237. package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
  238. package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
  239. package/package.json +12 -12
  240. package/dist/auth-CdEGiJ5Y.mjs +0 -2
  241. package/dist/auth-DF_ml7rE.mjs +0 -2
  242. package/dist/build-BJHRK6qE.mjs +0 -2
  243. package/dist/build-D7s3a8zW.mjs +0 -2
  244. package/dist/cache-CDPUUv_O.mjs +0 -45
  245. package/dist/cf-3vj8dGYz.mjs +0 -18
  246. package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
  247. package/dist/containers-CcZHRM9g.mjs +0 -376
  248. package/dist/delegate-Tgfxa-MZ.mjs +0 -2
  249. package/dist/deploy-context-DIAl408H.mjs +0 -56
  250. package/dist/dialog-BnIgdgWi.mjs +0 -2
  251. package/dist/discover-DEjUARkU.mjs +0 -2
  252. package/dist/discover-P20XeGBF.mjs +0 -2
  253. package/dist/dist-CX6dDtzj.mjs +0 -449
  254. package/dist/dist-DAeCUX-u.mjs +0 -60
  255. package/dist/dls-CMTrCDjZ.mjs +0 -17
  256. package/dist/flagship-geGDHp9H.mjs +0 -28
  257. package/dist/init-C08hBFYn.mjs +0 -43
  258. package/dist/interactive-pjVqirHx.mjs +0 -2
  259. package/dist/kv-Cd8vbPWK.mjs +0 -15
  260. package/dist/local-CFZtOOxg.mjs +0 -2
  261. package/dist/log-CRbgNbDp.mjs +0 -3
  262. package/dist/login-C3Bahro9.mjs +0 -5
  263. package/dist/login-DvsRxI3E.mjs +0 -2
  264. package/dist/logo-matches-jeNkUxAq.mjs +0 -6
  265. package/dist/logos-pxN5aumY.mjs +0 -7
  266. package/dist/managed-defense-C_KLy4oB.mjs +0 -18
  267. package/dist/matches-DnjBnG-Y.mjs +0 -6
  268. package/dist/oauth-Cf3-g-kk.mjs +0 -4
  269. package/dist/output-CpiIVa7Q.mjs +0 -2
  270. package/dist/previews-oHUiD54J.mjs +0 -7
  271. package/dist/progress-B1dpmxCT.mjs +0 -2
  272. package/dist/prompt-Y5OBwDVE.mjs +0 -4
  273. package/dist/queries-CS0sYfte.mjs +0 -9
  274. package/dist/request-headers-Bg8_Idw3.mjs +0 -2
  275. package/dist/run-0EozpORq.mjs +0 -2
  276. package/dist/run-DKg70Sqf.mjs +0 -2
  277. package/dist/session-3DgztoAI.mjs +0 -2
  278. package/dist/shared-o8saqcSK.mjs +0 -2
  279. package/dist/source-AlTrHNem.mjs +0 -6
  280. package/dist/spawn-BZd__5sj.mjs +0 -10
  281. package/dist/startup-profile-DJsOtbVN.mjs +0 -2
  282. package/dist/state-Dvzl3aSj.mjs +0 -2
  283. package/dist/submit-wJYcQB8d.mjs +0 -4
  284. package/dist/tags-BwFKjaOr.mjs +0 -23
  285. package/dist/telemetry-BczXOpQn.mjs +0 -2
  286. package/dist/telemetry-CE15pfOU.mjs +0 -2
  287. package/dist/ui-CBhKUPys.mjs +0 -2
  288. package/dist/update-check-C3RhhXja.mjs +0 -2
  289. package/dist/url-info-By6VD20A.mjs +0 -4
  290. package/dist/version-izjB0Yrl.mjs +0 -2
@@ -1,13 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-Y5OBwDVE.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function ee(e){return e.usage(`$0 email-security allow-policies batch
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-YrI7ltMa.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function ee(e){return e.usage(`$0 email-security allow-policies batch
3
3
 
4
- Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. 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(`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 te={command:`batch`,describe:`Batch allow policy operations`,builder:ee,handler:async e=>c({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`})){process.stderr.write(`Aborted.
5
- `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(g,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(g,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,body:`json`};function ne(e){return e.usage(`$0 email-security allow-policies create
4
+ Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. 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(`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 te={command:`batch`,describe:`Batch allow policy operations`,builder:ee,handler:async e=>c({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`}))return;if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(g,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(g,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,body:`json`};function ne(e){return e.usage(`$0 email-security allow-policies create
6
5
 
7
6
  Creates a new allow policy that exempts matching emails from security detections. Use with caution as this bypasses email security scanning. Policies can match on sender patterns and apply to specific detections or all detections.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const re={command:`create`,describe:`Create email allow policy`,builder:ne,handler:async e=>c({command:`email-security allow-policies create`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(_,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(e[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`])),e[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),g=await s(`Creating`,async()=>c.send(_,{body:h,account_id:l}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`};function ie(e){return e.usage(`$0 email-security allow-policies delete <policy-id>
8
7
 
9
- Removes an allow policy. After deletion, emails matching this pattern will be subject to normal security scanning and disposition actions.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,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 ae={command:`delete <policy-id>`,describe:`Delete an email allow policy`,builder:ie,handler:async e=>c({command:`email-security allow-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the allow policy and restores normal security scanning and disposition actions for matching emails.`})){process.stderr.write(`Aborted.
10
- `);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`,body:`json`};function oe(e){return e.usage(`$0 email-security allow-policies edit <policy-id>
8
+ Removes an allow policy. After deletion, emails matching this pattern will be subject to normal security scanning and disposition actions.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,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 ae={command:`delete <policy-id>`,describe:`Delete an email allow policy`,builder:ie,handler:async e=>c({command:`email-security allow-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the allow policy and restores normal security scanning and disposition actions for matching emails.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`,body:`json`};function oe(e){return e.usage(`$0 email-security allow-policies edit <policy-id>
11
9
 
12
10
  Updates an existing allow policy. Only provided fields will be modified. Changes take effect for new emails matching the pattern.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an allow policy.`})}const se={command:`edit <policy-id>`,describe:`Update an email allow policy`,builder:oe,handler:async e=>c({command:`email-security allow-policies edit`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(y,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),m=await s(`Updating`,async()=>c.send(y,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Updated`})})};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`};function le(e){return e.usage(`$0 email-security allow-policies get <policy-id>
13
11
 
@@ -19,13 +17,11 @@ Replaces an existing allow policy in full. Unlike PATCH, every field is taken fr
19
17
 
20
18
  Returns an aggregated monthly email security report including detections, dispositions, and policy activity for the trailing 12 months.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get`,describe:`Get monthly report`,builder:ve,handler:async e=>c({command:`email-security analytics monthly-report get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf email-security analytics monthly-report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/analytics/monthly_report`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(_e,{account_id:l}));a(u,{successLabel:`Loaded`})})},be={command:`monthly-report`,describe:`Operations for analytics.monthly-report`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`analytics`,describe:`Analytics and reporting — monthly report and per-day breakdowns of threat activity`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/batch`,body:`json`};function Se(e){return e.usage(`$0 email-security block-senders batch
21
19
 
22
- Executes multiple blocked sender operations atomically: delete, partially update, replace, and create blocked sender patterns in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the blocked sender patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Blocked sender patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`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 Ce={command:`batch`,describe:`Batch blocked sender operations`,builder:Se,handler:async e=>c({command:`email-security block-senders batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected blocked sender patterns and stop automatically blocking matching emails based on those rules.`})){process.stderr.write(`Aborted.
23
- `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(x,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(x,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders`,body:`json`};function we(e){return e.usage(`$0 email-security block-senders create
20
+ Executes multiple blocked sender operations atomically: delete, partially update, replace, and create blocked sender patterns in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the blocked sender patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Blocked sender patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`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 Ce={command:`batch`,describe:`Batch blocked sender operations`,builder:Se,handler:async e=>c({command:`email-security block-senders batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected blocked sender patterns and stop automatically blocking matching emails based on those rules.`}))return;if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(x,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(x,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders`,body:`json`};function we(e){return e.usage(`$0 email-security block-senders create
24
21
 
25
22
  Creates a new blocked sender pattern. Emails matching this pattern will be blocked from delivery. Patterns can be email addresses, domains, or IP addresses, and support regular expressions.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the pattern expires. After this time, Email Security ignores the pattern. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const Te={command:`create`,describe:`Create blocked email sender`,builder:we,handler:async e=>c({command:`email-security block-senders create`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(S,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]));let h=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),g=await s(`Creating`,async()=>c.send(S,{body:h,account_id:l}));a(g,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`};function w(e){return e.usage(`$0 email-security block-senders delete <pattern-id>
26
23
 
27
- Removes a blocked sender pattern. After deletion, emails from this sender will no longer be automatically blocked based on this rule.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,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 T={command:`delete <pattern-id>`,describe:`Delete a blocked email sender`,builder:w,handler:async e=>c({command:`email-security block-senders delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the blocked sender pattern and stops automatically blocking matching emails based on this rule.`})){process.stderr.write(`Aborted.
28
- `);return}let u=await s(`Deleting`,async()=>c.send(C,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Deleted`})})};var E={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`,body:`json`};function D(e){return e.usage(`$0 email-security block-senders edit <pattern-id>
24
+ Removes a blocked sender pattern. After deletion, emails from this sender will no longer be automatically blocked based on this rule.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,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 T={command:`delete <pattern-id>`,describe:`Delete a blocked email sender`,builder:w,handler:async e=>c({command:`email-security block-senders delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the blocked sender pattern and stops automatically blocking matching emails based on this rule.`}))return;let u=await s(`Deleting`,async()=>c.send(C,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Deleted`})})};var E={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`,body:`json`};function D(e){return e.usage(`$0 email-security block-senders edit <pattern-id>
29
25
 
30
26
  Updates an existing blocked sender pattern. Only provided fields will be modified. The pattern will continue blocking emails until deleted.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the pattern expires. After this time, Email Security ignores the pattern. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a blocked sender pattern.`})}const O={command:`edit <pattern-id>`,describe:`Update a blocked email sender`,builder:D,handler:async e=>c({command:`email-security block-senders edit`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(E,{body:t,account_id:l,pattern_id:e[`pattern-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),m=await s(`Updating`,async()=>c.send(E,{body:p,account_id:l,pattern_id:e[`pattern-id`]}));a(m,{successLabel:`Updated`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`};function De(e){return e.usage(`$0 email-security block-senders get <pattern-id>
31
27
 
@@ -37,8 +33,7 @@ Replaces an existing blocked sender pattern in full. Unlike PATCH, every field i
37
33
 
38
34
  Cancels the job, marking it as cancelled and stopping any pending message processing. The job record remains visible in list and detail endpoints.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job to cancel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`cancel <job-id>`,describe:`Cancel a bulk action job`,builder:Ie,handler:async e=>c({command:`email-security bulk-actions cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/cancel`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(Fe,{account_id:l,job_id:e[`job-id`]}));a(u,{successLabel:`Created`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk`,body:`json`};function Re(e){return e.usage(`$0 email-security bulk-actions create
39
35
 
40
- Creates a new bulk action job to move or release messages that match the provided search parameters. To move or release an explicit list of known messages instead of a search, use the move or release endpoints.`).option(`action`,{type:`string`,description:`The action the job performs on every message matching the search parameters.`,choices:[`MOVE`,`RELEASE`]}).coerce(`action`,e=>f(e,`action`,`text`)).option(`comment`,{type:`string`,description:`Optional note describing the job.`}).option(`destination`,{type:`string`,description:`Required when action is 'MOVE'.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).coerce(`destination`,e=>f(e,`destination`,`text`)).option(`expected-disposition`,{type:`string`,description:`Nonfunctional field. End of life: December 1, 2026.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`expected-disposition`,e=>f(e,`expected-disposition`,`text`)).option(`search-params-action-log`,{type:`boolean`,description:"Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.",default:!1}).option(`search-params-alert-id`,{type:`string`,description:`Alert ID of the detection to filter by.`}).option(`search-params-delivery-status`,{type:`string`,description:`Delivery status to filter by.`,choices:[`delivered`,`moved`,`quarantined`,`rejected`,`deferred`,`bounced`,`queued`,`move_failed`]}).coerce(`search-params-delivery-status`,e=>f(e,`search-params-delivery-status`,`text`)).option(`search-params-detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`,default:!0}).option(`search-params-domain`,{type:`string`,description:`Match messages that mention this domain — sender domain, recipient domain, or a domain in a link.`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`Match messages whose subject line equals this value exactly.`}).option(`search-params-final-disposition`,{type:`string`,description:`Dispositions to filter by.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`search-params-final-disposition`,e=>f(e,`search-params-final-disposition`,`text`)).option(`search-params-message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).coerce(`search-params-message-action`,e=>f(e,`search-params-message-action`,`text`)).option(`search-params-message-id`,{type:`string`,description:`Message-ID header value to filter by.`}).option(`search-params-metric`,{type:`string`,description:`Metric name to filter the search by.`}).option(`search-params-query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`search-params-recipient`,{type:`string`,description:`Match messages whose recipient is this email address or domain.`}).option(`search-params-sender`,{type:`string`,description:`Match messages whose sender is this email address or domain.`}).option(`search-params-smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`search-params-start`,{type:`string`,description:`Beginning of search date range.`}).option(`search-params-subject`,{type:`string`,description:`Match messages whose subject contains these keywords, in any order.`}).option(`search-params-submissions`,{type:`boolean`,description:`Whether to search reclassification submissions instead of original messages.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`create`,describe:`Create a bulk action job`,builder:Re,handler:async e=>c({command:`email-security bulk-actions create`,classification:{safeFlags:[`action`,`destination`,`expected-disposition`,`search-params-action-log`,`search-params-delivery-status`,`search-params-detections-only`,`search-params-final-disposition`,`search-params-message-action`,`search-params-submissions`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({action:e.action,comment:f(e.comment,`comment`,`text`),destination:e.destination,expected_disposition:e[`expected-disposition`],search_params:{action_log:e[`search-params-action-log`],alert_id:f(e[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:e[`search-params-delivery-status`],detections_only:e[`search-params-detections-only`],domain:f(e[`search-params-domain`],`search-params-domain`,`text`),end:f(e[`search-params-end`],`search-params-end`,`text`),exact_subject:f(e[`search-params-exact-subject`],`search-params-exact-subject`,`text`),final_disposition:e[`search-params-final-disposition`],message_action:e[`search-params-message-action`],message_id:f(e[`search-params-message-id`],`search-params-message-id`,`text`),metric:f(e[`search-params-metric`],`search-params-metric`,`text`),query:f(e[`search-params-query`],`search-params-query`,`text`),recipient:f(e[`search-params-recipient`],`search-params-recipient`,`text`),sender:f(e[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:f(e[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:f(e[`search-params-start`],`search-params-start`,`text`),subject:f(e[`search-params-subject`],`search-params-subject`,`text`),submissions:e[`search-params-submissions`]}}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(A,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.action===void 0&&(e.action=await m(`action`,`The action the job performs on every message matching the search parameters.`,[`MOVE`,`RELEASE`]));let p=d({action:e.action,comment:f(e.comment,`comment`,`text`),destination:e.destination,expected_disposition:e[`expected-disposition`],search_params:{action_log:e[`search-params-action-log`],alert_id:f(e[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:e[`search-params-delivery-status`],detections_only:e[`search-params-detections-only`],domain:f(e[`search-params-domain`],`search-params-domain`,`text`),end:f(e[`search-params-end`],`search-params-end`,`text`),exact_subject:f(e[`search-params-exact-subject`],`search-params-exact-subject`,`text`),final_disposition:e[`search-params-final-disposition`],message_action:e[`search-params-message-action`],message_id:f(e[`search-params-message-id`],`search-params-message-id`,`text`),metric:f(e[`search-params-metric`],`search-params-metric`,`text`),query:f(e[`search-params-query`],`search-params-query`,`text`),recipient:f(e[`search-params-recipient`],`search-params-recipient`,`text`),sender:f(e[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:f(e[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:f(e[`search-params-start`],`search-params-start`,`text`),subject:f(e[`search-params-subject`],`search-params-subject`,`text`),submissions:e[`search-params-submissions`]}}),h=await s(`Creating`,async()=>c.send(A,{body:p,account_id:l}));a(h,{successLabel:`Created`})})};var Be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk/${t.job_id}`};function Ve(e){return e.usage("$0 email-security bulk-actions delete <job-id>\n\nDeletes the job, removing it from all list and detail endpoints. Only jobs in a terminal state (`COMPLETED`, `CANCELLED`, or `FAILED`) can be deleted. To stop an in-progress job without removing it, use the cancel endpoint instead.").positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,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 He={command:`delete <job-id>`,describe:`Delete a bulk action job`,builder:Ve,handler:async e=>c({command:`email-security bulk-actions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the completed, cancelled, or failed bulk action job from all list and detail endpoints.`})){process.stderr.write(`Aborted.
41
- `);return}let u=await s(`Deleting`,async()=>c.send(Be,{account_id:l,job_id:e[`job-id`]}));a(u,{successLabel:`Deleted`})})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk/${t.job_id}`};function We(e){return e.usage(`$0 email-security bulk-actions get <job-id>
36
+ Creates a new bulk action job to move or release messages that match the provided search parameters. To move or release an explicit list of known messages instead of a search, use the move or release endpoints.`).option(`action`,{type:`string`,description:`The action the job performs on every message matching the search parameters.`,choices:[`MOVE`,`RELEASE`]}).coerce(`action`,e=>f(e,`action`,`text`)).option(`comment`,{type:`string`,description:`Optional note describing the job.`}).option(`destination`,{type:`string`,description:`Required when action is 'MOVE'.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).coerce(`destination`,e=>f(e,`destination`,`text`)).option(`expected-disposition`,{type:`string`,description:`Nonfunctional field. End of life: December 1, 2026.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`expected-disposition`,e=>f(e,`expected-disposition`,`text`)).option(`search-params-action-log`,{type:`boolean`,description:"Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.",default:!1}).option(`search-params-alert-id`,{type:`string`,description:`Alert ID of the detection to filter by.`}).option(`search-params-delivery-status`,{type:`string`,description:`Delivery status to filter by.`,choices:[`delivered`,`moved`,`quarantined`,`rejected`,`deferred`,`bounced`,`queued`,`move_failed`]}).coerce(`search-params-delivery-status`,e=>f(e,`search-params-delivery-status`,`text`)).option(`search-params-detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`,default:!0}).option(`search-params-domain`,{type:`string`,description:`Match messages that mention this domain — sender domain, recipient domain, or a domain in a link.`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`Match messages whose subject line equals this value exactly.`}).option(`search-params-final-disposition`,{type:`string`,description:`Dispositions to filter by.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`search-params-final-disposition`,e=>f(e,`search-params-final-disposition`,`text`)).option(`search-params-message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).coerce(`search-params-message-action`,e=>f(e,`search-params-message-action`,`text`)).option(`search-params-message-id`,{type:`string`,description:`Message-ID header value to filter by.`}).option(`search-params-metric`,{type:`string`,description:`Metric name to filter the search by.`}).option(`search-params-query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`search-params-recipient`,{type:`string`,description:`Match messages whose recipient is this email address or domain.`}).option(`search-params-sender`,{type:`string`,description:`Match messages whose sender is this email address or domain.`}).option(`search-params-smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`search-params-start`,{type:`string`,description:`Beginning of search date range.`}).option(`search-params-subject`,{type:`string`,description:`Match messages whose subject contains these keywords, in any order.`}).option(`search-params-submissions`,{type:`boolean`,description:`Whether to search reclassification submissions instead of original messages.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`create`,describe:`Create a bulk action job`,builder:Re,handler:async e=>c({command:`email-security bulk-actions create`,classification:{safeFlags:[`action`,`destination`,`expected-disposition`,`search-params-action-log`,`search-params-delivery-status`,`search-params-detections-only`,`search-params-final-disposition`,`search-params-message-action`,`search-params-submissions`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({action:e.action,comment:f(e.comment,`comment`,`text`),destination:e.destination,expected_disposition:e[`expected-disposition`],search_params:{action_log:e[`search-params-action-log`],alert_id:f(e[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:e[`search-params-delivery-status`],detections_only:e[`search-params-detections-only`],domain:f(e[`search-params-domain`],`search-params-domain`,`text`),end:f(e[`search-params-end`],`search-params-end`,`text`),exact_subject:f(e[`search-params-exact-subject`],`search-params-exact-subject`,`text`),final_disposition:e[`search-params-final-disposition`],message_action:e[`search-params-message-action`],message_id:f(e[`search-params-message-id`],`search-params-message-id`,`text`),metric:f(e[`search-params-metric`],`search-params-metric`,`text`),query:f(e[`search-params-query`],`search-params-query`,`text`),recipient:f(e[`search-params-recipient`],`search-params-recipient`,`text`),sender:f(e[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:f(e[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:f(e[`search-params-start`],`search-params-start`,`text`),subject:f(e[`search-params-subject`],`search-params-subject`,`text`),submissions:e[`search-params-submissions`]}}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(A,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.action===void 0&&(e.action=await m(`action`,`The action the job performs on every message matching the search parameters.`,[`MOVE`,`RELEASE`]));let p=d({action:e.action,comment:f(e.comment,`comment`,`text`),destination:e.destination,expected_disposition:e[`expected-disposition`],search_params:{action_log:e[`search-params-action-log`],alert_id:f(e[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:e[`search-params-delivery-status`],detections_only:e[`search-params-detections-only`],domain:f(e[`search-params-domain`],`search-params-domain`,`text`),end:f(e[`search-params-end`],`search-params-end`,`text`),exact_subject:f(e[`search-params-exact-subject`],`search-params-exact-subject`,`text`),final_disposition:e[`search-params-final-disposition`],message_action:e[`search-params-message-action`],message_id:f(e[`search-params-message-id`],`search-params-message-id`,`text`),metric:f(e[`search-params-metric`],`search-params-metric`,`text`),query:f(e[`search-params-query`],`search-params-query`,`text`),recipient:f(e[`search-params-recipient`],`search-params-recipient`,`text`),sender:f(e[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:f(e[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:f(e[`search-params-start`],`search-params-start`,`text`),subject:f(e[`search-params-subject`],`search-params-subject`,`text`),submissions:e[`search-params-submissions`]}}),h=await s(`Creating`,async()=>c.send(A,{body:p,account_id:l}));a(h,{successLabel:`Created`})})};var Be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk/${t.job_id}`};function Ve(e){return e.usage("$0 email-security bulk-actions delete <job-id>\n\nDeletes the job, removing it from all list and detail endpoints. Only jobs in a terminal state (`COMPLETED`, `CANCELLED`, or `FAILED`) can be deleted. To stop an in-progress job without removing it, use the cancel endpoint instead.").positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,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 He={command:`delete <job-id>`,describe:`Delete a bulk action job`,builder:Ve,handler:async e=>c({command:`email-security bulk-actions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the completed, cancelled, or failed bulk action job from all list and detail endpoints.`}))return;let u=await s(`Deleting`,async()=>c.send(Be,{account_id:l,job_id:e[`job-id`]}));a(u,{successLabel:`Deleted`})})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk/${t.job_id}`};function We(e){return e.usage(`$0 email-security bulk-actions get <job-id>
42
37
 
43
38
  Returns the status and details of a specific bulk action job.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <job-id>`,describe:`Get bulk action job details`,builder:We,handler:async e=>c({command:`email-security bulk-actions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ue,{account_id:l,job_id:e[`job-id`]}));a(u,{successLabel:`Loaded`})})};var Ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk`,query:[`page`,`per_page`,`action_type`,`status`]};function qe(e){return e.usage(`$0 email-security bulk-actions list
44
39
 
@@ -46,13 +41,11 @@ Returns a paginated list of bulk action jobs for the account.`).option(`page`,{t
46
41
 
47
42
  Returns the individual messages associated with a bulk action job, including their processing status.`).option(`job-id`,{type:`string`,description:`Identifier of the bulk action job whose messages to list.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`status`,{type:`string`,description:`Filter the job's messages by their processing status.`,choices:[`PENDING`,`PROCESSING`,`COMPLETED`,`FAILED`,`CANCELLED`,`SKIPPED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`List messages for a bulk action job`,builder:Xe,handler:async e=>c({command:`email-security bulk-actions messages list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/messages`,pathParams:{"job-id":String(e[`job-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Ye,{account_id:u,job_id:e[`job-id`],...c}));a(d,{successLabel:`Loaded`})})},Qe={command:`messages`,describe:`Operations for bulk-actions.messages`,builder:e=>e.command(Ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$e={command:`bulk-actions`,describe:`Asynchronous jobs that move or release every message matching a search — create, monitor, and manage bulk jobs`,builder:e=>e.command(Le).command(ze).command(He).command(Ge).command(Je).command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/batch`,body:`json`};function et(e){return e.usage(`$0 email-security content-policies batch
48
43
 
49
- Executes multiple content policy operations atomically: delete, partially update, replace, and create content policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the content policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Content policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. 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(`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 tt={command:`batch`,describe:`Batch content policy operations`,builder:et,handler:async e=>c({command:`email-security content-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected content policies and stop evaluating emails against their patterns.`})){process.stderr.write(`Aborted.
50
- `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(j,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(j,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies`,body:`json`};function nt(e){return e.usage(`$0 email-security content-policies create
44
+ Executes multiple content policy operations atomically: delete, partially update, replace, and create content policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the content policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Content policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. 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(`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 tt={command:`batch`,describe:`Batch content policy operations`,builder:et,handler:async e=>c({command:`email-security content-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected content policies and stop evaluating emails against their patterns.`}))return;if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(j,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(j,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies`,body:`json`};function nt(e){return e.usage(`$0 email-security content-policies create
51
45
 
52
46
  Creates a new content policy. Emails whose subject or body matches the pattern will be subject to the configured action.`).option(`enabled`,{type:`boolean`,description:`Whether the policy is active.`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`name`,{type:`string`,description:`Human-readable name of the policy.`}).option(`notes`,{type:`string`,description:`Optional note describing the purpose of the policy.`}).option(`pattern`,{type:`string`,description:`Regular expression the policy matches against.`}).option(`targets`,{type:`string`,array:!0,description:`Parts of the email the pattern is matched against.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a content policy.`})}const rt={command:`create`,describe:`Create a content policy`,builder:nt,handler:async e=>c({command:`email-security content-policies create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(M,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await p(`name`,`Human-readable name of the policy.`)),e.pattern===void 0&&(e.pattern=await p(`pattern`,`Regular expression the policy matches against.`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let m=d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}),h=await s(`Creating`,async()=>c.send(M,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var it={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`};function at(e){return e.usage(`$0 email-security content-policies delete <policy-id>
53
47
 
54
- Removes a content policy. After deletion, emails will no longer be evaluated against this pattern.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,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 ot={command:`delete <policy-id>`,describe:`Delete a content policy`,builder:at,handler:async e=>c({command:`email-security content-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the content policy and stops evaluating emails against its pattern.`})){process.stderr.write(`Aborted.
55
- `);return}let u=await s(`Deleting`,async()=>c.send(it,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};var N={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`,body:`json`};function st(e){return e.usage(`$0 email-security content-policies edit <policy-id>
48
+ Removes a content policy. After deletion, emails will no longer be evaluated against this pattern.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,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 ot={command:`delete <policy-id>`,describe:`Delete a content policy`,builder:at,handler:async e=>c({command:`email-security content-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the content policy and stops evaluating emails against its pattern.`}))return;let u=await s(`Deleting`,async()=>c.send(it,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};var N={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`,body:`json`};function st(e){return e.usage(`$0 email-security content-policies edit <policy-id>
56
49
 
57
50
  Updates an existing content policy. Only provided fields will be modified.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the policy is active.`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`name`,{type:`string`,description:`Human-readable name of the policy.`}).option(`notes`,{type:`string`,description:`Optional note describing the purpose of the policy.`}).option(`pattern`,{type:`string`,description:`Regular expression the policy matches against.`}).option(`targets`,{type:`string`,array:!0,description:`Parts of the email the pattern is matched against.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a content policy.`})}const ct={command:`edit <policy-id>`,describe:`Update a content policy`,builder:st,handler:async e=>c({command:`email-security content-policies edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let p=d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}),m=await s(`Updating`,async()=>c.send(N,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Updated`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`};function ut(e){return e.usage(`$0 email-security content-policies get <policy-id>
58
51
 
@@ -60,13 +53,11 @@ Retrieves details for a specific content policy including its pattern, targets,
60
53
 
61
54
  Returns a paginated list of content policies. These policies match against the subject or body of emails using a pattern. Supports filtering by name or enabled status, and searching across name and pattern fields.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`enabled`,{type:`boolean`,description:`Filter by enabled status.`}).option(`name`,{type:`string`,description:`Filter by exact policy name.`}).option(`expired`,{type:`boolean`,description:"Filter to return only expired policies (`true`) or only policies that still apply (`false`). Omit to return both."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`list`,describe:`List content policies`,builder:pt,handler:async e=>c({command:`email-security content-policies list`,classification:{safeFlags:[`order`,`direction`,`enabled`,`expired`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,enabled:e.enabled,name:e.name,expired:e.expired};if(e.dryRun){let e=await r();o({command:`cf email-security content-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ft,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},ht={command:`content-policies`,describe:`Operations for content-policies`,builder:e=>e.command(tt).command(rt).command(ot).command(ct).command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/batch`,body:`json`};function gt(e){return e.usage(`$0 email-security domains batch
62
55
 
63
- Executes multiple domain operations in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the domains to remove protection from. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the domain's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Domains to add protection for. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the domain's ID and every field of its new value. 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(`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 _t={command:`batch`,describe:`Batch domain operations`,builder:gt,handler:async e=>c({command:`email-security domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may permanently delete protection for the selected email domains. Emails for those domains will no longer be processed by Email Security.`})){process.stderr.write(`Aborted.
64
- `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(P,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(P,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains`,body:`json`};function vt(e){return e.usage(`$0 email-security domains create
56
+ Executes multiple domain operations in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the domains to remove protection from. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the domain's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Domains to add protection for. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the domain's ID and every field of its new value. 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(`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 _t={command:`batch`,describe:`Batch domain operations`,builder:gt,handler:async e=>c({command:`email-security domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may permanently delete protection for the selected email domains. Emails for those domains will no longer be processed by Email Security.`}))return;if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(P,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(P,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains`,body:`json`};function vt(e){return e.usage(`$0 email-security domains create
65
57
 
66
58
  Protects a new email domain by adding it to Email Security. Accepts a flat configuration object covering all delivery modes. Returns the newly created domain configuration.`).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`domain`,{type:`string`,description:`The email domain to protect.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).coerce(`folder`,e=>f(e,`folder`,`text`)).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.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 yt={command:`create`,describe:`Add a new email domain`,builder:vt,handler:async e=>c({command:`email-security domains create`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allowed_delivery_modes:e[`allowed-delivery-modes`],domain:f(e.domain,`domain`,`text`),drop_dispositions:e[`drop-dispositions`],folder:e.folder,integration_id:f(e[`integration-id`],`integration-id`,`text`),ip_restrictions:e[`ip-restrictions`],lookback_hops:e[`lookback-hops`],regions:e.regions,require_tls_inbound:e[`require-tls-inbound`],require_tls_outbound:e[`require-tls-outbound`],transport:f(e.transport,`transport`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(F,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(e.domain===void 0&&(e.domain=await p(`domain`,`The email domain to protect.`)),e[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(e[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(e.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let m=d({allowed_delivery_modes:e[`allowed-delivery-modes`],domain:f(e.domain,`domain`,`text`),drop_dispositions:e[`drop-dispositions`],folder:e.folder,integration_id:f(e[`integration-id`],`integration-id`,`text`),ip_restrictions:e[`ip-restrictions`],lookback_hops:e[`lookback-hops`],regions:e.regions,require_tls_inbound:e[`require-tls-inbound`],require_tls_outbound:e[`require-tls-outbound`],transport:f(e.transport,`transport`,`text`)}),h=await s(`Creating`,async()=>c.send(F,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var bt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/${t.domain_id}`};function xt(e){return e.usage(`$0 email-security domains delete <domain-id>
67
59
 
68
- Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,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 <domain-id>`,describe:`Unprotect an email domain`,builder:xt,handler:async e=>c({command:`email-security domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}`,pathParams:{"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes protection for the email domain. Emails for this domain will no longer be processed by Email Security.`})){process.stderr.write(`Aborted.
69
- `);return}let u=await s(`Deleting`,async()=>c.send(bt,{account_id:l,domain_id:e[`domain-id`]}));a(u,{successLabel:`Deleted`})})};var I={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/${t.domain_id}`,body:`json`};function Ct(e){return e.usage(`$0 email-security domains edit <domain-id>
60
+ Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,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 <domain-id>`,describe:`Unprotect an email domain`,builder:xt,handler:async e=>c({command:`email-security domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}`,pathParams:{"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes protection for the email domain. Emails for this domain will no longer be processed by Email Security.`}))return;let u=await s(`Deleting`,async()=>c.send(bt,{account_id:l,domain_id:e[`domain-id`]}));a(u,{successLabel:`Deleted`})})};var I={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/${t.domain_id}`,body:`json`};function Ct(e){return e.usage(`$0 email-security domains edit <domain-id>
70
61
 
71
62
  Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).coerce(`folder`,e=>f(e,`folder`,`text`)).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.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 wt={command:`edit <domain-id>`,describe:`Update an email domain`,builder:Ct,handler:async e=>c({command:`email-security domains edit`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}`,pathParams:{"domain-id":String(e[`domain-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({allowed_delivery_modes:e[`allowed-delivery-modes`],drop_dispositions:e[`drop-dispositions`],folder:e.folder,integration_id:f(e[`integration-id`],`integration-id`,`text`),ip_restrictions:e[`ip-restrictions`],lookback_hops:e[`lookback-hops`],regions:e.regions,require_tls_inbound:e[`require-tls-inbound`],require_tls_outbound:e[`require-tls-outbound`],transport:f(e.transport,`transport`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(I,{body:t,account_id:l,domain_id:e[`domain-id`]}));a(n,{successLabel:`Updated`});return}let p=d({allowed_delivery_modes:e[`allowed-delivery-modes`],drop_dispositions:e[`drop-dispositions`],folder:e.folder,integration_id:f(e[`integration-id`],`integration-id`,`text`),ip_restrictions:e[`ip-restrictions`],lookback_hops:e[`lookback-hops`],regions:e.regions,require_tls_inbound:e[`require-tls-inbound`],require_tls_outbound:e[`require-tls-outbound`],transport:f(e.transport,`transport`,`text`)}),m=await s(`Updating`,async()=>c.send(I,{body:p,account_id:l,domain_id:e[`domain-id`]}));a(m,{successLabel:`Updated`})})};var Tt={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/${t.domain_id}`};function Et(e){return e.usage(`$0 email-security domains get <domain-id>
72
63
 
@@ -80,8 +71,7 @@ Returns the DNS TXT record information when the domain ownership isn't verified
80
71
 
81
72
  Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching.`).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`provenance`,{type:`string`,description:`Source the entry was created from.`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).coerce(`provenance`,e=>f(e,`provenance`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an impersonation registry entry.`})}const zt={command:`create`,describe:`Create impersonation registry entry`,builder:Rt,handler:async e=>c({command:`email-security impersonation-registry create`,classification:{safeFlags:[`is-email-regex`,`provenance`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security impersonation-registry create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/impersonation_registry`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),directory_id:e[`directory-id`],directory_node_id:e[`directory-node-id`],email:f(e.email,`email`,`text`),external_directory_node_id:f(e[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:e[`is-email-regex`],name:f(e.name,`name`,`text`),provenance:e.provenance}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(R,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e.email===void 0&&(e.email=await p(`email`,`Email address (or pattern) of the protected identity.`)),e[`is-email-regex`]===void 0)throw Error(`--is-email-regex is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`Display name of the protected identity.`));let m=d({comments:f(e.comments,`comments`,`text`),directory_id:e[`directory-id`],directory_node_id:e[`directory-node-id`],email:f(e.email,`email`,`text`),external_directory_node_id:f(e[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:e[`is-email-regex`],name:f(e.name,`name`,`text`),provenance:e.provenance}),h=await s(`Creating`,async()=>c.send(R,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var Bt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/impersonation_registry/${t.impersonation_registry_id}`};function Vt(e){return e.usage(`$0 email-security impersonation-registry delete <impersonation-registry-id>
82
73
 
83
- Removes an entry from the impersonation registry. After deletion, this identity will no longer be protected from impersonation.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,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 Ht={command:`delete <impersonation-registry-id>`,describe:`Delete an impersonation registry entry`,builder:Vt,handler:async e=>c({command:`email-security impersonation-registry delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security impersonation-registry delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/impersonation_registry/${e[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(e[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(e[`impersonation-registry-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the impersonation registry entry and stops protecting the identity from impersonation.`})){process.stderr.write(`Aborted.
84
- `);return}let u=await s(`Deleting`,async()=>c.send(Bt,{account_id:l,impersonation_registry_id:e[`impersonation-registry-id`]}));a(u,{successLabel:`Deleted`})})};var z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/impersonation_registry/${t.impersonation_registry_id}`,body:`json`};function Ut(e){return e.usage(`$0 email-security impersonation-registry edit <impersonation-registry-id>
74
+ Removes an entry from the impersonation registry. After deletion, this identity will no longer be protected from impersonation.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,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 Ht={command:`delete <impersonation-registry-id>`,describe:`Delete an impersonation registry entry`,builder:Vt,handler:async e=>c({command:`email-security impersonation-registry delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security impersonation-registry delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/impersonation_registry/${e[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(e[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(e[`impersonation-registry-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the impersonation registry entry and stops protecting the identity from impersonation.`}))return;let u=await s(`Deleting`,async()=>c.send(Bt,{account_id:l,impersonation_registry_id:e[`impersonation-registry-id`]}));a(u,{successLabel:`Deleted`})})};var z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/impersonation_registry/${t.impersonation_registry_id}`,body:`json`};function Ut(e){return e.usage(`$0 email-security impersonation-registry edit <impersonation-registry-id>
85
75
 
86
76
  Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`provenance`,{type:`string`,description:`Source the entry was created from.`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).coerce(`provenance`,e=>f(e,`provenance`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an impersonation registry entry.`})}const Wt={command:`edit <impersonation-registry-id>`,describe:`Update an impersonation registry entry`,builder:Ut,handler:async e=>c({command:`email-security impersonation-registry edit`,classification:{safeFlags:[`is-email-regex`,`provenance`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security impersonation-registry edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/impersonation_registry/${e[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(e[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(e[`impersonation-registry-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),directory_id:e[`directory-id`],directory_node_id:e[`directory-node-id`],email:f(e.email,`email`,`text`),external_directory_node_id:f(e[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:e[`is-email-regex`],name:f(e.name,`name`,`text`),provenance:e.provenance}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(z,{body:t,account_id:l,impersonation_registry_id:e[`impersonation-registry-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),directory_id:e[`directory-id`],directory_node_id:e[`directory-node-id`],email:f(e.email,`email`,`text`),external_directory_node_id:f(e[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:e[`is-email-regex`],name:f(e.name,`name`,`text`),provenance:e.provenance}),m=await s(`Updating`,async()=>c.send(z,{body:p,account_id:l,impersonation_registry_id:e[`impersonation-registry-id`]}));a(m,{successLabel:`Updated`})})};var Gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/impersonation_registry/${t.impersonation_registry_id}`};function Kt(e){return e.usage(`$0 email-security impersonation-registry get <impersonation-registry-id>
87
77
 
@@ -114,8 +104,7 @@ Retrieves PhishGuard security alert reports for a specified date range. Reports
114
104
 
115
105
  Creates a new sending domain restriction to enforce TLS requirements for a domain. Emails without TLS from this domain will be dropped unless the subdomain is in the exclude list.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`domain`,{type:`string`,description:`Domain that requires TLS enforcement.`}).option(`exclude`,{type:`string`,array:!0,description:`Subdomains to exempt from TLS requirements.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sending domain restriction.`})}const Rn={command:`create`,describe:`Create a sending domain restriction`,builder:Ln,handler:async e=>c({command:`email-security sending-domain-restrictions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security sending-domain-restrictions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/sending_domain_restrictions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),domain:f(e.domain,`domain`,`text`),exclude:e.exclude}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(U,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e.domain===void 0&&(e.domain=await p(`domain`,`Domain that requires TLS enforcement.`)),e.exclude===void 0)throw Error(`--exclude is required (or pass --body with this field set).`);let m=d({comments:f(e.comments,`comments`,`text`),domain:f(e.domain,`domain`,`text`),exclude:e.exclude}),h=await s(`Creating`,async()=>c.send(U,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var zn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/sending_domain_restrictions/${t.sending_domain_restriction_id}`};function Bn(e){return e.usage(`$0 email-security sending-domain-restrictions delete <sending-domain-restriction-id>
116
106
 
117
- Removes a sending domain restriction. After deletion, TLS will no longer be enforced for emails from this domain.`).positional(`sending-domain-restriction-id`,{type:`string`,description:`Sending domain restriction identifier.`,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 Vn={command:`delete <sending-domain-restriction-id>`,describe:`Delete a sending domain restriction`,builder:Bn,handler:async e=>c({command:`email-security sending-domain-restrictions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security sending-domain-restrictions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/sending_domain_restrictions/${e[`sending-domain-restriction-id`]==null?`<sending-domain-restriction-id>`:encodeURIComponent(String(e[`sending-domain-restriction-id`]))}`,pathParams:{"sending-domain-restriction-id":String(e[`sending-domain-restriction-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the sending domain restriction and removes TLS enforcement for emails from this domain.`})){process.stderr.write(`Aborted.
118
- `);return}let u=await s(`Deleting`,async()=>c.send(zn,{account_id:l,sending_domain_restriction_id:e[`sending-domain-restriction-id`]}));a(u,{successLabel:`Deleted`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/sending_domain_restrictions/${t.sending_domain_restriction_id}`,body:`json`};function Hn(e){return e.usage(`$0 email-security sending-domain-restrictions edit <sending-domain-restriction-id>
107
+ Removes a sending domain restriction. After deletion, TLS will no longer be enforced for emails from this domain.`).positional(`sending-domain-restriction-id`,{type:`string`,description:`Sending domain restriction identifier.`,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 Vn={command:`delete <sending-domain-restriction-id>`,describe:`Delete a sending domain restriction`,builder:Bn,handler:async e=>c({command:`email-security sending-domain-restrictions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security sending-domain-restrictions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/sending_domain_restrictions/${e[`sending-domain-restriction-id`]==null?`<sending-domain-restriction-id>`:encodeURIComponent(String(e[`sending-domain-restriction-id`]))}`,pathParams:{"sending-domain-restriction-id":String(e[`sending-domain-restriction-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the sending domain restriction and removes TLS enforcement for emails from this domain.`}))return;let u=await s(`Deleting`,async()=>c.send(zn,{account_id:l,sending_domain_restriction_id:e[`sending-domain-restriction-id`]}));a(u,{successLabel:`Deleted`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/sending_domain_restrictions/${t.sending_domain_restriction_id}`,body:`json`};function Hn(e){return e.usage(`$0 email-security sending-domain-restrictions edit <sending-domain-restriction-id>
119
108
 
120
109
  Updates an existing sending domain restriction. Only provided fields will be modified. Changes affect which domains require TLS and which subdomains are excluded.`).positional(`sending-domain-restriction-id`,{type:`string`,description:`Sending domain restriction identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`domain`,{type:`string`,description:`Domain that requires TLS enforcement.`}).option(`exclude`,{type:`string`,array:!0,description:`Subdomains to exempt from TLS requirements.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a sending domain restriction.`})}const Un={command:`edit <sending-domain-restriction-id>`,describe:`Update a sending domain restriction`,builder:Hn,handler:async e=>c({command:`email-security sending-domain-restrictions edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security sending-domain-restrictions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/sending_domain_restrictions/${e[`sending-domain-restriction-id`]==null?`<sending-domain-restriction-id>`:encodeURIComponent(String(e[`sending-domain-restriction-id`]))}`,pathParams:{"sending-domain-restriction-id":String(e[`sending-domain-restriction-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),domain:f(e.domain,`domain`,`text`),exclude:e.exclude}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(W,{body:t,account_id:l,sending_domain_restriction_id:e[`sending-domain-restriction-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),domain:f(e.domain,`domain`,`text`),exclude:e.exclude}),m=await s(`Updating`,async()=>c.send(W,{body:p,account_id:l,sending_domain_restriction_id:e[`sending-domain-restriction-id`]}));a(m,{successLabel:`Updated`})})};var Wn={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/sending_domain_restrictions/${t.sending_domain_restriction_id}`};function Gn(e){return e.usage(`$0 email-security sending-domain-restrictions get <sending-domain-restriction-id>
121
110
 
@@ -127,13 +116,11 @@ Submits messages for reclassification or to report missed detections.`).option(`
127
116
 
128
117
  Returns information for submissions made to reclassify emails. Shows the status, outcome, and disposition changes for reclassification requests made by users or the security team. Useful for tracking false positive/negative reports.`).option(`start`,{type:`string`,description:"The beginning of the search date range. Defaults to `now - 30 days`."}).option(`end`,{type:`string`,description:"The end of the search date range. Defaults to `now`."}).option(`type`,{type:`string`,description:"Filter by who created the submission — `TEAM` for security team members or `USER` for end users.",choices:[`TEAM`,`USER`]}).option(`submission-id`,{type:`string`,description:`Filter by a specific submission ID.`}).option(`original-disposition`,{type:`string`,description:`The disposition a message is submitted to have.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`requested-disposition`,{type:`string`,description:`The disposition a message is submitted to have.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`outcome-disposition`,{type:`string`,description:`The disposition a message is submitted to have.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`status`,{type:`string`,description:"Filter by review status — `escalated`, `reviewed`, or `unreviewed`."}).option(`query`,{type:`string`,description:`Search term for filtering submissions.`}).option(`escalated-from-user`,{type:`boolean`,description:`When true, return only submissions that were escalated by an end user (vs. by the security team). When false, return only submissions that were not escalated by an end user. When omitted, no filter is applied.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`submission_id`,`subject`,`original_disposition`,`requested_disposition`,`outcome_disposition`,`requested_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tr={command:`list`,describe:`List reclassify submissions`,builder:er,handler:async e=>c({command:`email-security submissions list`,classification:{safeFlags:[`type`,`original-disposition`,`requested-disposition`,`outcome-disposition`,`escalated-from-user`,`order`,`direction`,`dry-run`]}},e,async()=>{let c={start:e.start,end:e.end,type:e.type,submission_id:e[`submission-id`],original_disposition:e[`original-disposition`],requested_disposition:e[`requested-disposition`],outcome_disposition:e[`outcome-disposition`],status:e.status,query:e.query,escalated_from_user:e[`escalated-from-user`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf email-security submissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/submissions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send($n,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},nr={command:`submissions`,describe:`Reclassify submissions — track user and team reports of false positives and missed detections`,builder:e=>e.command(Qn).command(tr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains/batch`,body:`json`};function rr(e){return e.usage(`$0 email-security trusted-domains batch
129
118
 
130
- Executes multiple trusted domain operations atomically: delete, partially update, replace, and create trusted domain patterns in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the trusted domain patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Trusted domain patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`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 ir={command:`batch`,describe:`Batch trusted domain operations`,builder:rr,handler:async e=>c({command:`email-security trusted-domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected trusted domain patterns and restore normal recent domain and similarity checks for matching emails.`})){process.stderr.write(`Aborted.
131
- `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(K,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(K,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains`,body:`json`};function ar(e){return e.usage(`$0 email-security trusted-domains create
119
+ Executes multiple trusted domain operations atomically: delete, partially update, replace, and create trusted domain patterns in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the trusted domain patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Trusted domain patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`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 ir={command:`batch`,describe:`Batch trusted domain operations`,builder:rr,handler:async e=>c({command:`email-security trusted-domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected trusted domain patterns and restore normal recent domain and similarity checks for matching emails.`}))return;if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(K,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(K,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains`,body:`json`};function ar(e){return e.usage(`$0 email-security trusted-domains create
132
120
 
133
121
  Creates a new trusted domain pattern. Use for partner domains or approved senders that should bypass recent domain registration and similarity checks. Configure whether it prevents recent domain or spoof dispositions.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-recent`,{type:`boolean`,description:`Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.`}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal domain."}).option(`is-similarity`,{type:`boolean`,description:`Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.`}).option(`pattern`,{type:`string`,description:"The domain pattern to trust, e.g. `example.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a trusted domain.`})}const or={command:`create`,describe:`Create trusted email domain`,builder:ar,handler:async e=>c({command:`email-security trusted-domains create`,classification:{safeFlags:[`is-recent`,`is-regex`,`is-similarity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_recent:e[`is-recent`],is_regex:e[`is-regex`],is_similarity:e[`is-similarity`],pattern:f(e.pattern,`pattern`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(q,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-recent`]===void 0)throw Error(`--is-recent is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-similarity`]===void 0)throw Error(`--is-similarity is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The domain pattern to trust, e.g. `example.com`."));let m=d({comments:f(e.comments,`comments`,`text`),is_recent:e[`is-recent`],is_regex:e[`is-regex`],is_similarity:e[`is-similarity`],pattern:f(e.pattern,`pattern`,`text`)}),h=await s(`Creating`,async()=>c.send(q,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var sr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains/${t.trusted_domain_id}`};function cr(e){return e.usage(`$0 email-security trusted-domains delete <trusted-domain-id>
134
122
 
135
- Removes a trusted domain pattern. After deletion, emails from this domain will be subject to normal recent domain and similarity checks.`).positional(`trusted-domain-id`,{type:`string`,description:`Trusted domain identifier.`,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 lr={command:`delete <trusted-domain-id>`,describe:`Delete a trusted email domain`,builder:cr,handler:async e=>c({command:`email-security trusted-domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains/${e[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(e[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(e[`trusted-domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the trusted domain pattern and restores normal recent domain and similarity checks for matching emails.`})){process.stderr.write(`Aborted.
136
- `);return}let u=await s(`Deleting`,async()=>c.send(sr,{account_id:l,trusted_domain_id:e[`trusted-domain-id`]}));a(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains/${t.trusted_domain_id}`,body:`json`};function ur(e){return e.usage(`$0 email-security trusted-domains edit <trusted-domain-id>
123
+ Removes a trusted domain pattern. After deletion, emails from this domain will be subject to normal recent domain and similarity checks.`).positional(`trusted-domain-id`,{type:`string`,description:`Trusted domain identifier.`,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 lr={command:`delete <trusted-domain-id>`,describe:`Delete a trusted email domain`,builder:cr,handler:async e=>c({command:`email-security trusted-domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains/${e[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(e[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(e[`trusted-domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the trusted domain pattern and restores normal recent domain and similarity checks for matching emails.`}))return;let u=await s(`Deleting`,async()=>c.send(sr,{account_id:l,trusted_domain_id:e[`trusted-domain-id`]}));a(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains/${t.trusted_domain_id}`,body:`json`};function ur(e){return e.usage(`$0 email-security trusted-domains edit <trusted-domain-id>
137
124
 
138
125
  Updates an existing trusted domain pattern. Only provided fields will be modified. Changes take effect for new emails matching the pattern.`).positional(`trusted-domain-id`,{type:`string`,description:`Trusted domain identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-recent`,{type:`boolean`,description:`Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.`}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal domain."}).option(`is-similarity`,{type:`boolean`,description:`Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.`}).option(`pattern`,{type:`string`,description:"The domain pattern to trust, e.g. `example.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a trusted domain.`})}const dr={command:`edit <trusted-domain-id>`,describe:`Update a trusted email domain`,builder:ur,handler:async e=>c({command:`email-security trusted-domains edit`,classification:{safeFlags:[`is-recent`,`is-regex`,`is-similarity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains/${e[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(e[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(e[`trusted-domain-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_recent:e[`is-recent`],is_regex:e[`is-regex`],is_similarity:e[`is-similarity`],pattern:f(e.pattern,`pattern`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(J,{body:t,account_id:l,trusted_domain_id:e[`trusted-domain-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),is_recent:e[`is-recent`],is_regex:e[`is-regex`],is_similarity:e[`is-similarity`],pattern:f(e.pattern,`pattern`,`text`)}),m=await s(`Updating`,async()=>c.send(J,{body:p,account_id:l,trusted_domain_id:e[`trusted-domain-id`]}));a(m,{successLabel:`Updated`})})};var fr={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/trusted_domains/${t.trusted_domain_id}`};function pr(e){return e.usage(`$0 email-security trusted-domains get <trusted-domain-id>
139
126
 
@@ -143,13 +130,11 @@ Returns a paginated list of trusted domain patterns. Trusted domains prevent fal
143
130
 
144
131
  Replaces an existing trusted domain in full. Unlike PATCH, every field is taken from the request body, so optional fields that are omitted are reset rather than left untouched. Use this when managing trusted domains declaratively.`).positional(`trusted-domain-id`,{type:`string`,description:`Trusted domain identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-recent`,{type:`boolean`,description:`Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.`}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal domain."}).option(`is-similarity`,{type:`boolean`,description:`Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.`}).option(`pattern`,{type:`string`,description:"The domain pattern to trust, e.g. `example.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a trusted domain.`})}const vr={command:`update <trusted-domain-id>`,describe:`Replace a trusted email domain`,builder:X,handler:async e=>c({command:`email-security trusted-domains update`,classification:{safeFlags:[`is-recent`,`is-regex`,`is-similarity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security trusted-domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/trusted_domains/${e[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(e[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(e[`trusted-domain-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_recent:e[`is-recent`],is_regex:e[`is-regex`],is_similarity:e[`is-similarity`],pattern:f(e.pattern,`pattern`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Y,{body:t,account_id:l,trusted_domain_id:e[`trusted-domain-id`]}));a(n,{successLabel:`Updated`});return}if(e[`is-recent`]===void 0)throw Error(`--is-recent is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-similarity`]===void 0)throw Error(`--is-similarity is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The domain pattern to trust, e.g. `example.com`."));let m=d({comments:f(e.comments,`comments`,`text`),is_recent:e[`is-recent`],is_regex:e[`is-regex`],is_similarity:e[`is-similarity`],pattern:f(e.pattern,`pattern`,`text`)}),h=await s(`Updating`,async()=>c.send(Y,{body:m,account_id:l,trusted_domain_id:e[`trusted-domain-id`]}));a(h,{successLabel:`Updated`})})},yr={command:`trusted-domains`,describe:`Operations for trusted-domains`,builder:e=>e.command(ir).command(or).command(lr).command(dr).command(mr).command(_r).command(vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns/batch`,body:`json`};function br(e){return e.usage(`$0 email-security url-ignore-patterns batch
145
132
 
146
- Executes multiple operations atomically. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the URL ignore patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`URL ignore patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`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 xr={command:`batch`,describe:`Batch URL ignore pattern operations`,builder:br,handler:async e=>c({command:`email-security url-ignore-patterns batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security url-ignore-patterns batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/url_ignore_patterns/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected URL rewrite ignore patterns and cause matching URLs to be rewritten again.`})){process.stderr.write(`Aborted.
147
- `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(Z,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(Z,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns`,body:`json`};function Sr(e){return e.usage(`$0 email-security url-ignore-patterns create
133
+ Executes multiple operations atomically. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the URL ignore patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`URL ignore patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`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 xr={command:`batch`,describe:`Batch URL ignore pattern operations`,builder:br,handler:async e=>c({command:`email-security url-ignore-patterns batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security url-ignore-patterns batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/url_ignore_patterns/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected URL rewrite ignore patterns and cause matching URLs to be rewritten again.`}))return;if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(Z,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(Z,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns`,body:`json`};function Sr(e){return e.usage(`$0 email-security url-ignore-patterns create
148
134
 
149
135
  Creates a new URL rewrite ignore pattern. URLs matching this pattern will not be rewritten.`).option(`comments`,{type:`string`,description:`Optional note describing the reason for the ignore pattern.`}).option(`pattern`,{type:`string`,description:`Regular expression identifying URLs to exempt from rewriting.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Creates a URL ignore pattern that exempts matching URLs from rewriting.`})}const Cr={command:`create`,describe:`Create a URL ignore pattern`,builder:Sr,handler:async e=>c({command:`email-security url-ignore-patterns create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security url-ignore-patterns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/url_ignore_patterns`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),pattern:f(e.pattern,`pattern`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Q,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.pattern===void 0&&(e.pattern=await p(`pattern`,`Regular expression identifying URLs to exempt from rewriting.`));let m=d({comments:f(e.comments,`comments`,`text`),pattern:f(e.pattern,`pattern`,`text`)}),h=await s(`Creating`,async()=>c.send(Q,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var wr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns/${t.pattern_id}`};function Tr(e){return e.usage(`$0 email-security url-ignore-patterns delete <pattern-id>
150
136
 
151
- Removes a URL rewrite ignore pattern. After deletion, URLs matching this pattern will be rewritten again.`).positional(`pattern-id`,{type:`string`,description:`URL ignore pattern identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Er={command:`delete <pattern-id>`,describe:`Delete a URL ignore pattern`,builder:Tr,handler:async e=>c({command:`email-security url-ignore-patterns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security url-ignore-patterns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/url_ignore_patterns/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the URL rewrite ignore pattern and causes matching URLs to be rewritten again.`})){process.stderr.write(`Aborted.
152
- `);return}let u=await s(`Deleting`,async()=>c.send(wr,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns/${t.pattern_id}`,body:`json`};function Dr(e){return e.usage(`$0 email-security url-ignore-patterns edit <pattern-id>
137
+ Removes a URL rewrite ignore pattern. After deletion, URLs matching this pattern will be rewritten again.`).positional(`pattern-id`,{type:`string`,description:`URL ignore pattern identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Er={command:`delete <pattern-id>`,describe:`Delete a URL ignore pattern`,builder:Tr,handler:async e=>c({command:`email-security url-ignore-patterns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security url-ignore-patterns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/url_ignore_patterns/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the URL rewrite ignore pattern and causes matching URLs to be rewritten again.`}))return;let u=await s(`Deleting`,async()=>c.send(wr,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns/${t.pattern_id}`,body:`json`};function Dr(e){return e.usage(`$0 email-security url-ignore-patterns edit <pattern-id>
153
138
 
154
139
  Updates an existing URL rewrite ignore pattern. Only provided fields will be modified.`).positional(`pattern-id`,{type:`string`,description:`URL ignore pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`Optional note describing the reason for the ignore pattern.`}).option(`pattern`,{type:`string`,description:`Regular expression identifying URLs to exempt from rewriting.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Updates a URL rewrite ignore pattern; modifies only the provided fields.`})}const Or={command:`edit <pattern-id>`,describe:`Update a URL ignore pattern`,builder:Dr,handler:async e=>c({command:`email-security url-ignore-patterns edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security url-ignore-patterns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/url_ignore_patterns/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),pattern:f(e.pattern,`pattern`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:l,pattern_id:e[`pattern-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),pattern:f(e.pattern,`pattern`,`text`)}),m=await s(`Updating`,async()=>c.send($,{body:p,account_id:l,pattern_id:e[`pattern-id`]}));a(m,{successLabel:`Updated`})})};var kr={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/url_ignore_patterns/${t.pattern_id}`};function Ar(e){return e.usage(`$0 email-security url-ignore-patterns get <pattern-id>
155
140
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-Y5OBwDVE.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 email-sending get <message-id>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-YrI7ltMa.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 email-sending get <message-id>
3
3
 
4
4
  Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <message-id>`,describe:`Fetch an email message`,builder:v,handler:async e=>l({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(_,{account_id:l,message_id:e[`message-id`]}));o(u,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/limits`,errors:{403:`ForbiddenError`}};function ee(e){return e.usage(`$0 email-sending limits get
5
5
 
@@ -11,8 +11,7 @@ Send a raw RFC 5322 (MIME) email for the specified account. Provide the full MIM
11
11
 
12
12
  Send an email for the specified account using the structured builder. Provide the sender, recipients, subject, and at least one of text or html; attachments are optional.`).option(`attachments`,{type:`string`,description:`File attachments and inline images. Provide as a JSON array of objects or @path/to/file.json.`}).option(`bcc-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`bcc-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`cc-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`cc-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`from-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`from-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`headers`,{type:`string`,description:`Custom email headers as key-value pairs. Provide as a JSON object or @path/to/file.json.`}).option(`html`,{type:`string`,description:`HTML body of the email. Provide at least one of text or html (non-empty).`}).option(`reply-to-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`reply-to-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`subject`,{type:`string`,description:`Email subject line.`}).option(`text`,{type:`string`,description:`Plain text body of the email. Provide at least one of text or html (non-empty).`}).option(`to-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`to-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`send`,describe:`Send an email`,builder:T,handler:async e=>l({command:`email-sending send`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending send`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/send`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({attachments:u(e.attachments,`attachments`),bcc:{address:m(e[`bcc-address`],`bcc-address`,`text`),name:m(e[`bcc-name`],`bcc-name`,`text`)},cc:{address:m(e[`cc-address`],`cc-address`,`text`),name:m(e[`cc-name`],`cc-name`,`text`)},from:{address:m(e[`from-address`],`from-address`,`text`),name:m(e[`from-name`],`from-name`,`text`)},headers:f(e.headers,`headers`),html:m(e.html,`html`,`text`),reply_to:{address:m(e[`reply-to-address`],`reply-to-address`,`text`),name:m(e[`reply-to-name`],`reply-to-name`,`text`)},subject:m(e.subject,`subject`,`text`),text:m(e.text,`text`,`text`),to:{address:m(e[`to-address`],`to-address`,`text`),name:m(e[`to-name`],`to-name`,`text`)}},[[`headers`]]):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(w,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.subject===void 0&&(e.subject=await h(`subject`,`Email subject line.`));let g=p({attachments:u(e.attachments,`attachments`),bcc:{address:m(e[`bcc-address`],`bcc-address`,`text`),name:m(e[`bcc-name`],`bcc-name`,`text`)},cc:{address:m(e[`cc-address`],`cc-address`,`text`),name:m(e[`cc-name`],`cc-name`,`text`)},from:{address:m(e[`from-address`],`from-address`,`text`),name:m(e[`from-name`],`from-name`,`text`)},headers:f(e.headers,`headers`),html:m(e.html,`html`,`text`),reply_to:{address:m(e[`reply-to-address`],`reply-to-address`,`text`),name:m(e[`reply-to-name`],`reply-to-name`,`text`)},subject:m(e.subject,`subject`,`text`),text:m(e.text,`text`,`text`),to:{address:m(e[`to-address`],`to-address`,`text`),name:m(e[`to-name`],`to-name`,`text`)}},[[`headers`]]),_=await c(`Creating`,async()=>i.send(w,{body:g,account_id:l}));o(_,{successLabel:`Created`})})};var D={method:`POST`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains`,body:`json`,errors:{403:`ForbiddenError`}};function O(e){return e.usage("$0 email-sending subdomains create\n\nCreates a new sending subdomain or re-enables sending on an existing subdomain that had it disabled. If zone-level Email Sending has not been enabled yet, the zone flag is automatically set when the entitlement is present. A leftmost wildcard such as `*.example.com` is accepted only for accounts with wildcard Email Sending enabled. Wildcard senders share the base domain's DKIM signing identity and `cf-bounce.<base>` return path.").option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`create`,describe:`Create a sending subdomain`,builder:O,handler:async e=>l({command:`email-sending subdomains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Creating`,async()=>t.send(D,{body:n,zone_id:r}));o(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."));let a=p({name:m(e.name,`name`,`text`)}),l=await c(`Creating`,async()=>t.send(D,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var A={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}`,errors:{404:`NotFoundError`}};function j(e){return e.usage(`$0 email-sending subdomains delete <subdomain-id>
13
13
 
14
- Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,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 M={command:`delete <subdomain-id>`,describe:`Delete a sending subdomain`,builder:j,handler:async e=>l({command:`email-sending subdomains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation disables sending and removes the subdomain's Email Sending DNS records.`})){process.stderr.write(`Aborted.
15
- `);return}let a=await c(`Deleting`,async()=>t.send(A,{zone_id:r,subdomain_id:e[`subdomain-id`]}));o(a,{successLabel:`Deleted`})})};var N={method:`POST`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}/dns`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function P(e){return e.usage(`$0 email-sending subdomains dns fix <subdomain-id>
14
+ Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,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 M={command:`delete <subdomain-id>`,describe:`Delete a sending subdomain`,builder:j,handler:async e=>l({command:`email-sending subdomains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation disables sending and removes the subdomain's Email Sending DNS records.`}))return;let a=await c(`Deleting`,async()=>t.send(A,{zone_id:r,subdomain_id:e[`subdomain-id`]}));o(a,{successLabel:`Deleted`})})};var N={method:`POST`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}/dns`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function P(e){return e.usage(`$0 email-sending subdomains dns fix <subdomain-id>
16
15
 
17
16
  Idempotently re-applies the sending DNS records (creates missing records, re-applies the email_routing lock on records whose lock has been cleared). Refuses with a 409 if foreign MX, multiple SPF, multiple DMARC, or multiple DKIM records exist at the relevant DNS names — those require manual cleanup.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`fix <subdomain-id>`,describe:`Fix sending subdomain DNS records`,builder:P,handler:async e=>l({command:`email-sending subdomains dns fix`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains dns fix`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Creating`,async()=>t.send(N,{zone_id:r,subdomain_id:e[`subdomain-id`]}));o(a,{successLabel:`Created`})})};var I={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}/dns`,errors:{404:`NotFoundError`}};function L(e){return e.usage(`$0 email-sending subdomains dns get <subdomain-id>
18
17
 
@@ -35,8 +34,7 @@ rest, instead of failing the entire request.
35
34
 
36
35
  Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).coerce(`scope-type`,e=>m(e,`scope-type`,`text`)).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).option(`dry-run`,{type:`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([`scope-type`,`scope-value`].some(t=>e[t]!==void 0)){let t=[`scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --scope-* flag is set`)}return!0})}const ve={command:`create`,describe:`Create account Email Sending suppression`,builder:_e,handler:async e=>l({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(X,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.email===void 0&&(e.email=await h(`email`,`The email address to suppress.`));let u=p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}}),f=await c(`Creating`,async()=>i.send(X,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var ye={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function be(e){return e.usage(`$0 email-sending suppressions delete <suppression-id>
37
36
 
38
- Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,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 xe={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:be,handler:async e=>l({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`})){process.stderr.write(`Aborted.
39
- `);return}let u=await c(`Deleting`,async()=>i.send(ye,{account_id:l,suppression_id:e[`suppression-id`]}));o(u,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function Q(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
37
+ Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,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 xe={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:be,handler:async e=>l({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`}))return;let u=await c(`Deleting`,async()=>i.send(ye,{account_id:l,suppression_id:e[`suppression-id`]}));o(u,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function Q(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
40
38
 
41
39
  Updates expiry or advisory note fields without changing legacy internal zone memberships. Scope cannot be changed.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`expires-at`,{type:`string`,description:"New expiry. Send `null` to make the suppression permanent; omit to leave it unchanged."}).option(`note`,{type:`string`,description:`Replacement advisory note. Send an empty string to clear it; omit to leave it unchanged.`}).option(`scope`,{type:`string`,description:"Not editable. Scope is fixed when the suppression is created; any value returns 400 with code `scope_immutable`. Delete and recreate the suppression to change it. Provide as a JSON object 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 Se={command:`edit <suppression-id>`,describe:`Update account Email Sending suppression`,builder:Q,handler:async e=>l({command:`email-sending suppressions edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:f(e.scope,`scope`)},[[`scope`]]):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(Z,{body:t,account_id:l,suppression_id:e[`suppression-id`]}));o(n,{successLabel:`Updated`});return}let u=p({expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:f(e.scope,`scope`)},[[`scope`]]),h=await c(`Updating`,async()=>i.send(Z,{body:u,account_id:l,suppression_id:e[`suppression-id`]}));o(h,{successLabel:`Updated`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,errors:{404:`NotFoundError`}};function we(e){return e.usage(`$0 email-sending suppressions get <suppression-id>
42
40
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./session-3DgztoAI.mjs";import{t as n}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{n as r}from"./version-izjB0Yrl.mjs";import{i,t as a}from"./blocks-CFAm0Ma3.mjs";import{n as o}from"./api-eMuS5GI1.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(s){if(t(r),s instanceof o){let t=s.statusCode,n=s.body,r=t===void 0?`Envelope Error`:f(t),o=[];if(n){let e=n;Array.isArray(e.errors)&&(o=e.errors)}let c=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,u=t===void 0?r:`${t} ${r}`,d=c?`${u} · ${c}`:u,p=e.muted(d),m=``;return o.length>0?m=o.map((t,n)=>{let r=typeof t.code==`number`?e.error(e.bold(`[${t.code}]`)):e.error(e.bold(`[error]`)),i=e.bold(t.message??``);return n===o.length-1?`${r} ${i}\n${p}`:`${r} ${i}`}).join(`
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{n}from"./version-DmTuWNZ5.mjs";import{i as r,t as i}from"./blocks-BOQH-Won.mjs";import{t as a}from"./session-6xqrJWXy.mjs";import{n as o}from"./api-eMuS5GI1.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(s){if(a(n),s instanceof o){let t=s.statusCode,n=s.body,a=t===void 0?`Envelope Error`:f(t),o=[];if(n){let e=n;Array.isArray(e.errors)&&(o=e.errors)}let c=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,u=t===void 0?a:`${t} ${a}`,d=c?`${u} · ${c}`:u,p=e.muted(d),m=``;return o.length>0?m=o.map((t,n)=>{let r=typeof t.code==`number`?e.error(e.bold(`[${t.code}]`)):e.error(e.bold(`[error]`)),i=e.bold(t.message??``);return n===o.length-1?`${r} ${i}\n${p}`:`${r} ${i}`}).join(`
3
3
 
4
- `):(m=e.error(e.bold(s.message||d)),s.message&&d&&(m+=`\n${p}`)),console.error(a(m,void 0,{title:`APIError`,rawMessage:!0})),t===401?console.error(`
5
- `+i(`Try running: cf auth login`)):t===403&&console.error(`
6
- `+i(`Check your API token permissions`)),s}if(s instanceof n){let t=s.status===void 0?``:`${s.status} ${f(s.status)}`.trim(),n=t?e.muted(t):``,r=s.notes??[],o;if(r.length>0){let t=typeof s.code==`number`?e.error(e.bold(`[${s.code}]`)):e.error(e.bold(`[error]`));o=r.map((i,a)=>{let o=e.bold(i.text),s=a===0?`${t} ${o}`:o;return a===r.length-1&&n?`${s}\n${n}`:s}).join(`
4
+ `):(m=e.error(e.bold(s.message||d)),s.message&&d&&(m+=`\n${p}`)),console.error(i(m,void 0,{title:`APIError`,rawMessage:!0})),t===401?console.error(`
5
+ `+r(`Try running: cf auth login`)):t===403&&console.error(`
6
+ `+r(`Check your API token permissions`)),s}if(s instanceof t){let t=s.status===void 0?``:`${s.status} ${f(s.status)}`.trim(),n=t?e.muted(t):``,a=s.notes??[],o;if(a.length>0){let t=typeof s.code==`number`?e.error(e.bold(`[${s.code}]`)):e.error(e.bold(`[error]`));o=a.map((r,i)=>{let o=e.bold(r.text),s=i===0?`${t} ${o}`:o;return i===a.length-1&&n?`${s}\n${n}`:s}).join(`
7
7
 
8
- `)}else{let t=e.error(e.bold(s.message));o=n?`${t}\n${n}`:t}return console.error(a(o,void 0,{title:`APIError`,rawMessage:!0})),s.status===401?console.error(`
9
- `+i(`Try running: cf auth login`)):s.status===403&&console.error(`
10
- `+i(`Check your API token permissions`)),s}if(s instanceof Error){let e=process.env.DEBUG&&s.stack?d(s.stack):void 0;return console.error(a(s.message,e)),c(s)&&console.error(`
11
- `+i("To continue without logging in, rerun this command with `--temporary-account`. cf will use a temporary account and print a claim URL.")),s}return console.error(a(`An unexpected error occurred`,String(s))),s}function d(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function f(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}export{u as n,s as t};
8
+ `)}else{let t=e.error(e.bold(s.message));o=n?`${t}\n${n}`:t}return console.error(i(o,void 0,{title:`APIError`,rawMessage:!0})),s.status===401?console.error(`
9
+ `+r(`Try running: cf auth login`)):s.status===403&&console.error(`
10
+ `+r(`Check your API token permissions`)),s}if(s instanceof Error){let e=process.env.DEBUG&&s.stack?d(s.stack):void 0;return console.error(i(s.message,e)),c(s)&&console.error(`
11
+ `+r("To continue without logging in, rerun this command with `--temporary-account`. cf will use a temporary account and print a claim URL.")),s}return console.error(i(`An unexpected error occurred`,String(s))),s}function d(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function f(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}export{u as n,s as t};