cf 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +4040 -1629
- package/dist/_meta/hand-written-commands.json +16 -43
- package/dist/_meta/schemas.json +445 -756
- package/dist/abuse-reports-BAQR1w79.mjs +26 -0
- package/dist/access-C8KMplzp.mjs +27 -0
- package/dist/account-B-KQSR0L.mjs +12 -0
- package/dist/account-tags-EncLJpLc.mjs +15 -0
- package/dist/accounts-BA4Mp3A_.mjs +132 -0
- package/dist/acm-ByxUJcqF.mjs +15 -0
- package/dist/addressing-C-ym0h0G.mjs +93 -0
- package/dist/agent-memory-CkPSiZDI.mjs +34 -0
- package/dist/ai-DkE_Q64s.mjs +31 -0
- package/dist/ai-audit-pPcjYWI5.mjs +6 -0
- package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
- package/dist/ai-search-DLD_kDS1.mjs +79 -0
- package/dist/ai-security-jyZcBl9g.mjs +10 -0
- package/dist/alerting-DOROjm8E.mjs +56 -0
- package/dist/analytics-rQ-h-plT.mjs +21 -0
- package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
- package/dist/{lifecycle-CadF_i2n.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
- package/dist/api-security-B8p8vp8u.mjs +154 -0
- package/dist/argo-g8SjUb_t.mjs +10 -0
- package/dist/artifacts-B1PaeF5h.mjs +43 -0
- package/dist/audit-logs-DmU_PHy_.mjs +4 -0
- package/dist/auth-CZqics6E.mjs +2 -0
- package/dist/auth-Cp7gT-AF.mjs +8 -0
- package/dist/billing-CvTbUg-H.mjs +23 -0
- package/dist/bot-management-z53tbcbH.mjs +9 -0
- package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
- package/dist/brand-protection-DzV211IQ.mjs +27 -0
- package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
- package/dist/browser-run-DYQvMAyo.mjs +46 -0
- package/dist/build-BPIp8J5F.mjs +2 -0
- package/dist/build-OC77a1zq.mjs +2 -0
- package/dist/builds-CwKRqjQ5.mjs +71 -0
- package/dist/cache-CugNPPsJ.mjs +45 -0
- package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
- package/dist/cf-oadujOtC.mjs +18 -0
- package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
- package/dist/chunk-DL5FNmn1.mjs +2 -0
- package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
- package/dist/client-certificates-DZUIqBTB.mjs +13 -0
- package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
- package/dist/cloud-connector-avpf86kG.mjs +6 -0
- package/dist/cloudflared-DhItYrCq.mjs +2 -0
- package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
- package/dist/command-B2Qe-WUa.mjs +2 -0
- package/dist/{command-BL6weJf3.mjs → command-CF0giIIc.mjs} +1 -1
- package/dist/command-D45NW-R3.mjs +2 -0
- package/dist/command-DIvPLK8x.mjs +2 -0
- package/dist/{completions-Dn621okY.mjs → completions-xPLd1cvL.mjs} +3 -3
- package/dist/{config-BY6KpMZs.mjs → config-B4vIa0zp.mjs} +1 -1
- package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
- package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
- package/dist/connectors-BSmhzNB7.mjs +15 -0
- package/dist/containers-B5vDcFzo.mjs +78 -0
- package/dist/{dist-CFQREIRi.mjs → containers-CFzvhmyz.mjs} +84 -83
- package/dist/content-scan-CeLZAcbT.mjs +14 -0
- package/dist/cps-BlI_Od72.mjs +6 -0
- package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
- package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
- package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
- package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
- package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
- package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
- package/dist/custom-pages-BgfhGksj.mjs +21 -0
- package/dist/d1-P2kWbdID.mjs +45 -0
- package/dist/data-security-pBIozmRL.mjs +71 -0
- package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
- package/dist/delegate-GctF_lrq.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BtETDvDA.mjs → deploy-CVYdt3NK.mjs} +1 -1
- package/dist/{deploy-input-BoLTdQzS.mjs → deploy-input-DpOgndz4.mjs} +1 -1
- package/dist/{dev-B5WcIpEr.mjs → dev-PPUBjWcm.mjs} +1 -1
- package/dist/diagnostics-C62habGQ.mjs +15 -0
- package/dist/{dialog-Bud0hiYv.mjs → dialog-C_ccBiZp.mjs} +1 -1
- package/dist/dist-B4pQ4CXK.mjs +48 -0
- package/dist/{dist-BRg_z9Ut.mjs → dist-BpadEMNY.mjs} +1 -1
- package/dist/dist-dc4E1u01.mjs +272 -0
- package/dist/dls-CpkcyQ8C.mjs +17 -0
- package/dist/dns-DG1X4Wap.mjs +135 -0
- package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
- package/dist/dry-run-CLX6Pbtq.mjs +2 -0
- package/dist/durable-objects-D214VhxH.mjs +8 -0
- package/dist/email-auth-Ba4ONan2.mjs +6 -0
- package/dist/email-routing-BlqKnqNM.mjs +45 -0
- package/dist/email-security-Dl1E1Dko.mjs +160 -0
- package/dist/email-sending-DIRSSRIz.mjs +47 -0
- package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
- package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
- package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
- package/dist/firewall-DdsDh8GD.mjs +56 -0
- package/dist/flagship-CkUIVW7c.mjs +28 -0
- package/dist/fraud-BUpZgvQT.mjs +22 -0
- package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
- package/dist/healthchecks-DjQWb3EM.mjs +22 -0
- package/dist/hostnames-ClBLPbct.mjs +11 -0
- package/dist/hyperdrive-U54xZsWU.mjs +37 -0
- package/dist/iam-T-wWmOep.mjs +52 -0
- package/dist/images-ia5UG1GW.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-BhswZLMI.mjs +76 -0
- package/dist/{interactive-CGOh-aYq.mjs → interactive-B6woOLo-.mjs} +23 -23
- package/dist/interactive-DnUvQHjc.mjs +2 -0
- package/dist/ips-Dad_EvhM.mjs +4 -0
- package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
- package/dist/keys-DjIPvqj4.mjs +4 -0
- package/dist/kv-DzXVnK94.mjs +21 -0
- package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
- package/dist/lifecycle-Ichnb2x1.mjs +2 -0
- package/dist/load-balancers-3wGHPsYz.mjs +76 -0
- package/dist/local-B6b2OIBW.mjs +2 -0
- package/dist/local-BrfySqnx.mjs +2 -0
- package/dist/{local-runtime-Dj8k-p62.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
- package/dist/login-CEQbOgBM.mjs +5 -0
- package/dist/login-DEWvGuaU.mjs +2 -0
- package/dist/logo-matches-YGRPstPi.mjs +6 -0
- package/dist/logos-BirufUgo.mjs +7 -0
- package/dist/logpush-BlNbUHyV.mjs +46 -0
- package/dist/logs-DmFlVF9q.mjs +48 -0
- package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
- package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
- package/dist/magic-transit-CBVOK2aa.mjs +387 -0
- package/dist/managed-defense-BdW6s483.mjs +18 -0
- package/dist/managed-transforms-BIeiofIS.mjs +9 -0
- package/dist/matches-CAnwci0P.mjs +6 -0
- package/dist/mcp-BfhOMGFE.mjs +32 -0
- package/dist/mesh-CxUL2Wf-.mjs +26 -0
- package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
- package/dist/network-C68psMbz.mjs +50 -0
- package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
- package/dist/oauth-D4bkeMAw.mjs +14 -0
- package/dist/oauth-DouM-qz0.mjs +2 -0
- package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
- package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
- package/dist/observability-DpYxkFeZ.mjs +80 -0
- package/dist/{open-PBXRGS4R-ClEt4E8F.mjs → open-PBXRGS4R-C4CKEADM.mjs} +1 -1
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
- package/dist/organization-Dg55Xfz7.mjs +75 -0
- package/dist/organizations-QnyzGjB2.mjs +4 -0
- package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
- package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
- package/dist/{output-Z2lQmPUW.mjs → output-Bia1u2k5.mjs} +1 -1
- package/dist/page-rules--D3eXrCf.mjs +39 -0
- package/dist/pages-Ce8DDgNr.mjs +60 -0
- package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
- package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
- package/dist/pipelines-CAqCgBLh.mjs +44 -0
- package/dist/precursor-DBnn4Q35.mjs +4 -0
- package/dist/previews-y_nSqWK5.mjs +4 -0
- package/dist/progress-Bi02B6v4.mjs +2 -0
- package/dist/{prompt-BP8XrQSj.mjs → prompt-Bx2PB-tt.mjs} +1 -1
- package/dist/queries-dg-CVXjf.mjs +9 -0
- package/dist/queues-C_ilLbRI.mjs +63 -0
- package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
- package/dist/r2-hZAkra-l.mjs +127 -0
- package/dist/radar-BO9b0aZy.mjs +300 -0
- package/dist/{raw-fetch-DNH2V8qH.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
- package/dist/realtime-eSavuSeE.mjs +172 -0
- package/dist/registrar-Ct30kOXZ.mjs +43 -0
- package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
- package/dist/{registry-BrtVdMrC.mjs → registry-vreNkX6u.mjs} +1 -1
- package/dist/reporting-B-F5aWUJ.mjs +14 -0
- package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
- package/dist/request-tracers-CaubpUFV.mjs +4 -0
- package/dist/resolve-BXemCSyA.mjs +2 -0
- package/dist/resolve-CUDKxUrW.mjs +2 -0
- package/dist/resource-sharing-6Snv-b69.mjs +40 -0
- package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
- package/dist/rules-C26eyeA5.mjs +18 -0
- package/dist/rulesets-BKzIwVtJ.mjs +37 -0
- package/dist/rum-Xdw5hyWY.mjs +30 -0
- package/dist/run-BBBMrSrs.mjs +2 -0
- package/dist/run-BRucX7Rz.mjs +2 -0
- package/dist/{schema-DmuJtMN5.mjs → schema-DqtYndhB.mjs} +1 -1
- package/dist/{schema-flags-CUGxFeZe.mjs → schema-flags-CebDI0f1.mjs} +1 -1
- package/dist/scim-odJTXiIe.mjs +18 -0
- package/dist/{sdk-Bvqx-_3z.mjs → sdk-CvIO3tWS.mjs} +1 -1
- package/dist/secrets-store-RYpWWzaw.mjs +24 -0
- package/dist/security-center-B3D95vCa.mjs +30 -0
- package/dist/security-txt-BSytVv-9.mjs +9 -0
- package/dist/shared-D67owd9x.mjs +2 -0
- package/dist/smart-shield-C83Sfnf4.mjs +24 -0
- package/dist/snippets-B6oE9WIa.mjs +20 -0
- package/dist/source-BR4_k2ad.mjs +6 -0
- package/dist/spawn-CKqJ9J4_.mjs +523 -0
- package/dist/spectrum-CfxY--X_.mjs +83 -0
- package/dist/speed-DzK-kiWt.mjs +24 -0
- package/dist/src-B3h6tKMt.mjs +108 -0
- package/dist/ssl-dnjzPcSB.mjs +45 -0
- package/dist/startup-profile-CYEokTVe.mjs +2 -0
- package/dist/startup-profile-CgWHy4rE.mjs +17 -0
- package/dist/state-BxCejn42.mjs +2 -0
- package/dist/state-DSzkxXML.mjs +2 -0
- package/dist/stream-oFyhS4Wi.mjs +102 -0
- package/dist/submit-4f-ravmC.mjs +4 -0
- package/dist/tags-DrIP6Uiq.mjs +4 -0
- package/dist/{telemetry-2s9Y3FaN.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
- package/dist/telemetry-Ds4epd3D.mjs +2 -0
- package/dist/telemetry-mKEb8lYB.mjs +2 -0
- package/dist/tenant-C-gc3NWv.mjs +12 -0
- package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
- package/dist/{tools-Dz1JCrHd.mjs → tools-BMKpYraQ.mjs} +1 -1
- package/dist/tunnels-D0QYsskp.mjs +29 -0
- package/dist/turnstile-C6Q3spRB.mjs +33 -0
- package/dist/ui-DH95w1Qk.mjs +5 -0
- package/dist/undici-DTSBJHNS.mjs +96 -0
- package/dist/update-check-BBS1K1jt.mjs +2 -0
- package/dist/update-check-CTLoakFV.mjs +2 -0
- package/dist/update-check-worker.mjs +2 -0
- package/dist/url-info-Cs0V89qq.mjs +4 -0
- package/dist/url-normalization-DaEQYy5h.mjs +9 -0
- package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
- package/dist/user-BV1VY3Kl.mjs +112 -0
- package/dist/values-qDS63E43.mjs +4 -0
- package/dist/vectorize-NFzD3mP5.mjs +32 -0
- package/dist/version-W6_TN_kN.mjs +2 -0
- package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
- package/dist/web-assets-Gd6z8dbt.mjs +64 -0
- package/dist/web3-DCJx4NRp.mjs +28 -0
- package/dist/workers-B-j-1ygi.mjs +36 -0
- package/dist/workers-builds-DPrNKjZW.mjs +14 -0
- package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
- package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
- package/dist/workflows-C2KKIJjl.mjs +43 -0
- package/dist/zaraz-CVLCs1IX.mjs +22 -0
- package/dist/zero-trust-BtJi4OXF.mjs +795 -0
- package/dist/zone-hKgt0WzO.mjs +4 -0
- package/dist/zones-CCNyaD3J.mjs +124 -0
- package/package.json +12 -9
- package/dist/_meta/agent-context.json +0 -195
- package/dist/abuse-reports-CDFjJ2e8.mjs +0 -8
- package/dist/access-BoT1waG4.mjs +0 -11
- package/dist/account-agnMUKWj.mjs +0 -2
- package/dist/account-tags-BRMMHCee.mjs +0 -9
- package/dist/accounts-Cut77dAt.mjs +0 -30
- package/dist/acm-C8WgXNCl.mjs +0 -3
- package/dist/addressing-CR8EV42x.mjs +0 -13
- package/dist/agent-context-Wj5TRRbW.mjs +0 -8
- package/dist/agent-memory-CVJpKKZy.mjs +0 -6
- package/dist/ai-BbNYt-yI.mjs +0 -5
- package/dist/ai-audit-mVajM-2i.mjs +0 -2
- package/dist/ai-gateway-BsepSA_v.mjs +0 -13
- package/dist/ai-search-DbEJqm5-.mjs +0 -7
- package/dist/ai-security-DmyB5EYk.mjs +0 -4
- package/dist/alerting-dmy3hd8O.mjs +0 -6
- package/dist/analytics-B1xBMla0.mjs +0 -5
- package/dist/analytics_engine-DazCn3iC.mjs +0 -2
- package/dist/api-security-0HXCzfHk.mjs +0 -50
- package/dist/argo-DSHsE8zv.mjs +0 -2
- package/dist/artifacts-CwiU9Mxu.mjs +0 -5
- package/dist/audit-logs-DwFtMDwH.mjs +0 -2
- package/dist/auth-B0ZyXc3y.mjs +0 -5
- package/dist/auth-DWxtJ918.mjs +0 -8
- package/dist/billing-Cbpadkgu.mjs +0 -3
- package/dist/bot-management-B6M2Vyyn.mjs +0 -5
- package/dist/botnet-feed-Dn8UuE4h.mjs +0 -3
- package/dist/brand-protection-B5R0b3pu.mjs +0 -3
- package/dist/browser-extension-D55pYZf_.mjs +0 -3
- package/dist/browser-run-C1b2VkGB.mjs +0 -4
- package/dist/build-CP2JUfV1.mjs +0 -2
- package/dist/builds-CVEXO_4a.mjs +0 -9
- package/dist/cache-BU5xX82E.mjs +0 -9
- package/dist/certificate-authorities--tZTWJWD.mjs +0 -2
- package/dist/cf-BV2HLCQm.mjs +0 -18
- package/dist/chunk-QBZBEHZB-BcCMlc8C.mjs +0 -2
- package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +0 -103
- package/dist/chunk-vbHwaUoU.mjs +0 -2
- package/dist/client-certificates-DX84qeYG.mjs +0 -3
- package/dist/client-side-security-DsSO2rZQ.mjs +0 -37
- package/dist/cloud-connector-cf8qlxap.mjs +0 -2
- package/dist/cloudforce-one-DzVXorbu.mjs +0 -32
- package/dist/command-DYrspBc0.mjs +0 -2
- package/dist/connector-interrupts-DqpqPPkp.mjs +0 -2
- package/dist/connector-telemetry-events-CCD-_B-8.mjs +0 -2
- package/dist/connector-telemetry-snapshots-D3CeGGhk.mjs +0 -2
- package/dist/connectors-aPQspZdg.mjs +0 -3
- package/dist/containers-D0Kjl8h-.mjs +0 -58
- package/dist/content-scan-BVx18XmS.mjs +0 -4
- package/dist/cps-ByazyM0x.mjs +0 -2
- package/dist/csamScanner-OG5lQxBC.mjs +0 -6
- package/dist/ct-alerting-BJx5n8Zf.mjs +0 -3
- package/dist/custom-certificates-BuJ2e9TA.mjs +0 -5
- package/dist/custom-csrs-CR_5qbST.mjs +0 -3
- package/dist/custom-hostnames-BzDTsQXb.mjs +0 -5
- package/dist/custom-nameservers-OfMPRGkD.mjs +0 -3
- package/dist/custom-pages-BmGXoTIo.mjs +0 -3
- package/dist/d1-DedC8N0N.mjs +0 -21
- package/dist/data-security-B2UB26ry.mjs +0 -7
- package/dist/dcv-delegation-C11vmzbG.mjs +0 -2
- package/dist/diagnostics-Cf6BLpAo.mjs +0 -3
- package/dist/dist-CyisSore.mjs +0 -371
- package/dist/dist-Dr4Hg_Up.mjs +0 -48
- package/dist/dls-R6PvHbhj.mjs +0 -3
- package/dist/dns-Cl8se64c.mjs +0 -29
- package/dist/dns-firewall-WtmKilDT.mjs +0 -57
- package/dist/dry-run-YSQndLvt.mjs +0 -2
- package/dist/durable-objects-jfVU6yp_.mjs +0 -2
- package/dist/email-auth-DPmZ85eW.mjs +0 -2
- package/dist/email-routing-Bf6DbNTr.mjs +0 -6
- package/dist/email-security-DTifjSxM.mjs +0 -18
- package/dist/email-sending-Dm3WkFHV.mjs +0 -7
- package/dist/error-sanitization-D8zuyPj_.mjs +0 -2
- package/dist/fieldExtractors-CeXZL0-I.mjs +0 -3
- package/dist/firewall-D5N2APXO.mjs +0 -8
- package/dist/flagship-sUOy9jei.mjs +0 -4
- package/dist/fraud-WLW2Ep1Z.mjs +0 -20
- package/dist/google-tag-gateway-lbww1FaJ.mjs +0 -2
- package/dist/healthchecks-0ih8Qjiw.mjs +0 -4
- package/dist/hostnames-Ba6FuL8K.mjs +0 -3
- package/dist/hyperdrive-DMqcU639.mjs +0 -21
- package/dist/iam-CXlYm0uC.mjs +0 -6
- package/dist/images-D_g1oli6.mjs +0 -8
- package/dist/intel-B8bS0ARd.mjs +0 -8
- package/dist/ips-68fzniN4.mjs +0 -2
- package/dist/keyless-certificates-CeLnqBvX.mjs +0 -3
- package/dist/keys-DkVdS2lF.mjs +0 -2
- package/dist/kv-gDAN50BQ.mjs +0 -5
- package/dist/leaked-credential-checks-DfnvHpvg.mjs +0 -4
- package/dist/load-balancers-m0HqyXPZ.mjs +0 -6
- package/dist/local-BwL_gesw.mjs +0 -2
- package/dist/logo-matches-DPbHlsKQ.mjs +0 -2
- package/dist/logos-DFBJFAYJ.mjs +0 -3
- package/dist/logpush-gzmlZayc.mjs +0 -4
- package/dist/logs-BuzwQgt5.mjs +0 -18
- package/dist/magic-cloud-networking-BbHCi1Vp.mjs +0 -5
- package/dist/magic-network-monitoring-kWMmnPTG.mjs +0 -4
- package/dist/magic-transit-ClSmJDKw.mjs +0 -111
- package/dist/managed-defense-EOihg1UR.mjs +0 -2
- package/dist/managed-transforms-BZ_XdGE2.mjs +0 -3
- package/dist/matches-B6sG0_fr.mjs +0 -2
- package/dist/mcp--kK0vS5i.mjs +0 -4
- package/dist/mesh-DfXYUHOO.mjs +0 -4
- package/dist/mtls-certificates-DZd-0X7l.mjs +0 -3
- package/dist/network-U6f_5ihp.mjs +0 -6
- package/dist/network-interconnects-DKZGTiYM.mjs +0 -41
- package/dist/oauth-BdVr2hJp.mjs +0 -14
- package/dist/oauth-clients-CY3OkPhC.mjs +0 -4
- package/dist/oauth-scopes-BTY7_5L-.mjs +0 -2
- package/dist/observability-Bsp-LdmJ.mjs +0 -10
- package/dist/organization-BSeMdj-7.mjs +0 -45
- package/dist/organizations-BroR48Nv.mjs +0 -2
- package/dist/origin-ca-certificates-jC-EMn6W.mjs +0 -3
- package/dist/origin-post-quantum-encryption-DIspLvA0.mjs +0 -2
- package/dist/origin-tls-client-auth-CZ_nUEcM.mjs +0 -4
- package/dist/page-rules-ZcdjPohY.mjs +0 -27
- package/dist/pages-W4tKa7xk.mjs +0 -14
- package/dist/pay-per-crawl-BNM1mJmP.mjs +0 -5
- package/dist/pay-per-use-DKxlnkH3.mjs +0 -2
- package/dist/pipelines-Dug0BR-c.mjs +0 -6
- package/dist/precursor-D-11DkRU.mjs +0 -4
- package/dist/previews-D_Nv4dR6.mjs +0 -4
- package/dist/progress-a5IKeKni.mjs +0 -2
- package/dist/queries-BdA2vJoe.mjs +0 -3
- package/dist/queues-Bu06ZqUE.mjs +0 -7
- package/dist/r2-COC9wMKb.mjs +0 -25
- package/dist/r2-data-catalog-CX5Rl5Qx.mjs +0 -16
- package/dist/radar-L-yoLIHF.mjs +0 -2
- package/dist/realtime-JKIiXfzi.mjs +0 -20
- package/dist/registrar-_dYUZrK0.mjs +0 -43
- package/dist/registrar-sandbox-D1yfW_Q_.mjs +0 -56
- package/dist/reporting-3fyoMcmb.mjs +0 -2
- package/dist/request-headers-BhQQAfJt.mjs +0 -2
- package/dist/request-tracers-TisEth2p.mjs +0 -2
- package/dist/resolve-CYUp6YgC.mjs +0 -2
- package/dist/resource-sharing-C4-dnohU.mjs +0 -6
- package/dist/resource-tagging-BRDifKqM.mjs +0 -2
- package/dist/rules-BCF3gIkw.mjs +0 -4
- package/dist/rulesets-wp6rllt3.mjs +0 -5
- package/dist/rum-B77awgoB.mjs +0 -4
- package/dist/run-BS8otL3u.mjs +0 -2
- package/dist/scim-C9BmUYil.mjs +0 -4
- package/dist/secrets-store-ckkZR2dM.mjs +0 -7
- package/dist/security-center-BCahKT57.mjs +0 -2
- package/dist/security-txt-0SI5du7I.mjs +0 -3
- package/dist/shared-D0B-7q-D.mjs +0 -2
- package/dist/smart-shield-BDPbrZa4.mjs +0 -4
- package/dist/snippets-CVRR_h0i.mjs +0 -4
- package/dist/spawn-DP4T92ss.mjs +0 -519
- package/dist/spectrum-CjNXQIQE.mjs +0 -63
- package/dist/speed-CrXCHk3h.mjs +0 -4
- package/dist/src-BbnV77C4.mjs +0 -108
- package/dist/ssl-DKORhHkh.mjs +0 -15
- package/dist/startup-profile-CBIH6yZy.mjs +0 -17
- package/dist/state-QUu6HfxC.mjs +0 -2
- package/dist/stream-wY3zi3FK.mjs +0 -16
- package/dist/submit-B-4oCBSk.mjs +0 -2
- package/dist/tags-5uJEkYJZ.mjs +0 -2
- package/dist/telemetry-n3NJourL.mjs +0 -2
- package/dist/tenant-BkFvv2o3.mjs +0 -2
- package/dist/tenant-custom-nameservers-DcjC1q0r.mjs +0 -3
- package/dist/tunnel-Cd4ipbvJ.mjs +0 -2
- package/dist/tunnels-9Zg3ePwD.mjs +0 -5
- package/dist/turnstile-BTwKYpzD.mjs +0 -23
- package/dist/ui-DQSZeaG5.mjs +0 -5
- package/dist/url-info-D7Y61BFd.mjs +0 -2
- package/dist/url-normalization-B4n8HiNQ.mjs +0 -3
- package/dist/url-scanner-CiCIltSQ.mjs +0 -2
- package/dist/user-DDFDGJ0Y.mjs +0 -12
- package/dist/values-DRznB_Cl.mjs +0 -2
- package/dist/vectorize-CbznPhzq.mjs +0 -4
- package/dist/waiting-rooms-CKP5hYBK.mjs +0 -11
- package/dist/web-assets-C-ZoSkkh.mjs +0 -8
- package/dist/web3-DwlN4dOw.mjs +0 -4
- package/dist/workers-builds-ECw_x_kp.mjs +0 -2
- package/dist/workers-for-platforms-BYGy46R6.mjs +0 -5
- package/dist/workers-vpc-CCosFcxz.mjs +0 -3
- package/dist/workers-zFMrbUkg.mjs +0 -6
- package/dist/workflows-C8GXGDRW.mjs +0 -5
- package/dist/zaraz-B5UIREaz.mjs +0 -2
- package/dist/zero-trust-DUp0XoIo.mjs +0 -91
- package/dist/zone-BGLkk-mL.mjs +0 -2
- package/dist/zones-CwYjNXMH.mjs +0 -44
- /package/dist/{alerts-CarPLL8k.mjs → alerts-CstOk8n0.mjs} +0 -0
- /package/dist/{autorag-zK-3harf.mjs → autorag-PRTwXGgn.mjs} +0 -0
- /package/dist/{body-parser-Cmw7PZ7a.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
- /package/dist/{brands-CpgTsX8h.mjs → brands-BHRXlWDm.mjs} +0 -0
- /package/dist/{clear-C5gzBA8G.mjs → clear-UvKESVx3.mjs} +0 -0
- /package/dist/{cli-types-abvWQN3T.mjs → cli-types-tt_LZMbn.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BY-dbhQZ.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-DoMvHvCO.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
- /package/dist/{domain-info-Cw3G4nap.mjs → domain-info-BqTDXNBo.mjs} +0 -0
- /package/dist/{health-DkEXPkS6.mjs → health-CwPzzrV6.mjs} +0 -0
- /package/dist/{input-validation-nF-0Ze2h.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
- /package/dist/{internal-4fU2r5en.mjs → internal-WLHfxX64.mjs} +0 -0
- /package/dist/{live-B4iGrwY2.mjs → live-D_k7eHdv.mjs} +0 -0
- /package/dist/{metadata-C5fJJr-k.mjs → metadata-APBiectA.mjs} +0 -0
- /package/dist/{project-settings-Bc3wYHo8.mjs → project-settings-DSXevRvj.mjs} +0 -0
- /package/dist/{rate-limit-analytics-DNsAFIeM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
- /package/dist/{rate-limits-CsOim7bm.mjs → rate-limits-C3K9smdl.mjs} +0 -0
- /package/dist/{ready-tTe-zcIw.mjs → ready-CvwvbdTX.mjs} +0 -0
- /package/dist/{recent-submissions-B3eTV5yC.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
- /package/dist/{refute-BY76YVrT.mjs → refute-CIAFMj00.mjs} +0 -0
- /package/dist/{scan-logo-DdoF_a5y.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
- /package/dist/{scan-page-sSgLwwZN.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
- /package/dist/{search-BFvQr-sl.mjs → search-12jA1b4l.mjs} +0 -0
- /package/dist/{signed-url-Cr8hiZPJ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
- /package/dist/{submission-info-DT2mLnu1.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
- /package/dist/{total-queries-6gs5iy9T.mjs → total-queries-CJTc9Pde.mjs} +0 -0
- /package/dist/{tracked-domains-D6XKO2EV.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
- /package/dist/{verify-CM1NakP0.mjs → verify-CZW5Fo1q.mjs} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 email-security allow-policies batch
|
|
3
|
+
|
|
4
|
+
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:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 policies operations`,builder:ee,handler:async d=>s({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.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(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 email-security allow-policies create
|
|
6
|
+
|
|
7
|
+
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(`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`]}).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 _={command:`create`,describe:`Create email allow policy`,builder:g,handler:async l=>s({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`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security allow-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_acceptable_sender:l[`is-acceptable-sender`],is_exempt_recipient:l[`is-exempt-recipient`],is_recipient:l[`is-recipient`],is_regex:l[`is-regex`],is_sender:l[`is-sender`],is_spoof:l[`is-spoof`],is_trusted_sender:l[`is-trusted-sender`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`),verify_sender:l[`verify-sender`]}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.allowPolicies.create({body:e,account_id:m})),{successLabel:`Created`});return}if(l[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(l[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(l[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(l[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(l.pattern===void 0&&(l.pattern=await f(`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.")),l[`pattern-type`]===void 0&&(l[`pattern-type`]=await p(`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`])),l[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=u({comments:d(l.comments,`comments`,`text`),is_acceptable_sender:l[`is-acceptable-sender`],is_exempt_recipient:l[`is-exempt-recipient`],is_recipient:l[`is-recipient`],is_regex:l[`is-regex`],is_sender:l[`is-sender`],is_spoof:l[`is-spoof`],is_trusted_sender:l[`is-trusted-sender`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`),verify_sender:l[`verify-sender`]});i(await o(`Creating`,async()=>s.emailSecurity.allowPolicies.create({body:h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 email-security allow-policies delete <policy-id>
|
|
8
|
+
|
|
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 y={command:`delete <policy-id>`,describe:`Delete an email allow policy`,builder:v,handler:async c=>s({command:`email-security allow-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security allow-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.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}i(await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.delete({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 email-security allow-policies edit <policy-id>
|
|
11
|
+
|
|
12
|
+
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(`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`]}).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 x={command:`edit <policy-id>`,describe:`Update an email allow policy`,builder:b,handler:async l=>s({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`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security allow-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies/${l[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(l[`policy-id`]))}`,pathParams:{"policy-id":String(l[`policy-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_acceptable_sender:l[`is-acceptable-sender`],is_exempt_recipient:l[`is-exempt-recipient`],is_recipient:l[`is-recipient`],is_regex:l[`is-regex`],is_sender:l[`is-sender`],is_spoof:l[`is-spoof`],is_trusted_sender:l[`is-trusted-sender`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`),verify_sender:l[`verify-sender`]}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.allowPolicies.edit({body:e,account_id:f,policy_id:l[`policy-id`]})),{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),is_acceptable_sender:l[`is-acceptable-sender`],is_exempt_recipient:l[`is-exempt-recipient`],is_recipient:l[`is-recipient`],is_regex:l[`is-regex`],is_sender:l[`is-sender`],is_spoof:l[`is-spoof`],is_trusted_sender:l[`is-trusted-sender`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`),verify_sender:l[`verify-sender`]});i(await o(`Updating`,async()=>s.emailSecurity.allowPolicies.edit({body:p,account_id:f,policy_id:l[`policy-id`]})),{successLabel:`Updated`})})};function S(e){return e.usage(`$0 email-security allow-policies get <policy-id>
|
|
13
|
+
|
|
14
|
+
Retrieves details for a specific allow policy including its pattern, dispositions that are exempted, and whether it applies to all detections.`).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})}const C={command:`get <policy-id>`,describe:`Get an email allow policy`,builder:S,handler:async c=>s({command:`email-security allow-policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security allow-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.allowPolicies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 email-security allow-policies list
|
|
15
|
+
|
|
16
|
+
Returns a paginated list of email allow policies. These policies exempt matching emails from security detection, allowing them to bypass disposition actions. Supports filtering by pattern type and policy attributes.`).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:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`is-exempt-recipient`,{type:`boolean`,description:`Filter to show only policies where messages to the recipient bypass all detections.`}).option(`is-trusted-sender`,{type:`boolean`,description:`Filter to show only policies where messages from the sender bypass all detections and link following.`}).option(`is-acceptable-sender`,{type:`boolean`,description:`Filter to show only policies where messages from the sender are exempted from Spam, Spoof, and Bulk dispositions (not Malicious or Suspicious).`}).option(`verify-sender`,{type:`boolean`,description:`Filter to show only policies that enforce DMARC, SPF, or DKIM authentication.`}).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.",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Pattern`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List email allow policies`,builder:h(w),handler:async c=>s({command:`email-security allow-policies list`,classification:{safeFlags:[`order`,`direction`,`is-exempt-recipient`,`is-trusted-sender`,`is-acceptable-sender`,`verify-sender`,`pattern-type`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,is_exempt_recipient:c[`is-exempt-recipient`],is_trusted_sender:c[`is-trusted-sender`],is_acceptable_sender:c[`is-acceptable-sender`],verify_sender:c[`verify-sender`],pattern_type:c[`pattern-type`],pattern:c.pattern};if(c.dryRun){a({command:`cf email-security allow-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.allowPolicies.list({account_id:u,...s})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 email-security allow-policies update <policy-id>
|
|
17
|
+
|
|
18
|
+
Replaces an existing allow policy 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 policies declaratively.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).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`]}).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 D={command:`update <policy-id>`,describe:`Replace an email allow policy`,builder:E,handler:async l=>s({command:`email-security allow-policies update`,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`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security allow-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/allow_policies/${l[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(l[`policy-id`]))}`,pathParams:{"policy-id":String(l[`policy-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_acceptable_sender:l[`is-acceptable-sender`],is_exempt_recipient:l[`is-exempt-recipient`],is_recipient:l[`is-recipient`],is_regex:l[`is-regex`],is_sender:l[`is-sender`],is_spoof:l[`is-spoof`],is_trusted_sender:l[`is-trusted-sender`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`),verify_sender:l[`verify-sender`]}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.allowPolicies.update({body:e,account_id:m,policy_id:l[`policy-id`]})),{successLabel:`Updated`});return}if(l[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(l[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(l[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(l[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(l.pattern===void 0&&(l.pattern=await f(`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.")),l[`pattern-type`]===void 0&&(l[`pattern-type`]=await p(`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`])),l[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=u({comments:d(l.comments,`comments`,`text`),is_acceptable_sender:l[`is-acceptable-sender`],is_exempt_recipient:l[`is-exempt-recipient`],is_recipient:l[`is-recipient`],is_regex:l[`is-regex`],is_sender:l[`is-sender`],is_spoof:l[`is-spoof`],is_trusted_sender:l[`is-trusted-sender`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`),verify_sender:l[`verify-sender`]});i(await o(`Updating`,async()=>s.emailSecurity.allowPolicies.update({body:h,account_id:m,policy_id:l[`policy-id`]})),{successLabel:`Updated`})})},O={command:`allow-policies`,describe:`Operations for allow-policies`,builder:e=>e.command(te).command(_).command(y).command(x).command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 email-security analytics monthly-report get
|
|
19
|
+
|
|
20
|
+
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 A={command:`get`,describe:`Get monthly report`,builder:k,handler:async c=>s({command:`email-security analytics monthly-report get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security analytics monthly-report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/analytics/monthly_report`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.analytics.monthlyReport.get({account_id:l})),{successLabel:`Loaded`})})},j={command:`monthly-report`,describe:`Operations for analytics.monthly-report`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`analytics`,describe:`Operations for analytics`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 email-security block-senders batch
|
|
21
|
+
|
|
22
|
+
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:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 P={command:`batch`,describe:`Batch blocked senders operations`,builder:N,handler:async d=>s({command:`email-security block-senders batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security block-senders batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.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(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.blockSenders.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.blockSenders.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 email-security block-senders create
|
|
24
|
+
|
|
25
|
+
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(`is-regex`,{type:`boolean`,description:`The is_regex field`}).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`]}).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 I={command:`create`,describe:`Create blocked email sender`,builder:F,handler:async l=>s({command:`email-security block-senders create`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security block-senders create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_regex:l[`is-regex`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.blockSenders.create({body:e,account_id:m})),{successLabel:`Created`});return}if(l[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);l.pattern===void 0&&(l.pattern=await f(`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.")),l[`pattern-type`]===void 0&&(l[`pattern-type`]=await p(`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=u({comments:d(l.comments,`comments`,`text`),is_regex:l[`is-regex`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.blockSenders.create({body:h,account_id:m})),{successLabel:`Created`})})};function L(e){return e.usage(`$0 email-security block-senders delete <pattern-id>
|
|
26
|
+
|
|
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 R={command:`delete <pattern-id>`,describe:`Delete a blocked email sender`,builder:L,handler:async c=>s({command:`email-security block-senders delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security block-senders delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders/${c[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(c[`pattern-id`]))}`,pathParams:{"pattern-id":String(c[`pattern-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.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}i(await o(`Deleting`,async()=>s.emailSecurity.blockSenders.delete({account_id:l,pattern_id:c[`pattern-id`]})),{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 email-security block-senders edit <pattern-id>
|
|
29
|
+
|
|
30
|
+
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(`is-regex`,{type:`boolean`,description:`The is_regex field`}).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`]}).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 B={command:`edit <pattern-id>`,describe:`Update a blocked email sender`,builder:z,handler:async l=>s({command:`email-security block-senders edit`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security block-senders edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders/${l[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(l[`pattern-id`]))}`,pathParams:{"pattern-id":String(l[`pattern-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_regex:l[`is-regex`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.blockSenders.edit({body:e,account_id:f,pattern_id:l[`pattern-id`]})),{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),is_regex:l[`is-regex`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.blockSenders.edit({body:p,account_id:f,pattern_id:l[`pattern-id`]})),{successLabel:`Updated`})})};function V(e){return e.usage(`$0 email-security block-senders get <pattern-id>
|
|
31
|
+
|
|
32
|
+
Retrieves details for a specific blocked sender pattern including its pattern type, value, and metadata.`).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})}const H={command:`get <pattern-id>`,describe:`Get a blocked email sender`,builder:V,handler:async c=>s({command:`email-security block-senders get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security block-senders get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders/${c[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(c[`pattern-id`]))}`,pathParams:{"pattern-id":String(c[`pattern-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.blockSenders.get({account_id:l,pattern_id:c[`pattern-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 email-security block-senders list
|
|
33
|
+
|
|
34
|
+
Returns a paginated list of blocked email sender patterns. These patterns prevent emails from matching senders from being delivered. Supports filtering by pattern type and searching across patterns.`).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:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`pattern-type`,{type:`string`,description:`Filter by pattern type.`,choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Filter by pattern value.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List blocked email senders`,builder:h(U),handler:async c=>s({command:`email-security block-senders list`,classification:{safeFlags:[`order`,`direction`,`pattern-type`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,pattern_type:c[`pattern-type`],pattern:c.pattern};if(c.dryRun){a({command:`cf email-security block-senders list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.blockSenders.list({account_id:u,...s})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 email-security block-senders update <pattern-id>
|
|
35
|
+
|
|
36
|
+
Replaces an existing blocked sender pattern 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 blocked senders declaratively.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).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`]}).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 K={command:`update <pattern-id>`,describe:`Replace a blocked email sender`,builder:G,handler:async l=>s({command:`email-security block-senders update`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security block-senders update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/block_senders/${l[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(l[`pattern-id`]))}`,pathParams:{"pattern-id":String(l[`pattern-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_regex:l[`is-regex`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.blockSenders.update({body:e,account_id:m,pattern_id:l[`pattern-id`]})),{successLabel:`Updated`});return}if(l[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);l.pattern===void 0&&(l.pattern=await f(`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.")),l[`pattern-type`]===void 0&&(l[`pattern-type`]=await p(`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=u({comments:d(l.comments,`comments`,`text`),is_regex:l[`is-regex`],pattern:d(l.pattern,`pattern`,`text`),pattern_type:d(l[`pattern-type`],`pattern-type`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.blockSenders.update({body:h,account_id:m,pattern_id:l[`pattern-id`]})),{successLabel:`Updated`})})},q={command:`block-senders`,describe:`Operations for block-senders`,builder:e=>e.command(P).command(I).command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 email-security content-policies batch
|
|
37
|
+
|
|
38
|
+
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:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 Y={command:`batch`,describe:`Batch content policy operations`,builder:J,handler:async d=>s({command:`email-security content-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security content-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/content_policies/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.force,message:`This operation may delete the selected content policies and stop evaluating emails against their patterns.`})){process.stderr.write(`Aborted.
|
|
39
|
+
`);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.contentPolicies.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.contentPolicies.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function X(e){return e.usage(`$0 email-security content-policies create
|
|
40
|
+
|
|
41
|
+
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:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`pattern`,{type:`string`,description:`The pattern field`}).option(`targets`,{type:`string`,array:!0,description:`The targets field`}).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 Z={command:`create`,describe:`Create a content policy`,builder:X,handler:async l=>s({command:`email-security content-policies create`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security content-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({enabled:l.enabled,name:d(l.name,`name`,`text`),notes:d(l.notes,`notes`,`text`),pattern:d(l.pattern,`pattern`,`text`),targets:l.targets}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.contentPolicies.create({body:e,account_id:p})),{successLabel:`Created`});return}if(l.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(l.name===void 0&&(l.name=await f(`name`,`The name field`)),l.pattern===void 0&&(l.pattern=await f(`pattern`,`The pattern field`)),l.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let m=u({enabled:l.enabled,name:d(l.name,`name`,`text`),notes:d(l.notes,`notes`,`text`),pattern:d(l.pattern,`pattern`,`text`),targets:l.targets});i(await o(`Creating`,async()=>s.emailSecurity.contentPolicies.create({body:m,account_id:p})),{successLabel:`Created`})})};function Q(e){return e.usage(`$0 email-security content-policies delete <policy-id>
|
|
42
|
+
|
|
43
|
+
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 ne={command:`delete <policy-id>`,describe:`Delete a content policy`,builder:Q,handler:async c=>s({command:`email-security content-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security content-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/content_policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation deletes the content policy and stops evaluating emails against its pattern.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.contentPolicies.delete({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 email-security content-policies edit <policy-id>
|
|
45
|
+
|
|
46
|
+
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:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`pattern`,{type:`string`,description:`The pattern field`}).option(`targets`,{type:`string`,array:!0,description:`The targets field`}).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 ie={command:`edit <policy-id>`,describe:`Update a content policy`,builder:re,handler:async l=>s({command:`email-security content-policies edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security content-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/content_policies/${l[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(l[`policy-id`]))}`,pathParams:{"policy-id":String(l[`policy-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({enabled:l.enabled,name:d(l.name,`name`,`text`),notes:d(l.notes,`notes`,`text`),pattern:d(l.pattern,`pattern`,`text`),targets:l.targets}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.contentPolicies.edit({body:e,account_id:f,policy_id:l[`policy-id`]})),{successLabel:`Updated`});return}let p=u({enabled:l.enabled,name:d(l.name,`name`,`text`),notes:d(l.notes,`notes`,`text`),pattern:d(l.pattern,`pattern`,`text`),targets:l.targets});i(await o(`Updating`,async()=>s.emailSecurity.contentPolicies.edit({body:p,account_id:f,policy_id:l[`policy-id`]})),{successLabel:`Updated`})})};function ae(e){return e.usage(`$0 email-security content-policies get <policy-id>
|
|
47
|
+
|
|
48
|
+
Retrieves details for a specific content policy including its pattern, targets, and metadata.`).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})}const oe={command:`get <policy-id>`,describe:`Get a content policy`,builder:ae,handler:async c=>s({command:`email-security content-policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security content-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/content_policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.contentPolicies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function se(e){return e.usage(`$0 email-security content-policies list
|
|
49
|
+
|
|
50
|
+
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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List content policies`,builder:h(se),handler:async c=>s({command:`email-security content-policies list`,classification:{safeFlags:[`order`,`direction`,`enabled`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,enabled:c.enabled,name:c.name};if(c.dryRun){a({command:`cf email-security content-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.contentPolicies.list({account_id:u,...s})),{successLabel:`Loaded`})})},le={command:`content-policies`,describe:`Operations for content-policies`,builder:e=>e.command(Y).command(Z).command(ne).command(ie).command(oe).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.usage(`$0 email-security domains batch
|
|
51
|
+
|
|
52
|
+
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:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 de={command:`batch`,describe:`Batch domain operations`,builder:ue,handler:async d=>s({command:`email-security domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.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.
|
|
53
|
+
`);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.domains.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.domains.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function fe(e){return e.usage(`$0 email-security domains create
|
|
54
|
+
|
|
55
|
+
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:`The allowed_delivery_modes field`}).option(`domain`,{type:`string`,description:`The domain field`}).option(`drop-dispositions`,{type:`string`,array:!0,description:`The drop_dispositions field`}).option(`integration-id`,{type:`string`,description:`The integration_id field`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`The ip_restrictions field`}).option(`lookback-hops`,{type:`number`,description:`The lookback_hops field`}).option(`regions`,{type:`string`,array:!0,description:`The regions field`}).option(`require-tls-inbound`,{type:`boolean`,description:`The require_tls_inbound field`}).option(`require-tls-outbound`,{type:`boolean`,description:`The require_tls_outbound field`}).option(`transport`,{type:`string`,description:`The transport field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`create`,describe:`Add a new email domain`,builder:fe,handler:async l=>s({command:`email-security domains create`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],domain:d(l.domain,`domain`,`text`),drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.domains.create({body:e,account_id:p})),{successLabel:`Created`});return}if(l[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(l.domain===void 0&&(l.domain=await f(`domain`,`The domain field`)),l[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(l[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(l.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let m=u({allowed_delivery_modes:l[`allowed-delivery-modes`],domain:d(l.domain,`domain`,`text`),drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.domains.create({body:m,account_id:p})),{successLabel:`Created`})})};function me(e){return e.usage(`$0 email-security domains delete <domain-id>
|
|
56
|
+
|
|
57
|
+
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 he={command:`delete <domain-id>`,describe:`Unprotect an email domain`,builder:me,handler:async c=>s({command:`email-security domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}`,pathParams:{"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.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.
|
|
58
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.domains.delete({account_id:l,domain_id:c[`domain-id`]})),{successLabel:`Deleted`})})};function ge(e){return e.usage(`$0 email-security domains edit <domain-id>
|
|
59
|
+
|
|
60
|
+
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:`The allowed_delivery_modes field`}).option(`drop-dispositions`,{type:`string`,array:!0,description:`The drop_dispositions field`}).option(`integration-id`,{type:`string`,description:`The integration_id field`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`The ip_restrictions field`}).option(`lookback-hops`,{type:`number`,description:`The lookback_hops field`}).option(`regions`,{type:`string`,array:!0,description:`The regions field`}).option(`require-tls-inbound`,{type:`boolean`,description:`The require_tls_inbound field`}).option(`require-tls-outbound`,{type:`boolean`,description:`The require_tls_outbound field`}).option(`transport`,{type:`string`,description:`The transport field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _e={command:`edit <domain-id>`,describe:`Update an email domain`,builder:ge,handler:async l=>s({command:`email-security domains edit`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains/${l[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(l[`domain-id`]))}`,pathParams:{"domain-id":String(l[`domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:e,account_id:f,domain_id:l[`domain-id`]})),{successLabel:`Updated`});return}let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:p,account_id:f,domain_id:l[`domain-id`]})),{successLabel:`Updated`})})};function ve(e){return e.usage(`$0 email-security domains get <domain-id>
|
|
61
|
+
|
|
62
|
+
Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state.`).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})}const ye={command:`get <domain-id>`,describe:`Get an email domain`,builder:ve,handler:async c=>s({command:`email-security domains get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}`,pathParams:{"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.domains.get({account_id:l,domain_id:c[`domain-id`]})),{successLabel:`Loaded`})})};function be(e){return e.usage(`$0 email-security domains list
|
|
63
|
+
|
|
64
|
+
Returns a paginated list of email domains protected by Email Security. Includes domain configuration, delivery modes, and authorization status. Supports filtering by delivery mode and integration ID.`).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:[`domain`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`allowed-delivery-mode`,{type:`string`,description:`Delivery mode to filter by.`,choices:[`DIRECT`,`BCC`,`JOURNAL`,`API`,`RETRO_SCAN`]}).option(`domain`,{type:`string`,description:`Domain names to filter by.`}).option(`active-delivery-mode`,{type:`string`,description:`Currently active delivery mode to filter by.`,choices:[`DIRECT`,`BCC`,`JOURNAL`,`API`,`RETRO_SCAN`]}).option(`integration-id`,{type:`string`,description:`Integration ID to filter by.`}).option(`status`,{type:`string`,description:`Filters response to domains with the provided status.`,choices:[`PENDING`,`ACTIVE`,`FAILED`,`TIMEOUT`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`list`,describe:`List protected email domains`,builder:h(be),handler:async c=>s({command:`email-security domains list`,classification:{safeFlags:[`order`,`direction`,`allowed-delivery-mode`,`active-delivery-mode`,`status`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,allowed_delivery_mode:c[`allowed-delivery-mode`],domain:c.domain,active_delivery_mode:c[`active-delivery-mode`],integration_id:c[`integration-id`],status:c.status};if(c.dryRun){a({command:`cf email-security domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.domains.list({account_id:u,...s})),{successLabel:`Loaded`})})};function Se(e){return e.usage(`$0 email-security domains update <domain-id>
|
|
65
|
+
|
|
66
|
+
Replaces all mutable fields of a protected email domain in a single atomic operation. Unlike PATCH, all non-computed fields are required.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`The allowed_delivery_modes field`}).option(`drop-dispositions`,{type:`string`,array:!0,description:`The drop_dispositions field`}).option(`integration-id`,{type:`string`,description:`The integration_id field`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`The ip_restrictions field`}).option(`lookback-hops`,{type:`number`,description:`The lookback_hops field`}).option(`regions`,{type:`string`,array:!0,description:`The regions field`}).option(`require-tls-inbound`,{type:`boolean`,description:`The require_tls_inbound field`}).option(`require-tls-outbound`,{type:`boolean`,description:`The require_tls_outbound field`}).option(`transport`,{type:`string`,description:`The transport field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for replacing an email domain. The `domain` field is intentionally absent — the domain name is immutable after creation. "})}const Ce={command:`update <domain-id>`,describe:`Replace an email domain`,builder:Se,handler:async l=>s({command:`email-security domains update`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains/${l[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(l[`domain-id`]))}`,pathParams:{"domain-id":String(l[`domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.domains.update({body:e,account_id:f,domain_id:l[`domain-id`]})),{successLabel:`Updated`});return}if(l[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(l[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(l[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(l.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.domains.update({body:p,account_id:f,domain_id:l[`domain-id`]})),{successLabel:`Updated`})})};function we(e){return e.usage(`$0 email-security domains verification get <domain-id>
|
|
67
|
+
|
|
68
|
+
Returns the DNS TXT record information when the domain ownership isn't verified through Cloudflare zone ownership or CASB integration.`).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})}const Te={command:`get <domain-id>`,describe:`Get domain verification details`,builder:we,handler:async c=>s({command:`email-security domains verification get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security domains verification get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/domains/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}/verification`,pathParams:{"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.domains.verification.get({account_id:l,domain_id:c[`domain-id`]})),{successLabel:`Loaded`})})},Ee={command:`verification`,describe:`Operations for domains.verification`,builder:e=>e.command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},De={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(de).command(pe).command(he).command(_e).command(ye).command(xe).command(Ce).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.usage(`$0 email-security impersonation-registry create
|
|
69
|
+
|
|
70
|
+
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:`The comments field`}).option(`directory-id`,{type:`number`,description:`The directory_id field`}).option(`directory-node-id`,{type:`number`,description:`The directory_node_id field`}).option(`email`,{type:`string`,description:`The email field`}).option(`external-directory-node-id`,{type:`string`,description:`The external_directory_node_id field`}).option(`is-email-regex`,{type:`boolean`,description:`The is_email_regex field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an impersonation registry entry.`})}const ke={command:`create`,describe:`Create impersonation registry entry`,builder:Oe,handler:async l=>s({command:`email-security impersonation-registry create`,classification:{safeFlags:[`is-email-regex`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security impersonation-registry create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/impersonation_registry`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...e,account_id:p})),{successLabel:`Created`});return}if(l.email===void 0&&(l.email=await f(`email`,`The email field`)),l[`is-email-regex`]===void 0)throw Error(`--is-email-regex is required (or pass --body with this field set).`);l.name===void 0&&(l.name=await f(`name`,`The name field`));let m=u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...m,account_id:p})),{successLabel:`Created`})})};function Ae(e){return e.usage(`$0 email-security impersonation-registry delete <impersonation-registry-id>
|
|
71
|
+
|
|
72
|
+
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 je={command:`delete <impersonation-registry-id>`,describe:`Delete an impersonation registry entry`,builder:Ae,handler:async c=>s({command:`email-security impersonation-registry delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security impersonation-registry delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/impersonation_registry/${c[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(c[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(c[`impersonation-registry-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation deletes the impersonation registry entry and stops protecting the identity from impersonation.`})){process.stderr.write(`Aborted.
|
|
73
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.impersonationRegistry.delete({account_id:l,impersonation_registry_id:c[`impersonation-registry-id`]})),{successLabel:`Deleted`})})};function Me(e){return e.usage(`$0 email-security impersonation-registry edit <impersonation-registry-id>
|
|
74
|
+
|
|
75
|
+
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:`The comments field`}).option(`directory-id`,{type:`number`,description:`The directory_id field`}).option(`directory-node-id`,{type:`number`,description:`The directory_node_id field`}).option(`email`,{type:`string`,description:`The email field`}).option(`external-directory-node-id`,{type:`string`,description:`The external_directory_node_id field`}).option(`is-email-regex`,{type:`boolean`,description:`The is_email_regex field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an impersonation registry entry.`})}const Ne={command:`edit <impersonation-registry-id>`,describe:`Update an impersonation registry entry`,builder:Me,handler:async l=>s({command:`email-security impersonation-registry edit`,classification:{safeFlags:[`is-email-regex`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security impersonation-registry edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/impersonation_registry/${l[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(l[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(l[`impersonation-registry-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...e,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]})),{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...p,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]})),{successLabel:`Updated`})})};function Pe(e){return e.usage(`$0 email-security impersonation-registry get <impersonation-registry-id>
|
|
76
|
+
|
|
77
|
+
Retrieves details for a specific impersonation registry entry including the protected identity, email pattern, and synchronization source if directory-synced.`).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})}const Fe={command:`get <impersonation-registry-id>`,describe:`Get an impersonation registry entry`,builder:Pe,handler:async c=>s({command:`email-security impersonation-registry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security impersonation-registry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/impersonation_registry/${c[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(c[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(c[`impersonation-registry-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.impersonationRegistry.get({account_id:l,impersonation_registry_id:c[`impersonation-registry-id`]})),{successLabel:`Loaded`})})};function Ie(e){return e.usage(`$0 email-security impersonation-registry list
|
|
78
|
+
|
|
79
|
+
Returns a paginated list of protected identities in the impersonation registry. These entries define identities and email addresses to protect from impersonation attacks. Can be manually added or automatically synced from directory integrations.`).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`,`email`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`provenance`,{type:`string`,description:`Provenance`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`list`,describe:`List entries in impersonation registry`,builder:h(Ie),handler:async c=>s({command:`email-security impersonation-registry list`,classification:{safeFlags:[`order`,`direction`,`provenance`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,provenance:c.provenance};if(c.dryRun){a({command:`cf email-security impersonation-registry list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/impersonation_registry`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.impersonationRegistry.list({account_id:u,...s})),{successLabel:`Loaded`})})},Re={command:`impersonation-registry`,describe:`Operations for impersonation-registry`,builder:e=>e.command(ke).command(je).command(Ne).command(Fe).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.usage(`$0 email-security investigate action-log get <investigate-id>
|
|
80
|
+
|
|
81
|
+
Returns the list of post-delivery actions (moves, quarantine releases, previews, etc.) that have been applied to a specific email message.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get <investigate-id>`,describe:`Get action log for a message`,builder:ze,handler:async c=>s({command:`email-security investigate action-log get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate action-log get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${c[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(c[`investigate-id`]))}/action_log`,pathParams:{"investigate-id":String(c[`investigate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.investigate.actionLog.get({account_id:l,investigate_id:c[`investigate-id`]})),{successLabel:`Loaded`})})},Ve={command:`action-log`,describe:`Operations for investigate.action-log`,builder:e=>e.command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.usage(`$0 email-security investigate bulk cancel create <job-id>
|
|
82
|
+
|
|
83
|
+
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:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`create <job-id>`,describe:`Cancel a bulk action job`,builder:He,handler:async c=>s({command:`email-security investigate bulk cancel create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate bulk cancel create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}/cancel`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.emailSecurity.investigate.bulk.cancel.create({account_id:l,job_id:c[`job-id`]})),{successLabel:`Created`})})},We={command:`cancel`,describe:`Operations for investigate.bulk.cancel`,builder:e=>e.command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ge(e){return e.usage(`$0 email-security investigate bulk create
|
|
84
|
+
|
|
85
|
+
Creates a new bulk action job to move or release messages that match the provided search parameters.`).option(`action`,{type:`string`,description:`The action field`,choices:[`MOVE`,`RELEASE`]}).option(`comment`,{type:`string`,description:`The comment field`}).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:`The search_params.alert_id field`}).option(`search-params-detections-only`,{type:`boolean`,description:`The search_params.detections_only field`,default:!0}).option(`search-params-domain`,{type:`string`,description:`The search_params.domain field`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`The search_params.exact_subject field`}).option(`search-params-message-action`,{type:`string`,description:`The search_params.message_action field`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`search-params-message-id`,{type:`string`,description:`The search_params.message_id field`}).option(`search-params-metric`,{type:`string`,description:`The search_params.metric field`}).option(`search-params-query`,{type:`string`,description:`The search_params.query field`}).option(`search-params-recipient`,{type:`string`,description:`The search_params.recipient field`}).option(`search-params-sender`,{type:`string`,description:`The search_params.sender field`}).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:`The search_params.subject field`}).option(`search-params-submissions`,{type:`boolean`,description:`The search_params.submissions field`,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 Ke={command:`create`,describe:`Create a bulk action job`,builder:Ge,handler:async l=>s({command:`email-security investigate bulk create`,classification:{safeFlags:[`action`,`search-params-action-log`,`search-params-detections-only`,`search-params-message-action`,`search-params-submissions`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security investigate bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({action:d(l.action,`action`,`text`),comment:d(l.comment,`comment`,`text`),search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),detections_only:l[`search-params-detections-only`],domain:d(l[`search-params-domain`],`search-params-domain`,`text`),end:d(l[`search-params-end`],`search-params-end`,`text`),exact_subject:d(l[`search-params-exact-subject`],`search-params-exact-subject`,`text`),message_action:d(l[`search-params-message-action`],`search-params-message-action`,`text`),message_id:d(l[`search-params-message-id`],`search-params-message-id`,`text`),metric:d(l[`search-params-metric`],`search-params-metric`,`text`),query:d(l[`search-params-query`],`search-params-query`,`text`),recipient:d(l[`search-params-recipient`],`search-params-recipient`,`text`),sender:d(l[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:d(l[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:d(l[`search-params-start`],`search-params-start`,`text`),subject:d(l[`search-params-subject`],`search-params-subject`,`text`),submissions:l[`search-params-submissions`]}}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.investigate.bulk.create({...e,account_id:f})),{successLabel:`Created`});return}l.action===void 0&&(l.action=await p(`action`,`The action field`,[`MOVE`,`RELEASE`]));let m=u({action:d(l.action,`action`,`text`),comment:d(l.comment,`comment`,`text`),search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),detections_only:l[`search-params-detections-only`],domain:d(l[`search-params-domain`],`search-params-domain`,`text`),end:d(l[`search-params-end`],`search-params-end`,`text`),exact_subject:d(l[`search-params-exact-subject`],`search-params-exact-subject`,`text`),message_action:d(l[`search-params-message-action`],`search-params-message-action`,`text`),message_id:d(l[`search-params-message-id`],`search-params-message-id`,`text`),metric:d(l[`search-params-metric`],`search-params-metric`,`text`),query:d(l[`search-params-query`],`search-params-query`,`text`),recipient:d(l[`search-params-recipient`],`search-params-recipient`,`text`),sender:d(l[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:d(l[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:d(l[`search-params-start`],`search-params-start`,`text`),subject:d(l[`search-params-subject`],`search-params-subject`,`text`),submissions:l[`search-params-submissions`]}});i(await o(`Creating`,async()=>s.emailSecurity.investigate.bulk.create({...m,account_id:f})),{successLabel:`Created`})})};function qe(e){return e.usage("$0 email-security investigate bulk 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:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Je={command:`delete <job-id>`,describe:`Delete a bulk action job`,builder:qe,handler:async c=>s({command:`email-security investigate bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the completed, cancelled, or failed bulk action job from all list and detail endpoints.`})){process.stderr.write(`Aborted.
|
|
86
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.investigate.bulk.delete({account_id:l,job_id:c[`job-id`]})),{successLabel:`Deleted`})})};function Ye(e){return e.usage(`$0 email-security investigate bulk get <job-id>
|
|
87
|
+
|
|
88
|
+
Returns the status and details of a specific bulk action job.`).positional(`job-id`,{type:`string`,description:`Job ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`get <job-id>`,describe:`Get bulk action job details`,builder:Ye,handler:async c=>s({command:`email-security investigate bulk get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate bulk get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.investigate.bulk.get({account_id:l,job_id:c[`job-id`]})),{successLabel:`Loaded`})})};function Ze(e){return e.usage(`$0 email-security investigate bulk list
|
|
89
|
+
|
|
90
|
+
Returns a paginated list of bulk action jobs for the account.`).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(`action-type`,{type:`string`,description:`Action type`,choices:[`MOVE`,`RELEASE`]}).option(`status`,{type:`string`,description:`Filter by job status.`,choices:[`PENDING`,`DISCOVERING`,`PROCESSING`,`COMPLETED`,`FAILED`,`CANCELLED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List bulk action jobs`,builder:h(Ze),handler:async c=>s({command:`email-security investigate bulk list`,classification:{safeFlags:[`action-type`,`status`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],action_type:c[`action-type`],status:c.status};if(c.dryRun){a({command:`cf email-security investigate bulk list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.investigate.bulk.list({account_id:u,...s})),{successLabel:`Loaded`})})};function $e(e){return e.usage(`$0 email-security investigate bulk messages list
|
|
91
|
+
|
|
92
|
+
Returns the individual messages associated with a bulk action job, including their processing status.`).option(`job-id`,{type:`string`,description:`Job ID`,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 by message 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 et={command:`list`,describe:`List messages for a bulk action job`,builder:h($e),handler:async c=>s({command:`email-security investigate bulk messages list`,classification:{safeFlags:[`status`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],status:c.status};if(c.dryRun){a({command:`cf email-security investigate bulk messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}/messages`,pathParams:{"job-id":String(c[`job-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.investigate.bulk.messages.list({account_id:u,job_id:c[`job-id`],...s})),{successLabel:`Loaded`})})},tt={command:`messages`,describe:`Operations for investigate.bulk.messages`,builder:e=>e.command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},nt={command:`bulk`,describe:`Operations for investigate.bulk`,builder:e=>e.command(Ke).command(Je).command(Xe).command(Qe).command(We).command(tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rt(e){return e.usage(`$0 email-security investigate detections get <investigate-id>
|
|
93
|
+
|
|
94
|
+
Returns detection details such as threat categories and sender information for non-benign messages.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get <investigate-id>`,describe:`Get message detection details`,builder:rt,handler:async c=>s({command:`email-security investigate detections get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate detections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${c[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(c[`investigate-id`]))}/detections`,pathParams:{"investigate-id":String(c[`investigate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.investigate.detections.get({account_id:l,investigate_id:c[`investigate-id`]})),{successLabel:`Loaded`})})},at={command:`detections`,describe:`Operations for investigate.detections`,builder:e=>e.command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ot(e){return e.usage(`$0 email-security investigate get <investigate-id>
|
|
95
|
+
|
|
96
|
+
Retrieves comprehensive details for a specific email message including headers, recipients, sender information, and current quarantine status. Use the investigate_id from search results to fetch detailed information.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`submission`,{type:`boolean`,description:`When true, search the submissions datastore only. When false or omitted, search the
|
|
97
|
+
regular datastore only.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const st={command:`get <investigate-id>`,describe:`Get message details`,builder:ot,handler:async c=>s({command:`email-security investigate get`,classification:{safeFlags:[`submission`,`dry-run`]}},c,async()=>{let s={submission:c.submission};if(c.dryRun){a({command:`cf email-security investigate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${c[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(c[`investigate-id`]))}`,pathParams:{"investigate-id":String(c[`investigate-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.investigate.get({account_id:u,investigate_id:c[`investigate-id`],...s})),{successLabel:`Loaded`})})};function ct(e){return e.usage(`$0 email-security investigate list
|
|
98
|
+
|
|
99
|
+
Returns information for each email that matches the search parameter(s).`).option(`start`,{type:`string`,description:"The beginning of the search date range. Defaults to `now - 30 days`. Must not be in the future."}).option(`end`,{type:`string`,description:"The end of the search date range. Defaults to `now`."}).option(`query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`}).option(`final-disposition`,{type:`string`,description:`Dispositions to filter by.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`metric`,{type:`string`,description:`Metric`}).option(`message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`recipient`,{type:`string`,description:`Recipient`}).option(`sender`,{type:`string`,description:`Sender`}).option(`smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`alert-id`,{type:`string`,description:`Alert ID`}).option(`domain`,{type:`string`,description:`Sender domains to filter by.`}).option(`message-id`,{type:`string`,description:`Message ID`}).option(`subject`,{type:`string`,description:`Subject`}).option(`delivery-status`,{type:`string`,description:`Delivery status to filter by.`,choices:[`delivered`,`moved`,`quarantined`,`rejected`,`deferred`,`bounced`,`queued`,`move_failed`]}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`page`,{type:`number`,description:`Deprecated: Use cursor pagination instead. End of life: November 1, 2026.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`list`,describe:`Search email messages`,builder:h(ct),handler:async c=>s({command:`email-security investigate list`,classification:{safeFlags:[`detections-only`,`final-disposition`,`message-action`,`delivery-status`,`dry-run`]}},c,async()=>{let s={start:c.start,end:c.end,query:c.query,detections_only:c[`detections-only`],final_disposition:c[`final-disposition`],metric:c.metric,message_action:c[`message-action`],recipient:c.recipient,sender:c.sender,smtp_helo_ip:c[`smtp-helo-ip`],alert_id:c[`alert-id`],domain:c.domain,message_id:c[`message-id`],subject:c.subject,delivery_status:c[`delivery-status`],cursor:c.cursor,per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf email-security investigate list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.investigate.list({account_id:u,...s})),{successLabel:`Loaded`})})};function ut(e){return e.usage(`$0 email-security investigate move bulk
|
|
100
|
+
|
|
101
|
+
Moves multiple messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration.`).option(`destination`,{type:`string`,description:`The destination field`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).option(`ids`,{type:`string`,array:!0,description:`List of message IDs to move.`}).option(`postfix-ids`,{type:`string`,array:!0,description:"Deprecated, use `ids` instead. End of life: November 1, 2026."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const dt={command:`bulk`,describe:`Move multiple messages`,builder:ut,handler:async l=>s({command:`email-security investigate move bulk`,classification:{safeFlags:[`destination`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security investigate move bulk`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/move`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({destination:d(l.destination,`destination`,`text`),ids:l.ids,postfix_ids:l[`postfix-ids`]}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.investigate.move.bulk({...e,account_id:f})),{successLabel:`Created`});return}l.destination===void 0&&(l.destination=await p(`destination`,`The destination field`,[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]));let m=u({destination:d(l.destination,`destination`,`text`),ids:l.ids,postfix_ids:l[`postfix-ids`]});i(await o(`Creating`,async()=>s.emailSecurity.investigate.move.bulk({...m,account_id:f})),{successLabel:`Created`})})};function ft(e){return e.usage(`$0 email-security investigate move create <investigate-id>
|
|
102
|
+
|
|
103
|
+
Moves a single message to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`destination`,{type:`string`,description:`The destination field`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pt={command:`create <investigate-id>`,describe:`Move a message`,builder:ft,handler:async l=>s({command:`email-security investigate move create`,classification:{safeFlags:[`destination`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security investigate move create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${l[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(l[`investigate-id`]))}/move`,pathParams:{"investigate-id":String(l[`investigate-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({destination:d(l.destination,`destination`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.investigate.move.create({...e,account_id:f,investigate_id:l[`investigate-id`]})),{successLabel:`Created`});return}l.destination===void 0&&(l.destination=await p(`destination`,`The destination field`,[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]));let m=u({destination:d(l.destination,`destination`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.investigate.move.create({...m,account_id:f,investigate_id:l[`investigate-id`]})),{successLabel:`Created`})})},mt={command:`move`,describe:`Operations for investigate.move`,builder:e=>e.command(dt).command(pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ht(e){return e.usage(`$0 email-security investigate preview create
|
|
104
|
+
|
|
105
|
+
Generates a preview image for a message that was not flagged as a detection. Useful for investigating benign messages. Returns a base64-encoded PNG screenshot of the email body.`).option(`postfix-id`,{type:`string`,description:`The identifier of the message.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gt={command:`create`,describe:`Preview for non-detection messages`,builder:ht,handler:async l=>s({command:`email-security investigate preview create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security investigate preview create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/preview`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({postfix_id:d(l[`postfix-id`],`postfix-id`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.investigate.preview.create({...e,account_id:p})),{successLabel:`Created`});return}l[`postfix-id`]===void 0&&(l[`postfix-id`]=await f(`postfix-id`,`The identifier of the message.`));let m=u({postfix_id:d(l[`postfix-id`],`postfix-id`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.investigate.preview.create({...m,account_id:p})),{successLabel:`Created`})})};function _t(e){return e.usage(`$0 email-security investigate preview get <investigate-id>
|
|
106
|
+
|
|
107
|
+
Returns a preview of the message body as a base64 encoded PNG image for non-benign messages.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`get <investigate-id>`,describe:`Get email preview`,builder:_t,handler:async c=>s({command:`email-security investigate preview get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate preview get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${c[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(c[`investigate-id`]))}/preview`,pathParams:{"investigate-id":String(c[`investigate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.investigate.preview.get({account_id:l,investigate_id:c[`investigate-id`]})),{successLabel:`Loaded`})})},yt={command:`preview`,describe:`Operations for investigate.preview`,builder:e=>e.command(gt).command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bt(e){return e.usage(`$0 email-security investigate raw get <investigate-id>
|
|
108
|
+
|
|
109
|
+
Returns the raw eml of any non-benign message.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xt={command:`get <investigate-id>`,describe:`Get raw email content`,builder:bt,handler:async c=>s({command:`email-security investigate raw get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${c[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(c[`investigate-id`]))}/raw`,pathParams:{"investigate-id":String(c[`investigate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.investigate.raw.get({account_id:l,investigate_id:c[`investigate-id`]})),{successLabel:`Loaded`})})},St={command:`raw`,describe:`Operations for investigate.raw`,builder:e=>e.command(xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ct(e){return e.usage(`$0 email-security investigate reclassify create <investigate-id>
|
|
110
|
+
|
|
111
|
+
Submits a request to reclassify an email's disposition. Use for reporting false positives or false negatives. Optionally provide the raw EML content for reanalysis. The reclassification is processed asynchronously.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`eml-content`,{type:`string`,description:`Base64 encoded content of the EML file.`}).option(`escalated-submission-id`,{type:`string`,description:`The escalated_submission_id field`}).option(`expected-disposition`,{type:`string`,description:`The expected_disposition field`,choices:[`NONE`,`BULK`,`MALICIOUS`,`SPAM`,`SPOOF`,`SUSPICIOUS`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const wt={command:`create <investigate-id>`,describe:`Change email classification`,builder:Ct,handler:async l=>s({command:`email-security investigate reclassify create`,classification:{safeFlags:[`expected-disposition`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security investigate reclassify create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${l[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(l[`investigate-id`]))}/reclassify`,pathParams:{"investigate-id":String(l[`investigate-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({eml_content:d(l[`eml-content`],`eml-content`,`text`),escalated_submission_id:d(l[`escalated-submission-id`],`escalated-submission-id`,`text`),expected_disposition:d(l[`expected-disposition`],`expected-disposition`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.investigate.reclassify.create({...e,account_id:f,investigate_id:l[`investigate-id`]})),{successLabel:`Created`});return}l[`expected-disposition`]===void 0&&(l[`expected-disposition`]=await p(`expected-disposition`,`The expected_disposition field`,[`NONE`,`BULK`,`MALICIOUS`,`SPAM`,`SPOOF`,`SUSPICIOUS`]));let m=u({eml_content:d(l[`eml-content`],`eml-content`,`text`),escalated_submission_id:d(l[`escalated-submission-id`],`escalated-submission-id`,`text`),expected_disposition:d(l[`expected-disposition`],`expected-disposition`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.investigate.reclassify.create({...m,account_id:f,investigate_id:l[`investigate-id`]})),{successLabel:`Created`})})},Tt={command:`reclassify`,describe:`Operations for investigate.reclassify`,builder:e=>e.command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Et(e){return e.usage(`$0 email-security investigate release bulk
|
|
112
|
+
|
|
113
|
+
Delivers one or more quarantined messages to their intended recipients, for cases where a message was incorrectly quarantined. The response includes delivery status for each recipient.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A list of investigate IDs identifying the messages to release.`})}const Dt={command:`bulk`,describe:`Release messages from quarantine`,builder:Et,handler:async l=>s({command:`email-security investigate release bulk`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security investigate release bulk`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/release`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.investigate.release.bulk({body:e,account_id:u})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ot={command:`release`,describe:`Operations for investigate.release`,builder:e=>e.command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kt(e){return e.usage(`$0 email-security investigate trace get <investigate-id>
|
|
114
|
+
|
|
115
|
+
Retrieves delivery and processing trace information for an email message. Shows the delivery path, retraction history, and move operations performed on the message. Useful for debugging delivery issues.`).positional(`investigate-id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const At={command:`get <investigate-id>`,describe:`Get email trace`,builder:kt,handler:async c=>s({command:`email-security investigate trace get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security investigate trace get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/investigate/${c[`investigate-id`]==null?`<investigate-id>`:encodeURIComponent(String(c[`investigate-id`]))}/trace`,pathParams:{"investigate-id":String(c[`investigate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.investigate.trace.get({account_id:l,investigate_id:c[`investigate-id`]})),{successLabel:`Loaded`})})},jt={command:`trace`,describe:`Operations for investigate.trace`,builder:e=>e.command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mt={command:`investigate`,describe:`Search and investigate email messages — view detections, traces, raw content, and take remediation actions`,builder:e=>e.command(st).command(lt).command(Ve).command(nt).command(at).command(mt).command(yt).command(St).command(Tt).command(Ot).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nt(e){return e.usage(`$0 email-security phishguard reports list
|
|
116
|
+
|
|
117
|
+
Retrieves PhishGuard security alert reports for a specified date range. Reports include detected threats, dispositions, and contextual information. Use for security monitoring and threat analysis.`).option(`start`,{type:`string`,description:`Start of the time range (RFC3339). Takes precedence over from_date.`}).option(`end`,{type:`string`,description:`End of the time range (RFC3339). Takes precedence over to_date.`}).option(`from-date`,{type:`string`,description:"Deprecated, use `start` instead. Start date in YYYY-MM-DD format."}).option(`to-date`,{type:`string`,description:"Deprecated, use `end` instead. End date in YYYY-MM-DD format."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pt={command:`list`,describe:`Get PhishGuard reports`,builder:Nt,handler:async c=>s({command:`email-security phishguard reports list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start:c.start,end:c.end,from_date:c[`from-date`],to_date:c[`to-date`]};if(c.dryRun){a({command:`cf email-security phishguard reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/phishguard/reports`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.phishguard.reports.list({account_id:u,...s})),{successLabel:`Loaded`})})},Ft={command:`reports`,describe:`Operations for phishguard.reports`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},It={command:`phishguard`,describe:`PhishGuard user-reported phishing submissions and analysis reports`,builder:e=>e.command(Ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lt(e){return e.usage(`$0 email-security sending-domain-restrictions create
|
|
118
|
+
|
|
119
|
+
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 Rt={command:`create`,describe:`Create a sending domain restriction`,builder:Lt,handler:async l=>s({command:`email-security sending-domain-restrictions create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security sending-domain-restrictions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/sending_domain_restrictions`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),domain:d(l.domain,`domain`,`text`),exclude:l.exclude}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.sendingDomainRestrictions.create({...e,account_id:p})),{successLabel:`Created`});return}if(l.domain===void 0&&(l.domain=await f(`domain`,`Domain that requires TLS enforcement.`)),l.exclude===void 0)throw Error(`--exclude is required (or pass --body with this field set).`);let m=u({comments:d(l.comments,`comments`,`text`),domain:d(l.domain,`domain`,`text`),exclude:l.exclude});i(await o(`Creating`,async()=>s.emailSecurity.sendingDomainRestrictions.create({...m,account_id:p})),{successLabel:`Created`})})};function zt(e){return e.usage(`$0 email-security sending-domain-restrictions delete <sending-domain-restriction-id>
|
|
120
|
+
|
|
121
|
+
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 Bt={command:`delete <sending-domain-restriction-id>`,describe:`Delete a sending domain restriction`,builder:zt,handler:async c=>s({command:`email-security sending-domain-restrictions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security sending-domain-restrictions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/sending_domain_restrictions/${c[`sending-domain-restriction-id`]==null?`<sending-domain-restriction-id>`:encodeURIComponent(String(c[`sending-domain-restriction-id`]))}`,pathParams:{"sending-domain-restriction-id":String(c[`sending-domain-restriction-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation deletes the sending domain restriction and removes TLS enforcement for emails from this domain.`})){process.stderr.write(`Aborted.
|
|
122
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.sendingDomainRestrictions.delete({account_id:l,sending_domain_restriction_id:c[`sending-domain-restriction-id`]})),{successLabel:`Deleted`})})};function Vt(e){return e.usage(`$0 email-security sending-domain-restrictions edit <sending-domain-restriction-id>
|
|
123
|
+
|
|
124
|
+
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 Ht={command:`edit <sending-domain-restriction-id>`,describe:`Update a sending domain restriction`,builder:Vt,handler:async l=>s({command:`email-security sending-domain-restrictions edit`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security sending-domain-restrictions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/sending_domain_restrictions/${l[`sending-domain-restriction-id`]==null?`<sending-domain-restriction-id>`:encodeURIComponent(String(l[`sending-domain-restriction-id`]))}`,pathParams:{"sending-domain-restriction-id":String(l[`sending-domain-restriction-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),domain:d(l.domain,`domain`,`text`),exclude:l.exclude}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.sendingDomainRestrictions.edit({...e,account_id:f,sending_domain_restriction_id:l[`sending-domain-restriction-id`]})),{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),domain:d(l.domain,`domain`,`text`),exclude:l.exclude});i(await o(`Updating`,async()=>s.emailSecurity.sendingDomainRestrictions.edit({...p,account_id:f,sending_domain_restriction_id:l[`sending-domain-restriction-id`]})),{successLabel:`Updated`})})};function Ut(e){return e.usage(`$0 email-security sending-domain-restrictions get <sending-domain-restriction-id>
|
|
125
|
+
|
|
126
|
+
Retrieves details for a specific sending domain restriction including the domain requiring TLS and any excluded subdomains exempt from the TLS requirement.`).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})}const Wt={command:`get <sending-domain-restriction-id>`,describe:`Get a sending domain restriction`,builder:Ut,handler:async c=>s({command:`email-security sending-domain-restrictions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security sending-domain-restrictions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/sending_domain_restrictions/${c[`sending-domain-restriction-id`]==null?`<sending-domain-restriction-id>`:encodeURIComponent(String(c[`sending-domain-restriction-id`]))}`,pathParams:{"sending-domain-restriction-id":String(c[`sending-domain-restriction-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.sendingDomainRestrictions.get({account_id:l,sending_domain_restriction_id:c[`sending-domain-restriction-id`]})),{successLabel:`Loaded`})})};function Gt(e){return e.usage(`$0 email-security sending-domain-restrictions list
|
|
127
|
+
|
|
128
|
+
Returns a paginated list of sending domain restrictions. These restrictions enforce TLS requirements for emails from specific domains. Mail without TLS from restricted domains will be dropped unless the subdomain is in the exclude list. Supports sorting and searching.`).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:[`domain`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kt={command:`list`,describe:`List sending domain restrictions`,builder:h(Gt),handler:async c=>s({command:`email-security sending-domain-restrictions list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction};if(c.dryRun){a({command:`cf email-security sending-domain-restrictions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/sending_domain_restrictions`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.sendingDomainRestrictions.list({account_id:u,...s})),{successLabel:`Loaded`})})},qt={command:`sending-domain-restrictions`,describe:`Operations for sending-domain-restrictions`,builder:e=>e.command(Rt).command(Bt).command(Ht).command(Wt).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jt(e){return e.usage(`$0 email-security submissions list
|
|
129
|
+
|
|
130
|
+
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:`Type`,choices:[`TEAM`,`USER`]}).option(`submission-id`,{type:`string`,description:`Submission ID`}).option(`original-disposition`,{type:`string`,description:`Original disposition`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`requested-disposition`,{type:`string`,description:`Requested disposition`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`outcome-disposition`,{type:`string`,description:`Outcome disposition`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`status`,{type:`string`,description:`Status`}).option(`query`,{type:`string`,description:`Query`}).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 Yt={command:`list`,describe:`Get reclassify submissions`,builder:h(Jt),handler:async c=>s({command:`email-security submissions list`,classification:{safeFlags:[`type`,`original-disposition`,`requested-disposition`,`outcome-disposition`,`escalated-from-user`,`order`,`direction`,`dry-run`]}},c,async()=>{let s={start:c.start,end:c.end,type:c.type,submission_id:c[`submission-id`],original_disposition:c[`original-disposition`],requested_disposition:c[`requested-disposition`],outcome_disposition:c[`outcome-disposition`],status:c.status,query:c.query,escalated_from_user:c[`escalated-from-user`],order:c.order,direction:c.direction,page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf email-security submissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/submissions`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.submissions.list({account_id:u,...s})),{successLabel:`Loaded`})})},Xt={command:`submissions`,describe:`User and admin email submissions for classification review`,builder:e=>e.command(Yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zt(e){return e.usage(`$0 email-security trusted-domains batch
|
|
131
|
+
|
|
132
|
+
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:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 Qt={command:`batch`,describe:`Batch trusted domains operations`,builder:Zt,handler:async d=>s({command:`email-security trusted-domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security trusted-domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.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.
|
|
133
|
+
`);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.trustedDomains.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.trustedDomains.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function $t(e){return e.usage(`$0 email-security trusted-domains create
|
|
134
|
+
|
|
135
|
+
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:`The is_regex field`}).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 pattern field`}).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 en={command:`create`,describe:`Create trusted email domain`,builder:$t,handler:async l=>s({command:`email-security trusted-domains create`,classification:{safeFlags:[`is-recent`,`is-regex`,`is-similarity`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security trusted-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_recent:l[`is-recent`],is_regex:l[`is-regex`],is_similarity:l[`is-similarity`],pattern:d(l.pattern,`pattern`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.trustedDomains.create({body:e,account_id:p})),{successLabel:`Created`});return}if(l[`is-recent`]===void 0)throw Error(`--is-recent is required (or pass --body with this field set).`);if(l[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(l[`is-similarity`]===void 0)throw Error(`--is-similarity is required (or pass --body with this field set).`);l.pattern===void 0&&(l.pattern=await f(`pattern`,`The pattern field`));let m=u({comments:d(l.comments,`comments`,`text`),is_recent:l[`is-recent`],is_regex:l[`is-regex`],is_similarity:l[`is-similarity`],pattern:d(l.pattern,`pattern`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.trustedDomains.create({body:m,account_id:p})),{successLabel:`Created`})})};function tn(e){return e.usage(`$0 email-security trusted-domains delete <trusted-domain-id>
|
|
136
|
+
|
|
137
|
+
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 nn={command:`delete <trusted-domain-id>`,describe:`Delete a trusted email domain`,builder:tn,handler:async c=>s({command:`email-security trusted-domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security trusted-domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains/${c[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(c[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(c[`trusted-domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation deletes the trusted domain pattern and restores normal recent domain and similarity checks for matching emails.`})){process.stderr.write(`Aborted.
|
|
138
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.trustedDomains.delete({account_id:l,trusted_domain_id:c[`trusted-domain-id`]})),{successLabel:`Deleted`})})};function rn(e){return e.usage(`$0 email-security trusted-domains edit <trusted-domain-id>
|
|
139
|
+
|
|
140
|
+
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:`The is_regex field`}).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 pattern field`}).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 an={command:`edit <trusted-domain-id>`,describe:`Update a trusted email domain`,builder:rn,handler:async l=>s({command:`email-security trusted-domains edit`,classification:{safeFlags:[`is-recent`,`is-regex`,`is-similarity`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security trusted-domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains/${l[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(l[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(l[`trusted-domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_recent:l[`is-recent`],is_regex:l[`is-regex`],is_similarity:l[`is-similarity`],pattern:d(l.pattern,`pattern`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.trustedDomains.edit({body:e,account_id:f,trusted_domain_id:l[`trusted-domain-id`]})),{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),is_recent:l[`is-recent`],is_regex:l[`is-regex`],is_similarity:l[`is-similarity`],pattern:d(l.pattern,`pattern`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.trustedDomains.edit({body:p,account_id:f,trusted_domain_id:l[`trusted-domain-id`]})),{successLabel:`Updated`})})};function on(e){return e.usage(`$0 email-security trusted-domains get <trusted-domain-id>
|
|
141
|
+
|
|
142
|
+
Retrieves details for a specific trusted domain pattern including its pattern value, whether it uses regex matching, and which detection types it affects.`).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})}const sn={command:`get <trusted-domain-id>`,describe:`Get a trusted email domain`,builder:on,handler:async c=>s({command:`email-security trusted-domains get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security trusted-domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains/${c[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(c[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(c[`trusted-domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.trustedDomains.get({account_id:l,trusted_domain_id:c[`trusted-domain-id`]})),{successLabel:`Loaded`})})};function cn(e){return e.usage(`$0 email-security trusted-domains list
|
|
143
|
+
|
|
144
|
+
Returns a paginated list of trusted domain patterns. Trusted domains prevent false positives for recently registered domains and lookalike domain detections. Patterns can use regular expressions for flexible matching.`).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:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`is-recent`,{type:`boolean`,description:`Filter to show only recently registered domains that are trusted to prevent triggering Suspicious or Malicious dispositions.`}).option(`is-similarity`,{type:`boolean`,description:`Filter to show only proximity domains (partner or approved domains with similar spelling to connected domains) that prevent Spoof dispositions.`}).option(`pattern`,{type:`string`,description:`Pattern`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`List trusted email domains`,builder:h(cn),handler:async c=>s({command:`email-security trusted-domains list`,classification:{safeFlags:[`order`,`direction`,`is-recent`,`is-similarity`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,is_recent:c[`is-recent`],is_similarity:c[`is-similarity`],pattern:c.pattern};if(c.dryRun){a({command:`cf email-security trusted-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.trustedDomains.list({account_id:u,...s})),{successLabel:`Loaded`})})};function ln(e){return e.usage(`$0 email-security trusted-domains update <trusted-domain-id>
|
|
145
|
+
|
|
146
|
+
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:`The is_regex field`}).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 pattern field`}).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 un={command:`update <trusted-domain-id>`,describe:`Replace a trusted email domain`,builder:ln,handler:async l=>s({command:`email-security trusted-domains update`,classification:{safeFlags:[`is-recent`,`is-regex`,`is-similarity`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security trusted-domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/trusted_domains/${l[`trusted-domain-id`]==null?`<trusted-domain-id>`:encodeURIComponent(String(l[`trusted-domain-id`]))}`,pathParams:{"trusted-domain-id":String(l[`trusted-domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),is_recent:l[`is-recent`],is_regex:l[`is-regex`],is_similarity:l[`is-similarity`],pattern:d(l.pattern,`pattern`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.trustedDomains.update({body:e,account_id:p,trusted_domain_id:l[`trusted-domain-id`]})),{successLabel:`Updated`});return}if(l[`is-recent`]===void 0)throw Error(`--is-recent is required (or pass --body with this field set).`);if(l[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(l[`is-similarity`]===void 0)throw Error(`--is-similarity is required (or pass --body with this field set).`);l.pattern===void 0&&(l.pattern=await f(`pattern`,`The pattern field`));let m=u({comments:d(l.comments,`comments`,`text`),is_recent:l[`is-recent`],is_regex:l[`is-regex`],is_similarity:l[`is-similarity`],pattern:d(l.pattern,`pattern`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.trustedDomains.update({body:m,account_id:p,trusted_domain_id:l[`trusted-domain-id`]})),{successLabel:`Updated`})})},dn={command:`trusted-domains`,describe:`Operations for trusted-domains`,builder:e=>e.command(Qt).command(en).command(nn).command(an).command(sn).command($).command(un).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function fn(e){return e.usage(`$0 email-security url-ignore-patterns batch
|
|
147
|
+
|
|
148
|
+
Sends a batch of URL ignore patterns API calls to execute together.`).option(`deletes`,{type:`string`,description:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 pn={command:`batch`,describe:`Batch URL ignore patterns`,builder:fn,handler:async d=>s({command:`email-security url-ignore-patterns batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf email-security url-ignore-patterns batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/url_ignore_patterns/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.force,message:`This operation may delete the selected URL rewrite ignore patterns and cause matching URLs to be rewritten again.`})){process.stderr.write(`Aborted.
|
|
149
|
+
`);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.emailSecurity.urlIgnorePatterns.batch({...e,account_id:f})),{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)});i(await o(`Deleting`,async()=>s.emailSecurity.urlIgnorePatterns.batch({...p,account_id:f})),{successLabel:`Deleted`})})};function mn(e){return e.usage(`$0 email-security url-ignore-patterns create
|
|
150
|
+
|
|
151
|
+
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 hn={command:`create`,describe:`Create a URL ignore pattern`,builder:mn,handler:async l=>s({command:`email-security url-ignore-patterns create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security url-ignore-patterns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/url_ignore_patterns`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),pattern:d(l.pattern,`pattern`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.emailSecurity.urlIgnorePatterns.create({body:e,account_id:p})),{successLabel:`Created`});return}l.pattern===void 0&&(l.pattern=await f(`pattern`,`Regular expression identifying URLs to exempt from rewriting.`));let m=u({comments:d(l.comments,`comments`,`text`),pattern:d(l.pattern,`pattern`,`text`)});i(await o(`Creating`,async()=>s.emailSecurity.urlIgnorePatterns.create({body:m,account_id:p})),{successLabel:`Created`})})};function gn(e){return e.usage(`$0 email-security url-ignore-patterns delete <pattern-id>
|
|
152
|
+
|
|
153
|
+
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 _n={command:`delete <pattern-id>`,describe:`Delete a URL ignore pattern`,builder:gn,handler:async c=>s({command:`email-security url-ignore-patterns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf email-security url-ignore-patterns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/url_ignore_patterns/${c[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(c[`pattern-id`]))}`,pathParams:{"pattern-id":String(c[`pattern-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation deletes the URL rewrite ignore pattern and causes matching URLs to be rewritten again.`})){process.stderr.write(`Aborted.
|
|
154
|
+
`);return}i(await o(`Deleting`,async()=>s.emailSecurity.urlIgnorePatterns.delete({account_id:l,pattern_id:c[`pattern-id`]})),{successLabel:`Deleted`})})};function vn(e){return e.usage(`$0 email-security url-ignore-patterns edit <pattern-id>
|
|
155
|
+
|
|
156
|
+
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 yn={command:`edit <pattern-id>`,describe:`Update a URL ignore pattern`,builder:vn,handler:async l=>s({command:`email-security url-ignore-patterns edit`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf email-security url-ignore-patterns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/url_ignore_patterns/${l[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(l[`pattern-id`]))}`,pathParams:{"pattern-id":String(l[`pattern-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),pattern:d(l.pattern,`pattern`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.emailSecurity.urlIgnorePatterns.edit({body:e,account_id:f,pattern_id:l[`pattern-id`]})),{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),pattern:d(l.pattern,`pattern`,`text`)});i(await o(`Updating`,async()=>s.emailSecurity.urlIgnorePatterns.edit({body:p,account_id:f,pattern_id:l[`pattern-id`]})),{successLabel:`Updated`})})};function bn(e){return e.usage(`$0 email-security url-ignore-patterns get <pattern-id>
|
|
157
|
+
|
|
158
|
+
Returns a single URL rewrite ignore pattern by its identifier.`).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})}const xn={command:`get <pattern-id>`,describe:`Get a URL ignore pattern`,builder:bn,handler:async c=>s({command:`email-security url-ignore-patterns get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf email-security url-ignore-patterns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/url_ignore_patterns/${c[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(c[`pattern-id`]))}`,pathParams:{"pattern-id":String(c[`pattern-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.emailSecurity.urlIgnorePatterns.get({account_id:l,pattern_id:c[`pattern-id`]})),{successLabel:`Loaded`})})};function Sn(e){return e.usage(`$0 email-security url-ignore-patterns list
|
|
159
|
+
|
|
160
|
+
Returns a paginated list of URL rewrite ignore patterns for the account. URLs matching these patterns will not be rewritten.`).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 Cn={command:`list`,describe:`List URL ignore patterns`,builder:Sn,handler:async c=>s({command:`email-security url-ignore-patterns list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf email-security url-ignore-patterns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email-security/settings/url_ignore_patterns`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.emailSecurity.urlIgnorePatterns.list({account_id:u,...s})),{successLabel:`Loaded`})})},wn={command:`url-ignore-patterns`,describe:`Operations for url-ignore-patterns`,builder:e=>e.command(pn).command(hn).command(_n).command(yn).command(xn).command(Cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tn={command:`email-security`,describe:`Cloud email security — investigate threats, manage allow/block policies, and detect phishing`,builder:e=>e.command(O).command(M).command(q).command(le).command(De).command(Re).command(Mt).command(It).command(qt).command(Xt).command(dn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Tn as default};
|