cf 1.0.0-beta.12 → 1.0.0-beta.14
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 +4648 -3810
- package/dist/_meta/hand-written-commands.json +356 -23
- package/dist/_meta/schemas.json +2522 -2143
- package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
- package/dist/access-k1QjF5rE.mjs +2 -0
- package/dist/account-tags-RhvWOkOf.mjs +15 -0
- package/dist/{accounts-BSd4b-1j.mjs → accounts--3lrEkmu.mjs} +67 -80
- package/dist/{acm-BfI0p2sX.mjs → acm-BJxINEcu.mjs} +2 -2
- package/dist/{addressing-lfeJf7YB.mjs → addressing-BqByG9JW.mjs} +55 -43
- package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
- package/dist/{ai-jFzFBANM.mjs → ai-CRkQ4pjC.mjs} +18 -16
- package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
- package/dist/ai-gateway-CbhvQK4L.mjs +80 -0
- package/dist/ai-search-CvVSnOA0.mjs +79 -0
- package/dist/{ai-security-CKGE547U.mjs → ai-security-Z_qpI92I.mjs} +1 -1
- package/dist/{alerting-CuxoqG3S.mjs → alerting-CpbCB8br.mjs} +5 -5
- package/dist/analytics-DkY9dOP1.mjs +17 -0
- package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
- package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BHnOU5MM.mjs} +25 -25
- package/dist/argo-DhC5L_aN.mjs +14 -0
- package/dist/{artifacts-BS6cEqCB.mjs → artifacts-CrIupY7P.mjs} +3 -3
- package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-BjeBxTox.mjs} +1 -1
- package/dist/{auth-CKotxfap.mjs → auth-BNYfOMl0.mjs} +1 -1
- package/dist/{auth-AobvBmz4.mjs → auth-CAWalgW0.mjs} +1 -1
- package/dist/auth-DOwC01PW.mjs +2 -0
- package/dist/{auth-token-CtguMdmF.mjs → auth-token-Dop0wLCw.mjs} +1 -1
- package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-RQ3HS4m1.mjs} +151 -151
- package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
- package/dist/{billing-CDMc4tvX.mjs → billing-BFyte9fL.mjs} +3 -3
- package/dist/bot-management-DXcbV3am.mjs +9 -0
- package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
- package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-DN36XkxH.mjs} +2 -2
- package/dist/browser-run-hHD1RT43.mjs +42 -0
- package/dist/build-BhpWYgNm.mjs +2 -0
- package/dist/{build-BKPVP5ip.mjs → build-CCe7IrWT.mjs} +1 -1
- package/dist/{builds-BG5DHqU3.mjs → builds-6aO61R9R.mjs} +4 -4
- package/dist/{cache-C05hHXUp.mjs → cache-C5YJpMqi.mjs} +6 -6
- package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
- package/dist/cf-oRSQKirD.mjs +18 -0
- package/dist/chunk-DSGVRFIS-CPI5cYtB.mjs +2 -0
- package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Civns3WA.mjs} +3 -3
- package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
- package/dist/{cli-D9qlPB-6.mjs → cli-ht4q6i2y.mjs} +1 -1
- package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-balaN_my.mjs} +1 -1
- package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
- package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-avx27sLw.mjs} +1 -1
- package/dist/cloudflared-D83U8Yn3.mjs +2 -0
- package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CXdeqJ9l.mjs} +143 -185
- package/dist/{command-VuxpEvmH.mjs → command-9VAc7b30.mjs} +1 -1
- package/dist/{command-CUkXxZsc.mjs → command-B_Ixlz8Q.mjs} +1 -1
- package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
- package/dist/{command-DBaNgfA4.mjs → command-BtDY_MKv.mjs} +1 -1
- package/dist/command-CUNMrMou.mjs +2 -0
- package/dist/{command-SS1z_t68.mjs → command-Ckb9FufU.mjs} +1 -1
- package/dist/{command-BWlpCtHe.mjs → command-CtVUNm__.mjs} +1 -1
- package/dist/{command-DyE8v4sd.mjs → command-CyJQ40fc.mjs} +1 -1
- package/dist/{command-BlGILcTA.mjs → command-DPX9sJVi.mjs} +1 -1
- package/dist/{command-CXxh5Hce.mjs → command-DXaRn1ls.mjs} +1 -1
- package/dist/{command-CRl00uA2.mjs → command-DjEJaOwV.mjs} +1 -1
- package/dist/{command-Rv2MR-eh.mjs → command-DtgJilOK.mjs} +1 -1
- package/dist/{command-CKQlxypn.mjs → command-OHov3PEc.mjs} +1 -1
- package/dist/{command-DEQSv-S1.mjs → command-OWe3v69l.mjs} +1 -1
- package/dist/{command-BQpXcGKV.mjs → command-SmWD-MeI.mjs} +1 -1
- package/dist/{completions-lf50FBGm.mjs → completions-CuqAO3N_.mjs} +11 -11
- package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
- package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
- package/dist/{connectors-0UwPUav-.mjs → connectors-6lVSr-fd.mjs} +1 -1
- package/dist/containers-Dqs_ZnO2.mjs +78 -0
- package/dist/containers-ncw3bd3a.mjs +376 -0
- package/dist/{content-scan-COyTz0Wb.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
- package/dist/{context-Bwkz4Lm_.mjs → context-BBLtgdR1.mjs} +2 -2
- package/dist/cps-C5phNoVU.mjs +6 -0
- package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
- package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
- package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
- package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
- package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-wGtmFbz1.mjs} +4 -4
- package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
- package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
- package/dist/d1-EQMUlHTJ.mjs +94 -0
- package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
- package/dist/deploy-B22sEVHd.mjs +2 -0
- package/dist/deploy-context-DmG9rgPO.mjs +56 -0
- package/dist/deploy-input-BCjcuP6u.mjs +2 -0
- package/dist/{dev-D8FGPKRt.mjs → dev-ClhhXuNU.mjs} +1 -1
- package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
- package/dist/dialog-D4Y9ocuF.mjs +2 -0
- package/dist/dist-DmRM6WSZ.mjs +449 -0
- package/dist/dist-uRuGmkMB.mjs +60 -0
- package/dist/{dls-8D00tqvC.mjs → dls-BEHj4X9T.mjs} +1 -1
- package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
- package/dist/{dns-C-A5pwf3.mjs → dns-n4mfYBZg.mjs} +7 -7
- package/dist/dry-run-DRj2_uV3.mjs +2 -0
- package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
- package/dist/{email-auth-v97Md32E.mjs → email-auth-DOi6yOt3.mjs} +1 -1
- package/dist/{email-routing-I29RG4hb.mjs → email-routing-WcSPt22u.mjs} +5 -5
- package/dist/{email-security-BCarmbky.mjs → email-security-BXu3OGay.mjs} +15 -15
- package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-B9zTlIjt.mjs} +2 -2
- package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
- package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
- package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
- package/dist/{firewall-DpgFqJr3.mjs → firewall-CRtYO0Ha.mjs} +7 -7
- package/dist/{flagship-BVaXXlsX.mjs → flagship-DvTFZSay.mjs} +3 -3
- package/dist/{fraud-B5GQdEF2.mjs → fraud-uSyibsit.mjs} +5 -5
- package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
- package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
- package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
- package/dist/{hostnames-DhrGRFeI.mjs → hostnames-DvaUSzsj.mjs} +1 -1
- package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
- package/dist/{iam-sRKDU2Z3.mjs → iam-Dl3cU9GI.mjs} +1 -1
- package/dist/{images-DXdekLVs.mjs → images-C2OkI1j7.mjs} +6 -6
- package/dist/index.mjs +1 -1
- package/dist/init-Da8pe296.mjs +43 -0
- package/dist/{intel-CnVeSjIS.mjs → intel-DoB1g_K7.mjs} +2 -2
- package/dist/interactive-BW9T1D1q.mjs +48 -0
- package/dist/interactive-DGUWZ2Gk.mjs +2 -0
- package/dist/{ips-COCUG8mk.mjs → ips-BRt68epr.mjs} +1 -1
- package/dist/k2-_eq5ZY2t.mjs +11 -0
- package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
- package/dist/{keys-CDZreums.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
- package/dist/{kv-DkpKVimq.mjs → kv-BTYCXKML.mjs} +4 -4
- package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
- package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
- package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
- package/dist/{local-C0lQ9sTg.mjs → local-BcPM4I0s.mjs} +1 -1
- package/dist/local-BundUuDT.mjs +2 -0
- package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
- package/dist/{login-DeOM4v0L.mjs → login-BBYC_BtH.mjs} +1 -1
- package/dist/{login-BrjOuHKu.mjs → login-D2uoWhWh.mjs} +1 -1
- package/dist/{logo-matches-CF8321pb.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
- package/dist/{logos-Bd8xNRKW.mjs → logos-X5B8z7Iv.mjs} +1 -1
- package/dist/{logpush-BYk3qqwY.mjs → logpush-C2ENi1et.mjs} +7 -7
- package/dist/{logs-Jcj2NN8H.mjs → logs-BKDz7kBW.mjs} +1 -1
- package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
- package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
- package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
- package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
- package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
- package/dist/{matches-BtKqG8T9.mjs → matches-rPMLS3Ip.mjs} +1 -1
- package/dist/mcp-DXUMvEWt.mjs +32 -0
- package/dist/mesh-MmBCQ37q.mjs +26 -0
- package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
- package/dist/{monetization-pLalYYMI.mjs → monetization-DQE5VtUO.mjs} +2 -2
- package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-DwkEb-Hy.mjs} +2 -2
- package/dist/{network-DrJxPWXQ.mjs → network-BcfobxQY.mjs} +1 -1
- package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -11
- package/dist/o11y-BBv7nedp.mjs +93 -0
- package/dist/{oauth-B08YQ4xq.mjs → oauth-BUr8bPwo.mjs} +1 -1
- package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
- package/dist/{oauth-TGbM1Q0V.mjs → oauth-n8um6MFk.mjs} +1 -1
- package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
- package/dist/organization-CJeOVWH7.mjs +71 -0
- package/dist/{organizations-Dk0D9ukm.mjs → organizations-BpfoqZcG.mjs} +1 -1
- package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
- package/dist/origin-post-quantum-encryption-CM-If38w.mjs +6 -0
- package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +3 -3
- package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
- package/dist/{page-rules-BKaU37cM.mjs → page-rules-DOeekMrj.mjs} +4 -4
- package/dist/pages-Bn0Sg1ay.mjs +54 -0
- package/dist/pay-per-crawl-qJpseNNx.mjs +38 -0
- package/dist/pay-per-use-C1MWKJ4O.mjs +33 -0
- package/dist/pipelines-rCwXQw6S.mjs +44 -0
- package/dist/{precursor-DmQ32-Sp.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
- package/dist/previews-BEheHO3T.mjs +4 -0
- package/dist/process-2wmDCy17.mjs +2 -0
- package/dist/{progress-BYVZuEcG.mjs → progress-CQqDtgmF.mjs} +1 -1
- package/dist/prompt-C8FyienX.mjs +3 -0
- package/dist/{queries-DPBkVynK.mjs → queries-DJ8looyq.mjs} +1 -1
- package/dist/{queues-CCXRs98q.mjs → queues-BBH9Q-Tt.mjs} +7 -7
- package/dist/{r2-BKuBSW8h.mjs → r2-CdJKpP2w.mjs} +52 -49
- package/dist/{radar-Gv1yFoRX.mjs → radar-CdvQL4xm.mjs} +1 -1
- package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
- package/dist/{realtime-CVl-rvgx.mjs → realtime-onrXppzh.mjs} +9 -9
- package/dist/{registrar-swlnh22i.mjs → registrar-CbEBc5IE.mjs} +2 -2
- package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
- package/dist/{registry-C20J1MW0.mjs → registry-PI6sO95I.mjs} +1 -1
- package/dist/{reporting-Bgwsvol1.mjs → reporting-bXZY6obP.mjs} +1 -1
- package/dist/{request-headers-CUee83pa.mjs → request-headers-D8L95bEQ.mjs} +1 -1
- package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-CihskC2A.mjs} +1 -1
- package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
- package/dist/resolve-DCGSzUDQ.mjs +2 -0
- package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-DDqcCHVs.mjs} +11 -11
- package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-D63RpBce.mjs} +1 -1
- package/dist/{rules-BDunCGMj.mjs → rules-CAW0-Wde.mjs} +1 -1
- package/dist/rulesets-CPir63Qc.mjs +37 -0
- package/dist/{rum-B7XiECe9.mjs → rum-BfwTcuup.mjs} +1 -1
- package/dist/{run-CrZgB8L_.mjs → run-CW2Cgi0S.mjs} +1 -1
- package/dist/run-DEynXvCc.mjs +2 -0
- package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
- package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BTItUu1K.mjs} +1 -1
- package/dist/{scim-CORcs2wK.mjs → scim-CtZ1FeQE.mjs} +1 -1
- package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-BIuBYUJT.mjs} +2 -2
- package/dist/{security-insights-DblK_6sg.mjs → security-insights-DfUus0bs.mjs} +3 -3
- package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
- package/dist/{session-BWe9et4K.mjs → session-BcM8Vyyx.mjs} +1 -1
- package/dist/shared-CpS23WwR.mjs +2 -0
- package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
- package/dist/{snippets-BFN-Lg3K.mjs → snippets-DLO3iFAg.mjs} +1 -1
- package/dist/spawn-D07wH-MH.mjs +10 -0
- package/dist/{spectrum-HYWLWB0X.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
- package/dist/{speed-Dj0YhfRe.mjs → speed-DX5X2EIR.mjs} +1 -1
- package/dist/sql-CF044HDW.mjs +4 -0
- package/dist/src-BMATTZU_.mjs +125 -0
- package/dist/{ssl-BQL1fNtD.mjs → ssl-CM-rChEC.mjs} +5 -5
- package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
- package/dist/startup-profile-D662WI9s.mjs +2 -0
- package/dist/state-D7uNYnoi.mjs +2 -0
- package/dist/{state-Dy6-rKNd.mjs → state-DIiIGEtR.mjs} +1 -1
- package/dist/{stream-DKv2TtZN.mjs → stream-5EmUOQvy.mjs} +5 -5
- package/dist/{submit-Byt2KBGI.mjs → submit-lEAaRSMR.mjs} +1 -1
- package/dist/{tags-BIBsdG68.mjs → tags-CX23P4jg.mjs} +1 -1
- package/dist/telemetry-0Y5hAtCX.mjs +2 -0
- package/dist/{telemetry-bu3txnIR.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
- package/dist/{tenant-Bs4Ac4n3.mjs → tenant-DnI7QziH.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
- package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
- package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-NzYpsfi_.mjs} +15 -15
- package/dist/{turnstile-2MIGp2ce.mjs → turnstile-M7sKCEz3.mjs} +11 -11
- package/dist/{update-check-CfB0PNTY.mjs → update-check-HFkPml6x.mjs} +1 -1
- package/dist/update-check-aTutXNRd.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-B8udoxlx.mjs → url-info-Dos9VOXV.mjs} +1 -1
- package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
- package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-B7quLPGW.mjs} +2 -2
- package/dist/{user-BLZ-0Bgv.mjs → user-rXca0J9M.mjs} +14 -14
- package/dist/values-D-rrZrDa.mjs +4 -0
- package/dist/{vectorize-DEUSEQXY.mjs → vectorize-D2tf_oA8.mjs} +4 -4
- package/dist/version-BGnqDvNR.mjs +2 -0
- package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
- package/dist/{web-assets-CLZdWOmN.mjs → web-assets-DQAfvPT9.mjs} +3 -3
- package/dist/{web3-DjeavuLg.mjs → web3-MI0GQDnu.mjs} +5 -5
- package/dist/workers-By6Pf8fv.mjs +40 -0
- package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
- package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-DL8fC1qR.mjs} +4 -6
- package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
- package/dist/workflows-ByQLnV0E.mjs +52 -0
- package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
- package/dist/{zaraz-BvQZB0YY.mjs → zaraz-CgbpmA85.mjs} +1 -1
- package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CpjTkkWt.mjs} +418 -402
- package/dist/{zone-tymlghWb.mjs → zone-DnKIe6po.mjs} +1 -1
- package/dist/{zones-Bz6dgT9_.mjs → zones--5ZzsDmQ.mjs} +15 -15
- package/package.json +25 -26
- package/dist/abuse-reports-Cy9RcWPu.mjs +0 -24
- package/dist/access-DwJm1qet.mjs +0 -2
- package/dist/account-tags-d0RkEw6s.mjs +0 -15
- package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
- package/dist/ai-search-PTlpY1T9.mjs +0 -79
- package/dist/analytics-NPND7aHB.mjs +0 -20
- package/dist/argo-DYfLQhd2.mjs +0 -10
- package/dist/auth-CBtzZ3Sw.mjs +0 -2
- package/dist/bot-management-UrCM3P8K.mjs +0 -9
- package/dist/browser-run-DVaiBLYX.mjs +0 -46
- package/dist/build-C4giET85.mjs +0 -2
- package/dist/cf-B9aqZZKD.mjs +0 -18
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
- package/dist/cloudflared-B48cfu95.mjs +0 -2
- package/dist/command-CzvlHvov.mjs +0 -2
- package/dist/containers-DRzgE46U.mjs +0 -375
- package/dist/containers-DuIsM7lM.mjs +0 -78
- package/dist/cps-B7_BJaAU.mjs +0 -6
- package/dist/d1-MvAQMvvo.mjs +0 -89
- package/dist/deploy-BS47vZvJ.mjs +0 -2
- package/dist/deploy-context-Cfushp8j.mjs +0 -56
- package/dist/deploy-input-BAhS5LYx.mjs +0 -2
- package/dist/diagnostics-ChDfJ-Gv.mjs +0 -15
- package/dist/dialog-CL1Zy4pn.mjs +0 -2
- package/dist/dist-8rP3V95o.mjs +0 -57
- package/dist/dist-CYFkGHYv.mjs +0 -487
- package/dist/dry-run-DmsbOMF1.mjs +0 -2
- package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
- package/dist/hyperdrive-DAA8Fazg.mjs +0 -37
- package/dist/init-j47MT4Qe.mjs +0 -39
- package/dist/interactive-Dqv0RWVU.mjs +0 -42
- package/dist/interactive-Wpd3FcDc.mjs +0 -2
- package/dist/k2-CmHkArHL.mjs +0 -13
- package/dist/load-balancers-C5YMvhXD.mjs +0 -76
- package/dist/local-D5L5Bwju.mjs +0 -2
- package/dist/mcp-QDd1Iyc0.mjs +0 -32
- package/dist/mesh-DtrIzl5z.mjs +0 -26
- package/dist/observability-CvN9oxAo.mjs +0 -80
- package/dist/organization-DIwqRBBV.mjs +0 -75
- package/dist/origin-post-quantum-encryption-BOKWKDTY.mjs +0 -6
- package/dist/pages-2Xg-lrMf.mjs +0 -54
- package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
- package/dist/pay-per-use-sGebKzNK.mjs +0 -6
- package/dist/pipelines-BM-T7mMK.mjs +0 -44
- package/dist/previews-DDQ9ACDJ.mjs +0 -4
- package/dist/prompt-F5wxc8zq.mjs +0 -3
- package/dist/raw-fetch-DyYWa923.mjs +0 -2
- package/dist/resolve-qwL1LmKN.mjs +0 -2
- package/dist/rulesets-BMGxrnv9.mjs +0 -37
- package/dist/run-nNxXb_Cv.mjs +0 -2
- package/dist/shared-0N31BXkY.mjs +0 -2
- package/dist/spawn-DZ9A-xXb.mjs +0 -10
- package/dist/src-CAiZlihY.mjs +0 -117
- package/dist/startup-profile-CXnsF4c7.mjs +0 -2
- package/dist/state-BA2CanJ_.mjs +0 -2
- package/dist/telemetry-DBXOMuLh.mjs +0 -2
- package/dist/update-check-B-CvDAUz.mjs +0 -2
- package/dist/values-BUK-m0Jg.mjs +0 -4
- package/dist/version-BZNc7Y3t.mjs +0 -2
- package/dist/waiting-rooms-BycGk2Y0.mjs +0 -53
- package/dist/workers-C_SfyU-v.mjs +0 -38
- package/dist/workers-vpc-CKts8Av0.mjs +0 -13
- package/dist/workflows-BibtWuOx.mjs +0 -43
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-C8FyienX.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function g(e){return e.usage(`$0 email-security allow-policies batch
|
|
3
3
|
|
|
4
4
|
Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`batch`,describe:`Batch allow policy operations`,builder:g,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){let e=await n();a({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();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
5
|
`);return}if(d.body){let e=c(d.body),t=await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...e,account_id:f}));i(t,{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`)}),h=await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...p,account_id:f}));i(h,{successLabel:`Deleted`})})};function te(e){return e.usage(`$0 email-security allow-policies create
|
|
6
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:te,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){let e=await n();a({command:`cf email-security allow-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:
|
|
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`]}).coerce(`pattern-type`,e=>d(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const _={command:`create`,describe:`Create email allow policy`,builder:te,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){let e=await n();a({command:`cf email-security allow-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:l[`pattern-type`],verify_sender:l[`verify-sender`]}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.allowPolicies.create({body:e,account_id:m}));i(t,{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:l[`pattern-type`],verify_sender:l[`verify-sender`]}),g=await o(`Creating`,async()=>s.emailSecurity.allowPolicies.create({body:h,account_id:m}));i(g,{successLabel:`Created`})})};function v(e){return e.usage(`$0 email-security allow-policies delete <policy-id>
|
|
8
8
|
|
|
9
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){let e=await n();a({command:`cf email-security allow-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();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
10
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.delete({account_id:l,policy_id:c[`policy-id`]}));i(u,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 email-security allow-policies edit <policy-id>
|
|
11
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){let e=await n();a({command:`cf email-security allow-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:
|
|
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`]}).coerce(`pattern-type`,e=>d(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an allow policy.`})}const 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){let e=await n();a({command:`cf email-security allow-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:l[`pattern-type`],verify_sender:l[`verify-sender`]}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.allowPolicies.edit({body:e,account_id:f,policy_id:l[`policy-id`]}));i(t,{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:l[`pattern-type`],verify_sender:l[`verify-sender`]}),m=await o(`Updating`,async()=>s.emailSecurity.allowPolicies.edit({body:p,account_id:f,policy_id:l[`policy-id`]}));i(m,{successLabel:`Updated`})})};function S(e){return e.usage(`$0 email-security allow-policies get <policy-id>
|
|
13
13
|
|
|
14
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){let e=await n();a({command:`cf email-security allow-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.allowPolicies.get({account_id:l,policy_id:c[`policy-id`]}));i(u,{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 email-security allow-policies list
|
|
15
15
|
|
|
16
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:`Filter by pattern type.`,choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Filter by exact pattern value.`}).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){let e=await n();a({command:`cf email-security allow-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.allowPolicies.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 email-security allow-policies update <policy-id>
|
|
17
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){let e=await n();a({command:`cf email-security allow-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:
|
|
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`]}).coerce(`pattern-type`,e=>d(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const 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){let e=await n();a({command:`cf email-security allow-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:l[`pattern-type`],verify_sender:l[`verify-sender`]}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.allowPolicies.update({body:e,account_id:m,policy_id:l[`policy-id`]}));i(t,{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:l[`pattern-type`],verify_sender:l[`verify-sender`]}),g=await o(`Updating`,async()=>s.emailSecurity.allowPolicies.update({body:h,account_id:m,policy_id:l[`policy-id`]}));i(g,{successLabel:`Updated`})})},O={command:`allow-policies`,describe:`Operations for allow-policies`,builder:e=>e.command(ee).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
19
|
|
|
20
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){let e=await n();a({command:`cf email-security analytics monthly-report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/analytics/monthly_report`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.analytics.monthlyReport.get({account_id:l}));i(u,{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:`Analytics and reporting — monthly report and per-day breakdowns of threat activity`,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
21
|
|
|
22
22
|
Executes multiple blocked sender operations atomically: delete, partially update, replace, and create blocked sender patterns in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the blocked sender patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Blocked sender patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`batch`,describe:`Batch blocked sender 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){let e=await n();a({command:`cf email-security block-senders batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();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
23
|
`);return}if(d.body){let e=c(d.body),t=await o(`Deleting`,async()=>s.emailSecurity.blockSenders.batch({...e,account_id:f}));i(t,{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`)}),h=await o(`Deleting`,async()=>s.emailSecurity.blockSenders.batch({...p,account_id:f}));i(h,{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 email-security block-senders create
|
|
24
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:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).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){let e=await n();a({command:`cf email-security block-senders create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:
|
|
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:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>d(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const 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){let e=await n();a({command:`cf email-security block-senders create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:l[`pattern-type`]}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.blockSenders.create({body:e,account_id:m}));i(t,{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:l[`pattern-type`]}),g=await o(`Creating`,async()=>s.emailSecurity.blockSenders.create({body:h,account_id:m}));i(g,{successLabel:`Created`})})};function L(e){return e.usage(`$0 email-security block-senders delete <pattern-id>
|
|
26
26
|
|
|
27
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){let e=await n();a({command:`cf email-security block-senders delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();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
28
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.blockSenders.delete({account_id:l,pattern_id:c[`pattern-id`]}));i(u,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 email-security block-senders edit <pattern-id>
|
|
29
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:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).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){let e=await n();a({command:`cf email-security block-senders edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:
|
|
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:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>d(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a blocked sender pattern.`})}const 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){let e=await n();a({command:`cf email-security block-senders edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:l[`pattern-type`]}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.blockSenders.edit({body:e,account_id:f,pattern_id:l[`pattern-id`]}));i(t,{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:l[`pattern-type`]}),m=await o(`Updating`,async()=>s.emailSecurity.blockSenders.edit({body:p,account_id:f,pattern_id:l[`pattern-id`]}));i(m,{successLabel:`Updated`})})};function V(e){return e.usage(`$0 email-security block-senders get <pattern-id>
|
|
31
31
|
|
|
32
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){let e=await n();a({command:`cf email-security block-senders get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.blockSenders.get({account_id:l,pattern_id:c[`pattern-id`]}));i(u,{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 email-security block-senders list
|
|
33
33
|
|
|
34
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){let e=await n();a({command:`cf email-security block-senders list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.blockSenders.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 email-security block-senders update <pattern-id>
|
|
35
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:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).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){let e=await n();a({command:`cf email-security block-senders update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:
|
|
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:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>d(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const 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){let e=await n();a({command:`cf email-security block-senders update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:l[`pattern-type`]}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.blockSenders.update({body:e,account_id:m,pattern_id:l[`pattern-id`]}));i(t,{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:l[`pattern-type`]}),g=await o(`Updating`,async()=>s.emailSecurity.blockSenders.update({body:h,account_id:m,pattern_id:l[`pattern-id`]}));i(g,{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 bulk-actions cancel <job-id>
|
|
37
37
|
|
|
38
38
|
Cancels the job, marking it as cancelled and stopping any pending message processing. The job record remains visible in list and detail endpoints.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job to cancel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`cancel <job-id>`,describe:`Cancel a bulk action job`,builder:J,handler:async c=>s({command:`email-security bulk-actions cancel`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.emailSecurity.bulkActions.cancel({account_id:l,job_id:c[`job-id`]}));i(u,{successLabel:`Created`})})};function X(e){return e.usage(`$0 email-security bulk-actions create
|
|
39
39
|
|
|
40
|
-
Creates a new bulk action job to move or release messages that match the provided search parameters. To move or release an explicit list of known messages instead of a search, use the move or release endpoints.`).option(`action`,{type:`string`,description:`The action the job performs on every message matching the search parameters.`,choices:[`MOVE`,`RELEASE`]}).option(`comment`,{type:`string`,description:`Optional note describing the job.`}).option(`search-params-action-log`,{type:`boolean`,description:"Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.",default:!1}).option(`search-params-alert-id`,{type:`string`,description:`Alert ID of the detection to filter by.`}).option(`search-params-detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`,default:!0}).option(`search-params-domain`,{type:`string`,description:`Match messages that mention this domain — sender domain, recipient domain, or a domain in a link.`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`Match messages whose subject line equals this value exactly.`}).option(`search-params-message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`search-params-message-id`,{type:`string`,description:`Message-ID header value to filter by.`}).option(`search-params-metric`,{type:`string`,description:`Metric name to filter the search by.`}).option(`search-params-query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`search-params-recipient`,{type:`string`,description:`Match messages whose recipient is this email address or domain.`}).option(`search-params-sender`,{type:`string`,description:`Match messages whose sender is this email address or domain.`}).option(`search-params-smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`search-params-start`,{type:`string`,description:`Beginning of search date range.`}).option(`search-params-subject`,{type:`string`,description:`Match messages whose subject contains these keywords, in any order.`}).option(`search-params-submissions`,{type:`boolean`,description:`Whether to search reclassification submissions instead of original messages.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Create a bulk action job`,builder:X,handler:async l=>s({command:`email-security bulk-actions 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){let e=await n();a({command:`cf email-security bulk-actions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({action:
|
|
40
|
+
Creates a new bulk action job to move or release messages that match the provided search parameters. To move or release an explicit list of known messages instead of a search, use the move or release endpoints.`).option(`action`,{type:`string`,description:`The action the job performs on every message matching the search parameters.`,choices:[`MOVE`,`RELEASE`]}).coerce(`action`,e=>d(e,`action`,`text`)).option(`comment`,{type:`string`,description:`Optional note describing the job.`}).option(`destination`,{type:`string`,description:`Required when action is 'MOVE'.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).coerce(`destination`,e=>d(e,`destination`,`text`)).option(`expected-disposition`,{type:`string`,description:`Nonfunctional field. End of life: December 1, 2026.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`expected-disposition`,e=>d(e,`expected-disposition`,`text`)).option(`search-params-action-log`,{type:`boolean`,description:"Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.",default:!1}).option(`search-params-alert-id`,{type:`string`,description:`Alert ID of the detection to filter by.`}).option(`search-params-delivery-status`,{type:`string`,description:`Delivery status to filter by.`,choices:[`delivered`,`moved`,`quarantined`,`rejected`,`deferred`,`bounced`,`queued`,`move_failed`]}).coerce(`search-params-delivery-status`,e=>d(e,`search-params-delivery-status`,`text`)).option(`search-params-detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`,default:!0}).option(`search-params-domain`,{type:`string`,description:`Match messages that mention this domain — sender domain, recipient domain, or a domain in a link.`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`Match messages whose subject line equals this value exactly.`}).option(`search-params-final-disposition`,{type:`string`,description:`Dispositions to filter by.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`search-params-final-disposition`,e=>d(e,`search-params-final-disposition`,`text`)).option(`search-params-message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).coerce(`search-params-message-action`,e=>d(e,`search-params-message-action`,`text`)).option(`search-params-message-id`,{type:`string`,description:`Message-ID header value to filter by.`}).option(`search-params-metric`,{type:`string`,description:`Metric name to filter the search by.`}).option(`search-params-query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`search-params-recipient`,{type:`string`,description:`Match messages whose recipient is this email address or domain.`}).option(`search-params-sender`,{type:`string`,description:`Match messages whose sender is this email address or domain.`}).option(`search-params-smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`search-params-start`,{type:`string`,description:`Beginning of search date range.`}).option(`search-params-subject`,{type:`string`,description:`Match messages whose subject contains these keywords, in any order.`}).option(`search-params-submissions`,{type:`boolean`,description:`Whether to search reclassification submissions instead of original messages.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Create a bulk action job`,builder:X,handler:async l=>s({command:`email-security bulk-actions create`,classification:{safeFlags:[`action`,`destination`,`expected-disposition`,`search-params-action-log`,`search-params-delivery-status`,`search-params-detections-only`,`search-params-final-disposition`,`search-params-message-action`,`search-params-submissions`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security bulk-actions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({action:l.action,comment:d(l.comment,`comment`,`text`),destination:l.destination,expected_disposition:l[`expected-disposition`],search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:l[`search-params-delivery-status`],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`),final_disposition:l[`search-params-final-disposition`],message_action:l[`search-params-message-action`],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 t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.bulkActions.create({...e,account_id:f}));i(t,{successLabel:`Created`});return}l.action===void 0&&(l.action=await p(`action`,`The action the job performs on every message matching the search parameters.`,[`MOVE`,`RELEASE`]));let m=u({action:l.action,comment:d(l.comment,`comment`,`text`),destination:l.destination,expected_disposition:l[`expected-disposition`],search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:l[`search-params-delivery-status`],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`),final_disposition:l[`search-params-final-disposition`],message_action:l[`search-params-message-action`],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`]}}),h=await o(`Creating`,async()=>s.emailSecurity.bulkActions.create({...m,account_id:f}));i(h,{successLabel:`Created`})})};function Q(e){return e.usage("$0 email-security bulk-actions delete <job-id>\n\nDeletes the job, removing it from all list and detail endpoints. Only jobs in a terminal state (`COMPLETED`, `CANCELLED`, or `FAILED`) can be deleted. To stop an in-progress job without removing it, use the cancel endpoint instead.").positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <job-id>`,describe:`Delete a bulk action job`,builder:Q,handler:async c=>s({command:`email-security bulk-actions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();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.
|
|
41
41
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.bulkActions.delete({account_id:l,job_id:c[`job-id`]}));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 email-security bulk-actions get <job-id>
|
|
42
42
|
|
|
43
43
|
Returns the status and details of a specific bulk action job.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <job-id>`,describe:`Get bulk action job details`,builder:re,handler:async c=>s({command:`email-security bulk-actions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.bulkActions.get({account_id:l,job_id:c[`job-id`]}));i(u,{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 email-security bulk-actions list
|
|
@@ -63,27 +63,27 @@ Returns a paginated list of content policies. These policies match against the s
|
|
|
63
63
|
Executes multiple domain operations in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the domains to remove protection from. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the domain's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Domains to add protection for. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the domain's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`batch`,describe:`Batch domain operations`,builder:we,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){let e=await n();a({command:`cf email-security domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();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.
|
|
64
64
|
`);return}if(d.body){let e=c(d.body),t=await o(`Deleting`,async()=>s.emailSecurity.domains.batch({...e,account_id:f}));i(t,{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`)}),h=await o(`Deleting`,async()=>s.emailSecurity.domains.batch({...p,account_id:f}));i(h,{successLabel:`Deleted`})})};function Ee(e){return e.usage(`$0 email-security domains create
|
|
65
65
|
|
|
66
|
-
Protects a new email domain by adding it to Email Security. Accepts a flat configuration object covering all delivery modes. Returns the newly created domain configuration.`).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`domain`,{type:`string`,description:`The email domain to protect.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`create`,describe:`Add a new email domain`,builder:Ee,handler:async l=>s({command:`email-security domains create`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:e,account_id:p}));i(t,{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 email domain to protect.`)),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`)}),h=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function Oe(e){return e.usage(`$0 email-security domains delete <domain-id>
|
|
66
|
+
Protects a new email domain by adding it to Email Security. Accepts a flat configuration object covering all delivery modes. Returns the newly created domain configuration.`).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`domain`,{type:`string`,description:`The email domain to protect.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).coerce(`folder`,e=>d(e,`folder`,`text`)).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`create`,describe:`Add a new email domain`,builder:Ee,handler:async l=>s({command:`email-security domains create`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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`],folder:l.folder,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 t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:e,account_id:p}));i(t,{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 email domain to protect.`)),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`],folder:l.folder,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`)}),h=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function Oe(e){return e.usage(`$0 email-security domains delete <domain-id>
|
|
67
67
|
|
|
68
68
|
Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ke={command:`delete <domain-id>`,describe:`Unprotect an email domain`,builder:Oe,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){let e=await n();a({command:`cf email-security domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();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.
|
|
69
69
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.domains.delete({account_id:l,domain_id:c[`domain-id`]}));i(u,{successLabel:`Deleted`})})};function Ae(e){return e.usage(`$0 email-security domains edit <domain-id>
|
|
70
70
|
|
|
71
|
-
Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`edit <domain-id>`,describe:`Update an email domain`,builder:Ae,handler:async l=>s({command:`email-security domains edit`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Me(e){return e.usage(`$0 email-security domains get <domain-id>
|
|
71
|
+
Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).coerce(`folder`,e=>d(e,`folder`,`text`)).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`edit <domain-id>`,describe:`Update an email domain`,builder:Ae,handler:async l=>s({command:`email-security domains edit`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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`],folder:l.folder,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 t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{successLabel:`Updated`});return}let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],folder:l.folder,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`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Me(e){return e.usage(`$0 email-security domains get <domain-id>
|
|
72
72
|
|
|
73
73
|
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 Ne={command:`get <domain-id>`,describe:`Get an email domain`,builder:Me,handler:async c=>s({command:`email-security domains get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.domains.get({account_id:l,domain_id:c[`domain-id`]}));i(u,{successLabel:`Loaded`})})};function Pe(e){return e.usage(`$0 email-security domains list
|
|
74
74
|
|
|
75
75
|
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 Fe={command:`list`,describe:`List protected email domains`,builder:h(Pe),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){let e=await n();a({command:`cf email-security domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.domains.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function Ie(e){return e.usage(`$0 email-security domains update <domain-id>
|
|
76
76
|
|
|
77
|
-
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:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for replacing an email domain. The `domain` field is intentionally absent — the domain name is immutable after creation. "})}const Le={command:`update <domain-id>`,describe:`Replace an email domain`,builder:Ie,handler:async l=>s({command:`email-security domains update`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Re(e){return e.usage(`$0 email-security domains verification get <domain-id>
|
|
77
|
+
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:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).coerce(`folder`,e=>d(e,`folder`,`text`)).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for replacing an email domain. The `domain` field is intentionally absent — the domain name is immutable after creation. "})}const Le={command:`update <domain-id>`,describe:`Replace an email domain`,builder:Ie,handler:async l=>s({command:`email-security domains update`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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`],folder:l.folder,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 t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{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`],folder:l.folder,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`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Re(e){return e.usage(`$0 email-security domains verification get <domain-id>
|
|
78
78
|
|
|
79
79
|
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 ze={command:`get <domain-id>`,describe:`Get domain verification details`,builder:Re,handler:async c=>s({command:`email-security domains verification get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security domains verification get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.domains.verification.get({account_id:l,domain_id:c[`domain-id`]}));i(u,{successLabel:`Loaded`})})},Be={command:`verification`,describe:`Operations for domains.verification`,builder:e=>e.command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(Te).command(De).command(ke).command(je).command(Ne).command(Fe).command(Le).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.usage(`$0 email-security impersonation-registry create
|
|
80
80
|
|
|
81
|
-
Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching.`).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`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 Ue={command:`create`,describe:`Create impersonation registry entry`,builder:He,handler:async l=>s({command:`email-security impersonation-registry create`,classification:{safeFlags:[`is-email-regex`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}if(l.email===void 0&&(l.email=await f(`email`,`Email address (or pattern) of the protected identity.`)),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`,`Display name of the protected identity.`));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`)}),h=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function We(e){return e.usage(`$0 email-security impersonation-registry delete <impersonation-registry-id>
|
|
81
|
+
Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching.`).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`provenance`,{type:`string`,description:`Source the entry was created from.`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).coerce(`provenance`,e=>d(e,`provenance`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an impersonation registry entry.`})}const Ue={command:`create`,describe:`Create impersonation registry entry`,builder:He,handler:async l=>s({command:`email-security impersonation-registry create`,classification:{safeFlags:[`is-email-regex`,`provenance`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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`),provenance:l.provenance}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}if(l.email===void 0&&(l.email=await f(`email`,`Email address (or pattern) of the protected identity.`)),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`,`Display name of the protected identity.`));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`),provenance:l.provenance}),h=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function We(e){return e.usage(`$0 email-security impersonation-registry delete <impersonation-registry-id>
|
|
82
82
|
|
|
83
83
|
Removes an entry from the impersonation registry. After deletion, this identity will no longer be protected from impersonation.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ge={command:`delete <impersonation-registry-id>`,describe:`Delete an impersonation registry entry`,builder:We,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){let e=await n();a({command:`cf email-security impersonation-registry delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();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.
|
|
84
84
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.impersonationRegistry.delete({account_id:l,impersonation_registry_id:c[`impersonation-registry-id`]}));i(u,{successLabel:`Deleted`})})};function Ke(e){return e.usage(`$0 email-security impersonation-registry edit <impersonation-registry-id>
|
|
85
85
|
|
|
86
|
-
Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`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 qe={command:`edit <impersonation-registry-id>`,describe:`Update an impersonation registry entry`,builder:Ke,handler:async l=>s({command:`email-security impersonation-registry edit`,classification:{safeFlags:[`is-email-regex`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...e,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...p,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(m,{successLabel:`Updated`})})};function Je(e){return e.usage(`$0 email-security impersonation-registry get <impersonation-registry-id>
|
|
86
|
+
Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`provenance`,{type:`string`,description:`Source the entry was created from.`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).coerce(`provenance`,e=>d(e,`provenance`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an impersonation registry entry.`})}const qe={command:`edit <impersonation-registry-id>`,describe:`Update an impersonation registry entry`,builder:Ke,handler:async l=>s({command:`email-security impersonation-registry edit`,classification:{safeFlags:[`is-email-regex`,`provenance`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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`),provenance:l.provenance}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...e,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(t,{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`),provenance:l.provenance}),m=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...p,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(m,{successLabel:`Updated`})})};function Je(e){return e.usage(`$0 email-security impersonation-registry get <impersonation-registry-id>
|
|
87
87
|
|
|
88
88
|
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 Ye={command:`get <impersonation-registry-id>`,describe:`Get an impersonation registry entry`,builder:Je,handler:async c=>s({command:`email-security impersonation-registry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security impersonation-registry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.impersonationRegistry.get({account_id:l,impersonation_registry_id:c[`impersonation-registry-id`]}));i(u,{successLabel:`Loaded`})})};function Xe(e){return e.usage(`$0 email-security impersonation-registry list
|
|
89
89
|
|
|
@@ -98,7 +98,7 @@ regular datastore only.`}).option(`dry-run`,{type:`boolean`,description:`Validat
|
|
|
98
98
|
|
|
99
99
|
Returns information for each email that matches the provided search parameters.`).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 term matched case-insensitively against message metadata — sender, recipient, subject, attachment names and hashes, and message ID.`}).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 to aggregate the results by.`}).option(`message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`recipient`,{type:`string`,description:`Filter by recipient. Matches an email address or a domain.`}).option(`sender`,{type:`string`,description:`Filter by sender. Matches an email address or a domain.`}).option(`smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`alert-id`,{type:`string`,description:`Filter by alert ID.`}).option(`domain`,{type:`string`,description:`Filter by a domain found in the email — sender domain, recipient domain, or a domain in a link.`}).option(`message-id`,{type:`string`,description:`Filter by the RFC 5322 Message-ID header.`}).option(`subject`,{type:`string`,description:`Search for messages containing individual keywords in any order within the 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:"Pagination cursor from the previous response's `result_info`."}).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 ct={command:`list`,describe:`Search email messages`,builder:h(st),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){let e=await n();a({command:`cf email-security investigate list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.investigate.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function lt(e){return e.usage(`$0 email-security investigate move
|
|
100
100
|
|
|
101
|
-
Moves one or more messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. Operates on an explicit list of messages; to move all messages matching a search, create a bulk action job instead.`).option(`destination`,{type:`string`,description:`The mailbox folder to move messages to.`,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 ut={command:`move`,describe:`Move messages`,builder:lt,handler:async l=>s({command:`email-security investigate move`,classification:{safeFlags:[`destination`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security investigate move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/move`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({destination:
|
|
101
|
+
Moves one or more messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. Operates on an explicit list of messages; to move all messages matching a search, create a bulk action job instead.`).option(`destination`,{type:`string`,description:`The mailbox folder to move messages to.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).coerce(`destination`,e=>d(e,`destination`,`text`)).option(`expected-disposition`,{type:`string`,description:`Nonfunctional field. End of life: December 1, 2026.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).coerce(`expected-disposition`,e=>d(e,`expected-disposition`,`text`)).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 ut={command:`move`,describe:`Move messages`,builder:lt,handler:async l=>s({command:`email-security investigate move`,classification:{safeFlags:[`destination`,`expected-disposition`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security investigate move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/move`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({destination:l.destination,expected_disposition:l[`expected-disposition`],ids:l.ids,postfix_ids:l[`postfix-ids`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.investigate.move({...e,account_id:d}));i(t,{successLabel:`Created`});return}if(l.destination===void 0&&(l.destination=await p(`destination`,`The mailbox folder to move messages to.`,[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`])),l.ids===void 0)throw Error(`--ids is required (or pass --body with this field set).`);let f=u({destination:l.destination,expected_disposition:l[`expected-disposition`],ids:l.ids,postfix_ids:l[`postfix-ids`]}),m=await o(`Creating`,async()=>s.emailSecurity.investigate.move({...f,account_id:d}));i(m,{successLabel:`Created`})})};function dt(e){return e.usage(`$0 email-security investigate preview generate
|
|
102
102
|
|
|
103
103
|
Generates a preview image for a message that was not flagged as a detection. The message is rendered from the copy in the recipient's mailbox, so this requires an active integration and only works while the message is still in the recipient's inbox. Returns a base64-encoded PNG screenshot of the email body. For messages with a detection, use the detection preview endpoint instead.`).option(`id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ft={command:`generate`,describe:`Generate preview for a non-detection message`,builder:dt,handler:async l=>s({command:`email-security investigate preview generate`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security investigate preview generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/preview`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({id:d(l.id,`id`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.investigate.preview.generate({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.id===void 0&&(l.id=await f(`id`,`Unique identifier for a message retrieved from investigation.`));let m=u({id:d(l.id,`id`,`text`)}),h=await o(`Creating`,async()=>s.emailSecurity.investigate.preview.generate({...m,account_id:p}));i(h,{successLabel:`Created`})})};function pt(e){return e.usage(`$0 email-security investigate preview get <investigate-id>
|
|
104
104
|
|
|
@@ -123,7 +123,7 @@ Retrieves details for a specific sending domain restriction including the domain
|
|
|
123
123
|
|
|
124
124
|
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 Rt={command:`list`,describe:`List sending domain restrictions`,builder:h(Lt),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){let e=await n();a({command:`cf email-security sending-domain-restrictions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/sending_domain_restrictions`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.sendingDomainRestrictions.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},zt={command:`sending-domain-restrictions`,describe:`Operations for sending-domain-restrictions`,builder:e=>e.command(At).command(Mt).command(Pt).command(It).command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bt(e){return e.usage(`$0 email-security submissions create
|
|
125
125
|
|
|
126
|
-
Submits messages for reclassification or to report missed detections.`).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`reclassification`,`missed_detection`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vt={command:`create`,describe:`Create new submissions`,builder:Bt,handler:async
|
|
126
|
+
Submits messages for reclassification or to report missed detections.`).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`reclassification`,`missed_detection`]}).coerce(`type`,e=>d(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vt={command:`create`,describe:`Create new submissions`,builder:Bt,handler:async d=>s({command:`email-security submissions create`,classification:{safeFlags:[`type`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf email-security submissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/submissions`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({messages:l(d.messages,`messages`),type:d.type}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.emailSecurity.submissions.create({body:e,account_id:f}));i(t,{successLabel:`Created`});return}if(d.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);d.type===void 0&&(d.type=await p(`type`,`The type field`,[`reclassification`,`missed_detection`]));let m=u({messages:l(d.messages,`messages`),type:d.type}),h=await o(`Creating`,async()=>s.emailSecurity.submissions.create({body:m,account_id:f}));i(h,{successLabel:`Created`})})};function Ht(e){return e.usage(`$0 email-security submissions list
|
|
127
127
|
|
|
128
128
|
Returns information for submissions made to reclassify emails. Shows the status, outcome, and disposition changes for reclassification requests made by users or the security team. Useful for tracking false positive/negative reports.`).option(`start`,{type:`string`,description:"The beginning of the search date range. Defaults to `now - 30 days`."}).option(`end`,{type:`string`,description:"The end of the search date range. Defaults to `now`."}).option(`type`,{type:`string`,description:"Filter by who created the submission — `TEAM` for security team members or `USER` for end users.",choices:[`TEAM`,`USER`]}).option(`submission-id`,{type:`string`,description:`Filter by a specific submission ID.`}).option(`original-disposition`,{type:`string`,description:`The disposition a message is submitted to have.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`requested-disposition`,{type:`string`,description:`The disposition a message is submitted to have.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`outcome-disposition`,{type:`string`,description:`The disposition a message is submitted to have.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`status`,{type:`string`,description:"Filter by review status — `escalated`, `reviewed`, or `unreviewed`."}).option(`query`,{type:`string`,description:`Search term for filtering submissions.`}).option(`escalated-from-user`,{type:`boolean`,description:`When true, return only submissions that were escalated by an end user (vs. by the security team). When false, return only submissions that were not escalated by an end user. When omitted, no filter is applied.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`submission_id`,`subject`,`original_disposition`,`requested_disposition`,`outcome_disposition`,`requested_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ut={command:`list`,describe:`List reclassify submissions`,builder:h(Ht),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){let e=await n();a({command:`cf email-security submissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/submissions`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.submissions.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},Wt={command:`submissions`,describe:`Reclassify submissions — track user and team reports of false positives and missed detections`,builder:e=>e.command(Vt).command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gt(e){return e.usage(`$0 email-security trusted-domains batch
|
|
129
129
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-C8FyienX.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function ee(e){return e.usage(`$0 email-sending get <message-id>
|
|
3
3
|
|
|
4
4
|
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <message-id>`,describe:`Fetch an email message`,builder:ee,handler:async r=>c({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/messages/${r[`message-id`]==null?`<message-id>`:encodeURIComponent(String(r[`message-id`]))}`,pathParams:{"message-id":String(r[`message-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.emailSending.get({account_id:l,message_id:r[`message-id`]}));a(u,{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 email-sending limits get
|
|
5
5
|
|
|
@@ -33,7 +33,7 @@ this subdomain drops that recipient and still delivers to the
|
|
|
33
33
|
rest, instead of failing the entire request.
|
|
34
34
|
`}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const q={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:K,handler:async e=>c({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.emailSending.subdomains.update({body:t,zone_id:i,subdomain_id:e[`subdomain-id`]}));a(r,{successLabel:`Updated`});return}let c=d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}),u=await s(`Updating`,async()=>n.emailSending.subdomains.update({body:c,zone_id:i,subdomain_id:e[`subdomain-id`]}));a(u,{successLabel:`Updated`})})},J={command:`subdomains`,describe:`Configure sending subdomains and keep their DNS records healthy`,builder:e=>e.command(O).command(A).command(z).command(B).command(H).command(q).command(L).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.usage(`$0 email-sending suppressions create
|
|
35
35
|
|
|
36
|
-
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`scope-type`,`scope-value`].some(t=>e[t]!==void 0)){let t=[`scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --scope-* flag is set`)}return!0})}const X={command:`create`,describe:`Create account Email Sending suppression`,builder:Y,handler:async r=>c({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({email:f(r.email,`email`,`text`),expires_at:f(r[`expires-at`],`expires-at`,`text`),note:f(r.note,`note`,`text`),scope:{type:
|
|
36
|
+
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).coerce(`scope-type`,e=>f(e,`scope-type`,`text`)).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`scope-type`,`scope-value`].some(t=>e[t]!==void 0)){let t=[`scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --scope-* flag is set`)}return!0})}const X={command:`create`,describe:`Create account Email Sending suppression`,builder:Y,handler:async r=>c({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({email:f(r.email,`email`,`text`),expires_at:f(r[`expires-at`],`expires-at`,`text`),note:f(r.note,`note`,`text`),scope:{type:r[`scope-type`],value:f(r[`scope-value`],`scope-value`,`text`)}}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.emailSending.suppressions.create({...e,account_id:u}));a(t,{successLabel:`Created`});return}r.email===void 0&&(r.email=await p(`email`,`The email address to suppress.`));let m=d({email:f(r.email,`email`,`text`),expires_at:f(r[`expires-at`],`expires-at`,`text`),note:f(r.note,`note`,`text`),scope:{type:r[`scope-type`],value:f(r[`scope-value`],`scope-value`,`text`)}}),h=await s(`Creating`,async()=>c.emailSending.suppressions.create({...m,account_id:u}));a(h,{successLabel:`Created`})})};function Z(e){return e.usage(`$0 email-sending suppressions delete <suppression-id>
|
|
37
37
|
|
|
38
38
|
Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Q={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:Z,handler:async r=>c({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/suppressions/${r[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(r[`suppression-id`]))}`,pathParams:{"suppression-id":String(r[`suppression-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await m({force:!!r.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`})){process.stderr.write(`Aborted.
|
|
39
39
|
`);return}let u=await s(`Deleting`,async()=>c.emailSending.suppressions.delete({account_id:l,suppression_id:r[`suppression-id`]}));a(u,{successLabel:`Deleted`})})};function ne(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./chunk-
|
|
2
|
+
import{t as e}from"./chunk-TAK63GWY-DdMktrgc.mjs";import{n as t}from"./errors-_sob7Ihu.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof t){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof e?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./prompt-C8FyienX.mjs";function f(e){return e.usage(`$0 fieldExtractors delete <extractor>
|
|
3
3
|
|
|
4
4
|
Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,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 p={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:f,handler:async c=>s({command:`fieldExtractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf fieldExtractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await d({force:!!c.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let u=await o(`Deleting`,async()=>s.fieldExtractors.delete({account_id:l,extractor:c.extractor}));i(u,{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 fieldExtractors get <extractor>
|