cf 1.0.0-beta.10 → 1.0.0-beta.12
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/bin/cf +1 -1
- package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
- package/dist/{access-D4DN4XZF.mjs → access-DwJm1qet.mjs} +1 -1
- package/dist/account-tags-d0RkEw6s.mjs +15 -0
- package/dist/accounts-BSd4b-1j.mjs +138 -0
- package/dist/{acm-OQqE8FMc.mjs → acm-BfI0p2sX.mjs} +8 -8
- package/dist/addressing-lfeJf7YB.mjs +93 -0
- package/dist/agent-context-DFEgYjEQ.mjs +2 -0
- package/dist/agent-memory-CP1qpn-y.mjs +34 -0
- package/dist/ai-audit-B_tSl78A.mjs +6 -0
- package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
- package/dist/ai-jFzFBANM.mjs +29 -0
- package/dist/ai-search-PTlpY1T9.mjs +79 -0
- package/dist/ai-security-CKGE547U.mjs +10 -0
- package/dist/alerting-CuxoqG3S.mjs +56 -0
- package/dist/analytics-NPND7aHB.mjs +20 -0
- package/dist/analytics_engine-BoapM9wd.mjs +4 -0
- package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
- package/dist/{api-security-CSuYMpMO.mjs → api-security-Nk_bg-Kg.mjs} +61 -61
- package/dist/{argo-DMfNmOV4.mjs → argo-DYfLQhd2.mjs} +5 -5
- package/dist/artifacts-BS6cEqCB.mjs +43 -0
- package/dist/{audit-logs-BrjNuiLx.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
- package/dist/auth-AobvBmz4.mjs +2 -0
- package/dist/auth-CBtzZ3Sw.mjs +2 -0
- package/dist/auth-CKotxfap.mjs +2 -0
- package/dist/auth-token-CtguMdmF.mjs +8 -0
- package/dist/autoconfig-PfnbLuEO.mjs +532 -0
- package/dist/{banner-ClclgnBn.mjs → banner-D03JEqRs.mjs} +1 -1
- package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
- package/dist/billing-CDMc4tvX.mjs +23 -0
- package/dist/bot-management-UrCM3P8K.mjs +9 -0
- package/dist/botnet-feed-CVwRm42k.mjs +11 -0
- package/dist/brand-protection-DfNf5REj.mjs +27 -0
- package/dist/browser-run-DVaiBLYX.mjs +46 -0
- package/dist/build-BKPVP5ip.mjs +2 -0
- package/dist/build-C4giET85.mjs +2 -0
- package/dist/builds-BG5DHqU3.mjs +71 -0
- package/dist/cache-C05hHXUp.mjs +45 -0
- package/dist/{certificate-authorities-D_uAJH9B.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
- package/dist/cf-B9aqZZKD.mjs +18 -0
- package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
- package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
- package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
- package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
- package/dist/{cli-BeXSqJAj.mjs → cli-D9qlPB-6.mjs} +1 -1
- package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
- package/dist/{client-certificates-DqFcK_s1.mjs → client-certificates-B-m8rfM9.mjs} +7 -7
- package/dist/{client-side-security-DJXZ1XAu.mjs → client-side-security-M4oIUqID.mjs} +15 -15
- package/dist/cloud-connector-B63Dwn6n.mjs +6 -0
- package/dist/cloudflared-B48cfu95.mjs +2 -0
- package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
- package/dist/{command-xU78ACNA.mjs → command-BQpXcGKV.mjs} +1 -1
- package/dist/{command-DUafPVUr.mjs → command-BWlpCtHe.mjs} +1 -1
- package/dist/{command-BOLlvEan.mjs → command-BlGILcTA.mjs} +1 -1
- package/dist/{command-K1-DZFJS.mjs → command-CKQlxypn.mjs} +1 -1
- package/dist/{command-C__qB2mo.mjs → command-CRl00uA2.mjs} +1 -1
- package/dist/{command-DZookrfw.mjs → command-CUkXxZsc.mjs} +1 -1
- package/dist/command-CXxh5Hce.mjs +2 -0
- package/dist/{command-BCag-xjk.mjs → command-CzvlHvov.mjs} +1 -1
- package/dist/{command-DxSJy_ym.mjs → command-DBaNgfA4.mjs} +1 -1
- package/dist/command-DEQSv-S1.mjs +2 -0
- package/dist/{command-BrHTpaji.mjs → command-DyE8v4sd.mjs} +1 -1
- package/dist/command-Rv2MR-eh.mjs +2 -0
- package/dist/{command-B6DqnUwt.mjs → command-SS1z_t68.mjs} +1 -1
- package/dist/{command-6YTtWltE.mjs → command-VuxpEvmH.mjs} +1 -1
- package/dist/{command-DzHL5LKI.mjs → command-ZBQ1WITj.mjs} +1 -1
- package/dist/{completions-Cm9brGAI.mjs → completions-lf50FBGm.mjs} +2 -2
- package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
- package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
- package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
- package/dist/connectors-0UwPUav-.mjs +15 -0
- package/dist/containers-DRzgE46U.mjs +375 -0
- package/dist/containers-DuIsM7lM.mjs +78 -0
- package/dist/{content-scan-C_ROsbTJ.mjs → content-scan-COyTz0Wb.mjs} +8 -8
- package/dist/{context-CEOHpZgd.mjs → context-Bwkz4Lm_.mjs} +2 -2
- package/dist/{cps-BPQqyL2E.mjs → cps-B7_BJaAU.mjs} +3 -3
- package/dist/{csamScanner-D-oO5cxT.mjs → csamScanner-jez2EYXC.mjs} +3 -3
- package/dist/ct-alerting-CACDrY0E.mjs +5 -0
- package/dist/{custom-certificates-DvnFBZdJ.mjs → custom-certificates-BBd92YlF.mjs} +8 -8
- package/dist/{custom-csrs-BZ8TXbuQ.mjs → custom-csrs-DTwBiNMX.mjs} +6 -6
- package/dist/{custom-hostnames-CTqf-KlT.mjs → custom-hostnames-DIWlqvN9.mjs} +15 -15
- package/dist/custom-nameservers-DISy8v8u.mjs +9 -0
- package/dist/custom-pages-BHXO_NFv.mjs +21 -0
- package/dist/d1-MvAQMvvo.mjs +89 -0
- package/dist/{dcv-delegation-yOtz90qE.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-C4p6SzLH.mjs → deploy-BS47vZvJ.mjs} +1 -1
- package/dist/deploy-context-Cfushp8j.mjs +56 -0
- package/dist/{deploy-input-DTjBGloL.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
- package/dist/{dev-BML-bpNU.mjs → dev-D8FGPKRt.mjs} +2 -2
- package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
- package/dist/{dialog-BlUXJKbA.mjs → dialog-CL1Zy4pn.mjs} +1 -1
- package/dist/discover-DIDEGKo3.mjs +2 -0
- package/dist/discover-P20XeGBF.mjs +2 -0
- package/dist/{dist-DW47TUGh.mjs → dist-8rP3V95o.mjs} +5 -5
- package/dist/dist-CYFkGHYv.mjs +487 -0
- package/dist/dls-8D00tqvC.mjs +17 -0
- package/dist/{dns-C9sUPsNt.mjs → dns-C-A5pwf3.mjs} +68 -68
- package/dist/{dns-firewall-EDiT-Zli.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
- package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
- package/dist/dotenv-DpXaxfho.mjs +4 -0
- package/dist/dry-run-DmsbOMF1.mjs +2 -0
- package/dist/durable-objects-CnIqbj84.mjs +6 -0
- package/dist/{email-auth-BgvoEHJk.mjs → email-auth-v97Md32E.mjs} +3 -3
- package/dist/{email-routing-Bggn219w.mjs → email-routing-I29RG4hb.mjs} +24 -24
- package/dist/{email-security-_t7rzrzd.mjs → email-security-BCarmbky.mjs} +86 -86
- package/dist/email-sending-CsHk2HAJ.mjs +47 -0
- package/dist/error-sanitization-BWnGnB73.mjs +2 -0
- package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
- package/dist/errors-_sob7Ihu.mjs +3 -0
- package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
- package/dist/{firewall-CZEN8iA_.mjs → firewall-DpgFqJr3.mjs} +19 -19
- package/dist/flagship-BVaXXlsX.mjs +28 -0
- package/dist/{fraud-9_9hobAh.mjs → fraud-B5GQdEF2.mjs} +3 -3
- package/dist/{generate-CLqGOlOx.mjs → generate-CeeWW3eX.mjs} +1 -1
- package/dist/generate-D80-1GnZ.mjs +2 -0
- package/dist/{google-tag-gateway-O_N0vHRY.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
- package/dist/gt-3bcLGJ7V.mjs +3 -0
- package/dist/{healthchecks-Bt3Gw_JZ.mjs → healthchecks-BwYMnKSF.mjs} +12 -12
- package/dist/{hostnames-DdOube3R.mjs → hostnames-DhrGRFeI.mjs} +6 -6
- package/dist/{hyperdrive-C14NAh9l.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
- package/dist/iam-sRKDU2Z3.mjs +52 -0
- package/dist/images-DXdekLVs.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/init-j47MT4Qe.mjs +39 -0
- package/dist/intel-CnVeSjIS.mjs +76 -0
- package/dist/interactive-Dqv0RWVU.mjs +42 -0
- package/dist/interactive-Wpd3FcDc.mjs +2 -0
- package/dist/{ips-PT_uQKAf.mjs → ips-COCUG8mk.mjs} +2 -2
- package/dist/k2-CmHkArHL.mjs +13 -0
- package/dist/{keyless-certificates-BHvas2q1.mjs → keyless-certificates-l2_S__h3.mjs} +7 -7
- package/dist/keys-CDZreums.mjs +4 -0
- package/dist/kv-DkpKVimq.mjs +15 -0
- package/dist/{lazy-command-glNW3jzf.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
- package/dist/{leaked-credential-checks-De9hI1rl.mjs → leaked-credential-checks-edbapECI.mjs} +10 -10
- package/dist/lifecycle-oud60haK.mjs +2 -0
- package/dist/{load-balancers-Cs6bUHS1.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
- package/dist/{local-B5oRPTEN.mjs → local-C0lQ9sTg.mjs} +1 -1
- package/dist/local-D5L5Bwju.mjs +2 -0
- package/dist/{local-runtime-CZnegFEM.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
- package/dist/login-BrjOuHKu.mjs +5 -0
- package/dist/login-DeOM4v0L.mjs +2 -0
- package/dist/logo-matches-CF8321pb.mjs +6 -0
- package/dist/logos-Bd8xNRKW.mjs +7 -0
- package/dist/logpush-BYk3qqwY.mjs +46 -0
- package/dist/logs-Jcj2NN8H.mjs +36 -0
- package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
- package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
- package/dist/magic-transit-KDyfUgTv.mjs +383 -0
- package/dist/managed-defense-CxaDeNUd.mjs +18 -0
- package/dist/{managed-transforms-CCpUz4TY.mjs → managed-transforms-C7rT5E-x.mjs} +5 -5
- package/dist/{matches-BSiYXs99.mjs → matches-BtKqG8T9.mjs} +3 -3
- package/dist/{mcp-CCMiS75R.mjs → mcp-QDd1Iyc0.mjs} +17 -17
- package/dist/mesh-DtrIzl5z.mjs +26 -0
- package/dist/metadata-Df5kCWJv.mjs +2 -0
- package/dist/{migrate-BJ9Go_wP.mjs → migrate-DHlfR_gZ.mjs} +1 -1
- package/dist/{monetization-CFf_lb6x.mjs → monetization-pLalYYMI.mjs} +11 -11
- package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
- package/dist/network-DrJxPWXQ.mjs +50 -0
- package/dist/{network-interconnects-YiRUBbjx.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
- package/dist/{oauth-cNZUky3h.mjs → oauth-B08YQ4xq.mjs} +2 -2
- package/dist/{oauth-DxGgIwFc.mjs → oauth-TGbM1Q0V.mjs} +1 -1
- package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
- package/dist/{oauth-scopes-xl-pcWdg.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
- package/dist/observability-CvN9oxAo.mjs +80 -0
- package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
- package/dist/{organization-Dbom1gTR.mjs → organization-DIwqRBBV.mjs} +16 -16
- package/dist/{organizations-OUMVsuen.mjs → organizations-Dk0D9ukm.mjs} +2 -2
- package/dist/{origin-ca-certificates-B3-T0-Nn.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
- package/dist/{origin-post-quantum-encryption-CGB6AfPa.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
- package/dist/{origin-tls-client-auth-CgzzfAWr.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +16 -16
- package/dist/output-BGqhvqe2.mjs +2 -0
- package/dist/{page-rules-B9BQKU4_.mjs → page-rules-BKaU37cM.mjs} +8 -8
- package/dist/pages-2Xg-lrMf.mjs +54 -0
- package/dist/pay-per-crawl-5-KTQXRr.mjs +65 -0
- package/dist/pay-per-use-sGebKzNK.mjs +6 -0
- package/dist/pipelines-BM-T7mMK.mjs +44 -0
- package/dist/precursor-DmQ32-Sp.mjs +4 -0
- package/dist/previews-DDQ9ACDJ.mjs +4 -0
- package/dist/{progress-A61dRbXl.mjs → progress-BYVZuEcG.mjs} +1 -1
- package/dist/{prompt-CGUzvBgY.mjs → prompt-F5wxc8zq.mjs} +1 -1
- package/dist/queries-DPBkVynK.mjs +9 -0
- package/dist/queues-CCXRs98q.mjs +57 -0
- package/dist/r2-BKuBSW8h.mjs +125 -0
- package/dist/{radar-CU4T02Ag.mjs → radar-Gv1yFoRX.mjs} +150 -150
- package/dist/raw-fetch-DyYWa923.mjs +2 -0
- package/dist/realtime-CVl-rvgx.mjs +172 -0
- package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
- package/dist/registrar-swlnh22i.mjs +43 -0
- package/dist/{registry-Cg5lP8oo.mjs → registry-C20J1MW0.mjs} +1 -1
- package/dist/reporting-Bgwsvol1.mjs +14 -0
- package/dist/request-headers-CUee83pa.mjs +2 -0
- package/dist/request-tracers-BBiJvVDz.mjs +4 -0
- package/dist/resolve-DvxgnWjL.mjs +2 -0
- package/dist/resolve-qwL1LmKN.mjs +2 -0
- package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
- package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
- package/dist/rules-BDunCGMj.mjs +18 -0
- package/dist/{rulesets-HOOnxHZZ.mjs → rulesets-BMGxrnv9.mjs} +20 -20
- package/dist/rum-B7XiECe9.mjs +30 -0
- package/dist/run-CrZgB8L_.mjs +2 -0
- package/dist/run-nNxXb_Cv.mjs +2 -0
- package/dist/schema-DC0kdqgV.mjs +2 -0
- package/dist/schema-flags-BUZR9SLd.mjs +5 -0
- package/dist/scim-CORcs2wK.mjs +18 -0
- package/dist/secrets-store-BoZQaFey.mjs +24 -0
- package/dist/security-insights-DblK_6sg.mjs +40 -0
- package/dist/{security-txt-Fnl3LdSn.mjs → security-txt-Dl7RPnRb.mjs} +5 -5
- package/dist/{session-CZTuHcbm.mjs → session-BWe9et4K.mjs} +1 -1
- package/dist/shared-0N31BXkY.mjs +2 -0
- package/dist/{smart-shield-DB0E7cZI.mjs → smart-shield-DX0-8ruu.mjs} +13 -13
- package/dist/snippets-BFN-Lg3K.mjs +20 -0
- package/dist/source-mXUcrTVw.mjs +6 -0
- package/dist/spawn-DZ9A-xXb.mjs +10 -0
- package/dist/{spectrum-DtG0jYjE.mjs → spectrum-HYWLWB0X.mjs} +12 -12
- package/dist/{speed-B-RiNHGK.mjs → speed-Dj0YhfRe.mjs} +13 -13
- package/dist/src-CAiZlihY.mjs +117 -0
- package/dist/{ssl-DBVpCZAM.mjs → ssl-BQL1fNtD.mjs} +17 -17
- package/dist/startup-profile-0X5ebbng.mjs +29 -0
- package/dist/startup-profile-CXnsF4c7.mjs +2 -0
- package/dist/state-BA2CanJ_.mjs +2 -0
- package/dist/{state-BaGRaYow.mjs → state-Dy6-rKNd.mjs} +1 -1
- package/dist/stream-DKv2TtZN.mjs +102 -0
- package/dist/submit-Byt2KBGI.mjs +4 -0
- package/dist/{tags--eph7JbN.mjs → tags-BIBsdG68.mjs} +2 -2
- package/dist/telemetry-DBXOMuLh.mjs +2 -0
- package/dist/{telemetry-51etasAu.mjs → telemetry-bu3txnIR.mjs} +1 -1
- package/dist/{tenant-Bj-He2xO.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
- package/dist/{tenant-custom-nameservers-B5IIIwbz.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
- package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
- package/dist/{tools-BJZ0DDlL.mjs → tools-BbTX7rlM.mjs} +1 -1
- package/dist/tunnels-DWcrz9Sf.mjs +29 -0
- package/dist/turnstile-2MIGp2ce.mjs +33 -0
- package/dist/{ui-BQxRjahW.mjs → ui-YmjF66Ct.mjs} +1 -1
- package/dist/update-check-B-CvDAUz.mjs +2 -0
- package/dist/update-check-CfB0PNTY.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-B8udoxlx.mjs +4 -0
- package/dist/{url-normalization-BpGDUUQc.mjs → url-normalization-C6AdWtaE.mjs} +5 -5
- package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
- package/dist/{user-B6P5_OjP.mjs → user-BLZ-0Bgv.mjs} +51 -51
- package/dist/values-BUK-m0Jg.mjs +4 -0
- package/dist/vectorize-DEUSEQXY.mjs +32 -0
- package/dist/version-BZNc7Y3t.mjs +2 -0
- package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
- package/dist/{web-assets-yaKxN4w_.mjs → web-assets-CLZdWOmN.mjs} +35 -35
- package/dist/{web3-Bu9c_QAt.mjs → web3-DjeavuLg.mjs} +15 -15
- package/dist/workers-C_SfyU-v.mjs +38 -0
- package/dist/workers-builds-COn5Ne5G.mjs +14 -0
- package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
- package/dist/{workers-vpc-C1oUHHqk.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
- package/dist/workflows-BibtWuOx.mjs +43 -0
- package/dist/{wrangler-migration-CJEb9hY3.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
- package/dist/zaraz-BvQZB0YY.mjs +22 -0
- package/dist/zero-trust-FStq4uhn.mjs +821 -0
- package/dist/{zone-uJwRLSnn.mjs → zone-tymlghWb.mjs} +2 -2
- package/dist/{zones-Dpofsnth.mjs → zones-Bz6dgT9_.mjs} +47 -47
- package/package.json +25 -21
- package/dist/abuse-reports-BhSTEz7h.mjs +0 -24
- package/dist/account-tags-BWEIZLID.mjs +0 -15
- package/dist/accounts-ZQvIqGJz.mjs +0 -138
- package/dist/addressing-DCFm17JQ.mjs +0 -93
- package/dist/agent-context-GRiQ4zRU.mjs +0 -2
- package/dist/agent-memory-BtfPt2me.mjs +0 -34
- package/dist/ai-B0_sZbmy.mjs +0 -29
- package/dist/ai-audit-DaubuhYF.mjs +0 -6
- package/dist/ai-gateway-CJ-1Dzzr.mjs +0 -82
- package/dist/ai-search-Dywa1kqX.mjs +0 -79
- package/dist/ai-security-2wxMPqKS.mjs +0 -10
- package/dist/alerting-yad9DYRv.mjs +0 -56
- package/dist/analytics-DKNw2fVc.mjs +0 -20
- package/dist/analytics_engine-BA3kF46s.mjs +0 -4
- package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
- package/dist/artifacts-Cb3hwClm.mjs +0 -43
- package/dist/auth-BBlAI8HG.mjs +0 -2
- package/dist/auth-BIr56Mbx.mjs +0 -8
- package/dist/autoconfig-DPUztTL2.mjs +0 -511
- package/dist/basin-catalog-BLsQhJP4.mjs +0 -46
- package/dist/billing-CRwD7oQS.mjs +0 -23
- package/dist/bot-management-CyW8F8Wm.mjs +0 -9
- package/dist/botnet-feed-BBKsxf3Y.mjs +0 -11
- package/dist/brand-protection-DSeD8LXl.mjs +0 -27
- package/dist/browser-run-BAcUTwB4.mjs +0 -46
- package/dist/build-B5UYMEQH.mjs +0 -2
- package/dist/build-DLZ9gBNA.mjs +0 -2
- package/dist/builds-W1HEG7Bv.mjs +0 -71
- package/dist/cache-B7E_PXUp.mjs +0 -45
- package/dist/cf-Bh_fTFIj.mjs +0 -18
- package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +0 -97
- package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +0 -2
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
- package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +0 -2
- package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
- package/dist/cloud-connector-Czg1GdQi.mjs +0 -6
- package/dist/cloudflared-DGuau-lC.mjs +0 -2
- package/dist/cloudforce-one-B1IhIZcp.mjs +0 -447
- package/dist/command-CAtsHc1V.mjs +0 -2
- package/dist/command-DfffeX-k.mjs +0 -2
- package/dist/command-TCklVvOY.mjs +0 -2
- package/dist/connector-interrupts-D93KTMkw.mjs +0 -6
- package/dist/connector-telemetry-events-D6CmKR14.mjs +0 -6
- package/dist/connector-telemetry-snapshots-WO9IUk0e.mjs +0 -6
- package/dist/connectors-DNT6GTW3.mjs +0 -15
- package/dist/containers-Btx7vCDP.mjs +0 -78
- package/dist/containers-Ce7IO-Ia.mjs +0 -239
- package/dist/ct-alerting-CnTRE1Fb.mjs +0 -5
- package/dist/custom-nameservers-B0CpnUVg.mjs +0 -9
- package/dist/custom-pages-DcoSGN56.mjs +0 -21
- package/dist/d1-m7UfzBzl.mjs +0 -41
- package/dist/diagnostics-hOvnx5DT.mjs +0 -15
- package/dist/discover-C5aiI6u0.mjs +0 -2
- package/dist/discover-DwczTkRX.mjs +0 -2
- package/dist/dist-BuCJ_55d.mjs +0 -366
- package/dist/dist-C3s9SXTd.mjs +0 -48
- package/dist/dls-v6DyEWTd.mjs +0 -17
- package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +0 -2
- package/dist/dotenv-CcQjGlV0.mjs +0 -4
- package/dist/dry-run-Bq0JAsbX.mjs +0 -2
- package/dist/durable-objects-C01phVwL.mjs +0 -6
- package/dist/email-sending-_dKCs2VF.mjs +0 -47
- package/dist/error-sanitization-CJ5OLJrh.mjs +0 -2
- package/dist/error-sanitization-hmi1CqE5.mjs +0 -2
- package/dist/fieldExtractors-Cm5QnkE0.mjs +0 -9
- package/dist/flagship-B_SAI_ZL.mjs +0 -28
- package/dist/generate-BPqoDbck.mjs +0 -2
- package/dist/gt-DmcMNPX6.mjs +0 -2
- package/dist/iam-DUW7neMx.mjs +0 -52
- package/dist/images-B9dnr1z0.mjs +0 -71
- package/dist/init-BGcAIvV7.mjs +0 -39
- package/dist/intel-BQpZMck3.mjs +0 -76
- package/dist/interactive-C-o16XQs.mjs +0 -32
- package/dist/interactive-SgAjen2z.mjs +0 -2
- package/dist/k2-nPYti7Y0.mjs +0 -13
- package/dist/keys-O5kAW9ox.mjs +0 -4
- package/dist/kv-BUP_ZLM_.mjs +0 -15
- package/dist/lifecycle-C7tAC1Mn.mjs +0 -2
- package/dist/local-Bj-l0TP6.mjs +0 -2
- package/dist/login-C5nSIS-T.mjs +0 -2
- package/dist/login-CUup7w0e.mjs +0 -5
- package/dist/logo-matches-BkQKdu4Z.mjs +0 -6
- package/dist/logos-C_sv-boo.mjs +0 -7
- package/dist/logpush-NUcyMKHi.mjs +0 -46
- package/dist/logs-BZT4PlqZ.mjs +0 -36
- package/dist/magic-cloud-networking-DQnSdmgA.mjs +0 -71
- package/dist/magic-network-monitoring-pHTU6aS8.mjs +0 -36
- package/dist/magic-transit-5302bQNh.mjs +0 -383
- package/dist/managed-defense-8OEfDzuO.mjs +0 -18
- package/dist/mesh-DKBGTlCD.mjs +0 -26
- package/dist/metadata-C33s4rc-.mjs +0 -2
- package/dist/mtls-certificates-DsF3NFNs.mjs +0 -13
- package/dist/network-Bm0qYRqY.mjs +0 -50
- package/dist/oauth-clients-CP6alY0_.mjs +0 -16
- package/dist/observability-Bp71PtlD.mjs +0 -80
- package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +0 -4
- package/dist/output-CvQFJkvi.mjs +0 -2
- package/dist/pages-DZPdyuT4.mjs +0 -54
- package/dist/pay-per-crawl-CnveMVDi.mjs +0 -65
- package/dist/pay-per-use-Bpxe8PHv.mjs +0 -6
- package/dist/pipelines-CHev3o5G.mjs +0 -44
- package/dist/precursor-C9PK9Bue.mjs +0 -4
- package/dist/previews-BIMI1dTz.mjs +0 -4
- package/dist/queries-f-btyefs.mjs +0 -9
- package/dist/queues-kLNdeb3q.mjs +0 -57
- package/dist/r2-D_awYx2p.mjs +0 -125
- package/dist/raw-fetch-CvkmFO23.mjs +0 -2
- package/dist/realtime-C0dvcBBM.mjs +0 -172
- package/dist/registrar-CHc-4vcf.mjs +0 -43
- package/dist/registrar-sandbox-Dq8LV2AI.mjs +0 -56
- package/dist/reporting-4u21g6Dk.mjs +0 -14
- package/dist/request-headers-D31kdxrQ.mjs +0 -2
- package/dist/request-tracers-CupJ_83j.mjs +0 -4
- package/dist/resolve-BCTrtcx7.mjs +0 -2
- package/dist/resolve-PZuJ878-.mjs +0 -2
- package/dist/resource-sharing-CO-Lh-u7.mjs +0 -40
- package/dist/resource-tagging-D0R5SzR6.mjs +0 -4
- package/dist/rules-BsmKzB9H.mjs +0 -18
- package/dist/rum-wcLEvVJl.mjs +0 -30
- package/dist/run-CIJTelJL.mjs +0 -2
- package/dist/run-quhbAvQi.mjs +0 -2
- package/dist/schema-GdBsV4P7.mjs +0 -2
- package/dist/schema-flags-D8vL2oiF.mjs +0 -5
- package/dist/scim-BkdJmAS8.mjs +0 -18
- package/dist/sdk-BCzcRJCi.mjs +0 -3
- package/dist/secrets-store-CHs0oYA0.mjs +0 -24
- package/dist/security-insights-vsl-4xFa.mjs +0 -40
- package/dist/shared-BS30oCf8.mjs +0 -2
- package/dist/snippets-CFaF_NyG.mjs +0 -20
- package/dist/source-38bULAR8.mjs +0 -6
- package/dist/spawn-B0Sl8lUu.mjs +0 -10
- package/dist/src-CM3XaB4p.mjs +0 -109
- package/dist/startup-profile-CLmojOrn.mjs +0 -2
- package/dist/startup-profile-CR7GMuLx.mjs +0 -17
- package/dist/state-CpXhcMdX.mjs +0 -2
- package/dist/stream-cAdBvpS1.mjs +0 -102
- package/dist/submit-Bkd7l2rK.mjs +0 -4
- package/dist/telemetry-Q3_UmwHj.mjs +0 -2
- package/dist/tunnels-CgtuRpcD.mjs +0 -29
- package/dist/turnstile-Bmcnrzw7.mjs +0 -33
- package/dist/update-check-BqSpgzHk.mjs +0 -2
- package/dist/update-check-DC0qP_8z.mjs +0 -2
- package/dist/url-info-DhVehaT8.mjs +0 -4
- package/dist/url-scanner-DiLdqsQk.mjs +0 -16
- package/dist/values-Cxx4Lxrd.mjs +0 -4
- package/dist/vectorize-YyxVpql-.mjs +0 -32
- package/dist/version-C0pInAZ9.mjs +0 -2
- package/dist/waiting-rooms-BdahlCdD.mjs +0 -53
- package/dist/workers-5GgoGA2e.mjs +0 -38
- package/dist/workers-builds-h-1FJjE1.mjs +0 -14
- package/dist/workers-for-platforms-CV9iRrp9.mjs +0 -42
- package/dist/workflows-dtMlkj1-.mjs +0 -43
- package/dist/zaraz-838AbMEX.mjs +0 -22
- package/dist/zero-trust-CYt-eELJ.mjs +0 -821
- /package/dist/{Page-CjJht2qT.mjs → Page-BShsqCXr.mjs} +0 -0
- /package/dist/{alerts-DY_7Nknx.mjs → alerts-BSON-vFh.mjs} +0 -0
- /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
- /package/dist/{autorag-K396-M2S.mjs → autorag-kNrLiqDX.mjs} +0 -0
- /package/dist/{body-parser-hh2avzkz.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
- /package/dist/{brands-DeLbFxSt.mjs → brands-bBJgbbOH.mjs} +0 -0
- /package/dist/{browser-extension-C1zmKFDG.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
- /package/dist/{clear-CRfI7WS7.mjs → clear-BW9vLgI3.mjs} +0 -0
- /package/dist/{cli-types-DoVT5q_M.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-D8p_dR8s.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-COFmzmlk.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
- /package/dist/{delegate-B6LetRpZ.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
- /package/dist/{domain-info-aiwP60Fo.mjs → domain-info-BkcBcyfF.mjs} +0 -0
- /package/dist/{health-Bz33n-_F.mjs → health-CTaCeVyC.mjs} +0 -0
- /package/dist/{input-validation-Dk52b0me.mjs → input-validation-D7z60HJH.mjs} +0 -0
- /package/dist/{internal-BHrJbbdA.mjs → internal-BYS7hO8c.mjs} +0 -0
- /package/dist/{live-MeJQXIei.mjs → live-BJE_YWE1.mjs} +0 -0
- /package/dist/{project-settings-DO6njFg_.mjs → project-settings-nBMEx1f-.mjs} +0 -0
- /package/dist/{r2-data-catalog-2jQrdAdo.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CU55zqCU.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
- /package/dist/{rate-limits-CZ-qHDPK.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
- /package/dist/{ready-BOpbZ1pN.mjs → ready-B3pLxnjc.mjs} +0 -0
- /package/dist/{recent-submissions-KDqD2HyS.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
- /package/dist/{refute-DkF4XIMw.mjs → refute-Dp3VodMn.mjs} +0 -0
- /package/dist/{scan-logo-DQkf6glG.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
- /package/dist/{scan-page-CMOJ_E0n.mjs → scan-page-CxeudOzj.mjs} +0 -0
- /package/dist/{search-Bre1Zwn3.mjs → search-B_P5ZTQj.mjs} +0 -0
- /package/dist/{signed-url-24ZbX4yV.mjs → signed-url-D5RwvrQq.mjs} +0 -0
- /package/dist/{submission-info-BmkbZVqM.mjs → submission-info-_t78q2OE.mjs} +0 -0
- /package/dist/{total-queries-j8OAF_cE.mjs → total-queries-CPrKEciQ.mjs} +0 -0
- /package/dist/{tracked-domains-fe3EWYmF.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
- /package/dist/{verify-CKgZYvln.mjs → verify-5KcvRk-q.mjs} +0 -0
package/bin/cf
CHANGED
|
@@ -34,7 +34,7 @@ process.on("warning", (warning) => {
|
|
|
34
34
|
// main bundle is imported — so that when cf hands off to a project-local
|
|
35
35
|
// copy, the global install never pays to load its (large) command tree.
|
|
36
36
|
// The delegation logic lives in src/lib/delegate.ts and is emitted as a
|
|
37
|
-
// small standalone chunk (see
|
|
37
|
+
// small standalone chunk (see vite.config.ts `pack.entry.delegate`).
|
|
38
38
|
const { maybeDelegateFromProcess } = await import("../dist/delegate.mjs");
|
|
39
39
|
const delegation = await maybeDelegateFromProcess();
|
|
40
40
|
if (delegation.delegated) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h}from"./prompt-F5wxc8zq.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";function _(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
|
|
3
|
+
|
|
4
|
+
Returns whether the report is currently appealable, along with the signals behind that decision: whether it already has an open appeal, how many appeals have been submitted against it, and whether it has at least one mitigation that an appeal could reverse. Report-level appeals are currently available only for DMCA (copyright) reports. For other report types this operation returns the same \`404 Report not found\` response as a report that does not exist for the account.`).positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`eligibility <report-id>`,describe:`Check whether a report can be appealed`,builder:_,handler:async t=>c({command:`abuse-reports appeals eligibility`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/${t[`report-id`]==null?`<report-id>`:encodeURIComponent(String(t[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(t[`report-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.abuseReports.appeals.eligibility({account_id:l,report_id:t[`report-id`]}));a(u,{successLabel:`Loaded`})})},y={command:`appeals`,describe:`Appeal eligibility for abuse reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage("$0 abuse-reports create <report-type>\n\nSubmit an abuse report of a particular type. Requires the abuse-reports entitlement on the account (Enterprise accounts have it by default; other accounts must request access) and an API token with the `Trust and Safety Write` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).").positional(`report-type`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`act`,{type:`string`,description:`The act field`,choices:[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`]}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
5
|
+
`}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
6
|
+
`,choices:[`send`,`send-anon`]}).option(`original-work`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
7
|
+
`}).option(`owner-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
8
|
+
`,choices:[`send`,`send-anon`,`none`]}).option(`signature`,{type:`string`,description:`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`}).option(`state`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`justification`,{type:`string`,description:`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.
|
|
9
|
+
`}).option(`trademark-number`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-office`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-symbol`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`destination-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ports-protocols`,{type:`string`,description:`A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual port/protocol should not exceed 100 characters. The list should not have more than 30 unique ports and protocols.`}).option(`source-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ncmec-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
10
|
+
`,choices:[`send`,`send-anon`]}).option(`reg-who-request-reg-who-authorization-statement`,{type:`string`,description:`Optional authorization statement or power of attorney per RDP 10.2.1.3.`}).option(`reg-who-request-reg-who-good-faith-affirmation`,{type:`boolean`,description:`Affirmation that the request is made in good faith per RDP 10.2.4. Must be true.`}).option(`reg-who-request-reg-who-lawful-processing-agreement`,{type:`boolean`,description:`Agreement to process data lawfully per RDP 10.2.5. Must be true.`}).option(`reg-who-request-reg-who-legal-basis`,{type:`string`,description:`Legal rights and rationale for the request per RDP 10.2.3. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-request-type`,{type:`string`,description:`The type of WHOIS data request per RDP procedure.`,choices:[`disclosure`,`invalid_whois`]}).option(`reg-who-request-reg-who-requested-data-elements`,{type:`string`,array:!0,description:`The specific WHOIS data elements being requested per RDP 10.2.2. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-requestor-type`,{type:`string`,description:`The nature of the requestor per RDP 10.2.1.2.`,choices:[`government`,`corporation`,`individual`]}).option(`ncsei-subject-representation`,{type:`boolean`,description:`If the submitter is the target of NCSEI in the URLs of the abuse report.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`address1`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`address1`,[`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agent-name`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agent-name`,[`address1`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agree`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agree`,[`address1`,`agent-name`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`city`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`city`,[`address1`,`agent-name`,`agree`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`country`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`original-work`]).implies(`country`,[`address1`,`agent-name`,`agree`,`city`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`host-notification`,[`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).conflicts(`original-work`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`,`country`]).implies(`original-work`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`signature`,`state`]).conflicts(`signature`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`signature`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`state`]).conflicts(`state`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`state`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`]).conflicts(`justification`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`trademark-number`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-number`,[`host-notification`,`justification`,`trademark-office`,`trademark-symbol`]).conflicts(`trademark-office`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-office`,[`host-notification`,`justification`,`trademark-number`,`trademark-symbol`]).conflicts(`trademark-symbol`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-symbol`,[`host-notification`,`justification`,`trademark-number`,`trademark-office`]).conflicts(`destination-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ports-protocols`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`source-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ncmec-notification`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`ncmec-notification`,[`host-notification`,`justification`]).conflicts(`reg-who-request-reg-who-authorization-statement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-good-faith-affirmation`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-lawful-processing-agreement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-legal-basis`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-request-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requested-data-elements`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requestor-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`ncsei-subject-representation`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).implies(`ncsei-subject-representation`,[`host-notification`]).check(e=>{if([`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`].some(t=>e[t]!==void 0)){let t={"reg-who-request-reg-who-good-faith-affirmation":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-lawful-processing-agreement":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-legal-basis":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-request-type":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-requested-data-elements":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]},n=[`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --reg_who_request-* flag is set`)}return!0})}const x={command:`create <report-type>`,describe:`Submit an abuse report`,builder:b,handler:async d=>c({command:`abuse-reports create`,classification:{safeFlags:[`act`,`host-notification`,`owner-notification`,`ncmec-notification`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await r();o({command:`cf abuse-reports create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/${d[`report-type`]==null?`<report-type>`:encodeURIComponent(String(d[`report-type`]))}`,pathParams:{"report-type":String(d[`report-type`]??``)},bodyKind:`json`,body:d.body===void 0?f({act:p(d.act,`act`,`text`),comments:p(d.comments,`comments`,`text`),company:p(d.company,`company`,`text`),email:p(d.email,`email`,`text`),email2:p(d.email2,`email2`,`text`),name:p(d.name,`name`,`text`),reported_country:p(d[`reported-country`],`reported-country`,`text`),reported_user_agent:p(d[`reported-user-agent`],`reported-user-agent`,`text`),tele:p(d.tele,`tele`,`text`),title:p(d.title,`title`,`text`),urls:p(d.urls,`urls`,`text`),address1:p(d.address1,`address1`,`text`),agent_name:p(d[`agent-name`],`agent-name`,`text`),agree:d.agree,city:p(d.city,`city`,`text`),country:p(d.country,`country`,`text`),host_notification:p(d[`host-notification`],`host-notification`,`text`),original_work:p(d[`original-work`],`original-work`,`text`),owner_notification:p(d[`owner-notification`],`owner-notification`,`text`),signature:p(d.signature,`signature`,`text`),state:p(d.state,`state`,`text`),justification:p(d.justification,`justification`,`text`),trademark_number:p(d[`trademark-number`],`trademark-number`,`text`),trademark_office:p(d[`trademark-office`],`trademark-office`,`text`),trademark_symbol:p(d[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:p(d[`destination-ips`],`destination-ips`,`text`),ports_protocols:p(d[`ports-protocols`],`ports-protocols`,`text`),source_ips:p(d[`source-ips`],`source-ips`,`text`),ncmec_notification:p(d[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:p(d[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:d[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:d[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:p(d[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:p(d[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:d[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:p(d[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:d[`ncsei-subject-representation`]}):u(d.body)});return}let c=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${g}/abuse-reports/${encodeURIComponent(String(d[`report-type`]))}`,{body:e}));a(n,{successLabel:`Created`});return}if(d.act===void 0&&(d.act=await h(`act`,`The act field`,[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`])),d.email===void 0&&(d.email=await m(`email`,`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),d.email2===void 0&&(d.email2=await m(`email2`,"Should match the value provided in `email`")),d.name===void 0&&(d.name=await m(`name`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),d.urls===void 0&&(d.urls=await m(`urls`,`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),d[`owner-notification`]===void 0&&(d[`owner-notification`]=await h(`owner-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,[`send`,`send-anon`,`none`])),d.act===`abuse_dmca`&&d.address1===void 0&&(d.address1=await m(`address1`,`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --address1`})),d.act===`abuse_dmca`&&d[`agent-name`]===void 0&&(d[`agent-name`]=await m(`agent-name`,`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --agent-name`})),d.act===`abuse_dmca`&&d.agree===void 0)throw Error(`--agree is required (or pass --body with this field set).`);if(d.act===`abuse_dmca`&&d.city===void 0&&(d.city=await m(`city`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --city`})),d.act===`abuse_dmca`&&d.country===void 0&&(d.country=await m(`country`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). `,{question:`Enter value for --country`})),d.act===`abuse_dmca`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_dmca`&&d[`original-work`]===void 0&&(d[`original-work`]=await m(`original-work`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). `,{question:`Enter value for --original-work`})),d.act===`abuse_dmca`&&d.signature===void 0&&(d.signature=await m(`signature`,`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`,{question:`Enter value for --signature`})),d.act===`abuse_dmca`&&d.state===void 0&&(d.state=await m(`state`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --state`})),d.act===`abuse_trademark`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_trademark`&&d.justification===void 0&&(d.justification=await m(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),d.act===`abuse_trademark`&&d[`trademark-number`]===void 0&&(d[`trademark-number`]=await m(`trademark-number`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-number`})),d.act===`abuse_trademark`&&d[`trademark-office`]===void 0&&(d[`trademark-office`]=await m(`trademark-office`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-office`})),d.act===`abuse_trademark`&&d[`trademark-symbol`]===void 0&&(d[`trademark-symbol`]=await m(`trademark-symbol`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-symbol`})),d.act===`abuse_general`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_general`&&d.justification===void 0&&(d.justification=await m(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),d.act===`abuse_phishing`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_phishing`&&d.justification===void 0&&(d.justification=await m(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),d.act===`abuse_children`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_children`&&d.justification===void 0&&(d.justification=await m(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),d.act===`abuse_children`&&d[`ncmec-notification`]===void 0&&(d[`ncmec-notification`]=await m(`ncmec-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --ncmec-notification`})),d.act===`abuse_threat`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_threat`&&d.justification===void 0&&(d.justification=await m(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),d.act===`abuse_ncsei`&&d[`host-notification`]===void 0&&(d[`host-notification`]=await m(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),d.act===`abuse_ncsei`&&d[`ncsei-subject-representation`]===void 0)throw Error(`--ncsei-subject-representation is required (or pass --body with this field set).`);let _={};d.act!==void 0&&l(_,[`act`],p(d.act,`act`,`text`)),d.comments!==void 0&&l(_,[`comments`],p(d.comments,`comments`,`text`)),d.company!==void 0&&l(_,[`company`],p(d.company,`company`,`text`)),d.email!==void 0&&l(_,[`email`],p(d.email,`email`,`text`)),d.email2!==void 0&&l(_,[`email2`],p(d.email2,`email2`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d[`reported-country`]!==void 0&&l(_,[`reported_country`],p(d[`reported-country`],`reported-country`,`text`)),d[`reported-user-agent`]!==void 0&&l(_,[`reported_user_agent`],p(d[`reported-user-agent`],`reported-user-agent`,`text`)),d.tele!==void 0&&l(_,[`tele`],p(d.tele,`tele`,`text`)),d.title!==void 0&&l(_,[`title`],p(d.title,`title`,`text`)),d.urls!==void 0&&l(_,[`urls`],p(d.urls,`urls`,`text`)),d.address1!==void 0&&l(_,[`address1`],p(d.address1,`address1`,`text`)),d[`agent-name`]!==void 0&&l(_,[`agent_name`],p(d[`agent-name`],`agent-name`,`text`)),d.agree!==void 0&&l(_,[`agree`],d.agree),d.city!==void 0&&l(_,[`city`],p(d.city,`city`,`text`)),d.country!==void 0&&l(_,[`country`],p(d.country,`country`,`text`)),d[`host-notification`]!==void 0&&l(_,[`host_notification`],p(d[`host-notification`],`host-notification`,`text`)),d[`original-work`]!==void 0&&l(_,[`original_work`],p(d[`original-work`],`original-work`,`text`)),d[`owner-notification`]!==void 0&&l(_,[`owner_notification`],p(d[`owner-notification`],`owner-notification`,`text`)),d.signature!==void 0&&l(_,[`signature`],p(d.signature,`signature`,`text`)),d.state!==void 0&&l(_,[`state`],p(d.state,`state`,`text`)),d.justification!==void 0&&l(_,[`justification`],p(d.justification,`justification`,`text`)),d[`trademark-number`]!==void 0&&l(_,[`trademark_number`],p(d[`trademark-number`],`trademark-number`,`text`)),d[`trademark-office`]!==void 0&&l(_,[`trademark_office`],p(d[`trademark-office`],`trademark-office`,`text`)),d[`trademark-symbol`]!==void 0&&l(_,[`trademark_symbol`],p(d[`trademark-symbol`],`trademark-symbol`,`text`)),d[`destination-ips`]!==void 0&&l(_,[`destination_ips`],p(d[`destination-ips`],`destination-ips`,`text`)),d[`ports-protocols`]!==void 0&&l(_,[`ports_protocols`],p(d[`ports-protocols`],`ports-protocols`,`text`)),d[`source-ips`]!==void 0&&l(_,[`source_ips`],p(d[`source-ips`],`source-ips`,`text`)),d[`ncmec-notification`]!==void 0&&l(_,[`ncmec_notification`],p(d[`ncmec-notification`],`ncmec-notification`,`text`)),d[`reg-who-request-reg-who-authorization-statement`]!==void 0&&l(_,[`reg_who_request`,`reg_who_authorization_statement`],p(d[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`)),d[`reg-who-request-reg-who-good-faith-affirmation`]!==void 0&&l(_,[`reg_who_request`,`reg_who_good_faith_affirmation`],d[`reg-who-request-reg-who-good-faith-affirmation`]),d[`reg-who-request-reg-who-lawful-processing-agreement`]!==void 0&&l(_,[`reg_who_request`,`reg_who_lawful_processing_agreement`],d[`reg-who-request-reg-who-lawful-processing-agreement`]),d[`reg-who-request-reg-who-legal-basis`]!==void 0&&l(_,[`reg_who_request`,`reg_who_legal_basis`],p(d[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`)),d[`reg-who-request-reg-who-request-type`]!==void 0&&l(_,[`reg_who_request`,`reg_who_request_type`],p(d[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`)),d[`reg-who-request-reg-who-requested-data-elements`]!==void 0&&l(_,[`reg_who_request`,`reg_who_requested_data_elements`],d[`reg-who-request-reg-who-requested-data-elements`]),d[`reg-who-request-reg-who-requestor-type`]!==void 0&&l(_,[`reg_who_request`,`reg_who_requestor_type`],p(d[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)),d[`ncsei-subject-representation`]!==void 0&&l(_,[`ncsei_subject_representation`],d[`ncsei-subject-representation`]);let v=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${g}/abuse-reports/${encodeURIComponent(String(d[`report-type`]))}`,{body:Object.keys(_).length>0?_:void 0}));a(v,{successLabel:`Created`})})};function S(e){return e.usage(`$0 abuse-reports emails list-submitted <report-id>
|
|
11
|
+
|
|
12
|
+
List successful emails sent to the submitter of a report submitted by the account. Does not include emails sent to customers or hosts.`).positional(`report-id`,{type:`string`,description:`Public report code.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1).`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list-submitted <report-id>`,describe:`List emails sent to an abuse report submitter`,builder:S,handler:async t=>c({command:`abuse-reports emails list-submitted`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({command:`cf abuse-reports emails list-submitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/submitted/${t[`report-id`]==null?`<report-id>`:encodeURIComponent(String(t[`report-id`]))}/emails`,pathParams:{"report-id":String(t[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.abuseReports.emails.listSubmitted({account_id:u,report_id:t[`report-id`],...c}));a(d,{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 abuse-reports emails list
|
|
13
|
+
|
|
14
|
+
List emails sent to the customer for an abuse report. Returns all successful customer emails sent for the specified abuse report. Does not include emails sent to hosts or submitters.`).option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1)`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List abuse report emails`,builder:w,handler:async t=>c({command:`abuse-reports emails list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({command:`cf abuse-reports emails list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/${t[`report-id`]==null?`<report-id>`:encodeURIComponent(String(t[`report-id`]))}/emails`,pathParams:{"report-id":String(t[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.abuseReports.emails.list({account_id:u,report_id:t[`report-id`],...c}));a(d,{successLabel:`Loaded`})})},E={command:`emails`,describe:`Emails sent for abuse reports`,builder:e=>e.command(T).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.usage(`$0 abuse-reports get-submitted <report-id>
|
|
15
|
+
|
|
16
|
+
Retrieve a report submitted by the account.`).positional(`report-id`,{type:`string`,description:`Public report code.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get-submitted <report-id>`,describe:`Get a submitted abuse report`,builder:D,handler:async t=>c({command:`abuse-reports get-submitted`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf abuse-reports get-submitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/submitted/${t[`report-id`]==null?`<report-id>`:encodeURIComponent(String(t[`report-id`]))}`,pathParams:{"report-id":String(t[`report-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.abuseReports.getSubmitted({account_id:l,report_id:t[`report-id`]}));a(u,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 abuse-reports get <report-id>
|
|
17
|
+
|
|
18
|
+
Retrieve the details of an abuse report made against a domain or other content associated with the account. To retrieve a report that the account submitted, use the submitted abuse report endpoint instead.`).positional(`report-id`,{type:`string`,description:`Public report ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <report-id>`,describe:`Get an abuse report against the account`,builder:k,handler:async l=>c({command:`abuse-reports get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await r();o({command:`cf abuse-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/${l[`report-id`]==null?`<report-id>`:encodeURIComponent(String(l[`report-id`]))}`,pathParams:{"report-id":String(l[`report-id`]??``)},bodyKind:`none`});return}let c=await n(l),u=l.local?e:await i();l.accountId=u;let d=await s(`Loading`,async()=>t(c,`GET`,`/accounts/${u}/abuse-reports/${encodeURIComponent(String(l[`report-id`]))}`));a(d,{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 abuse-reports list-submitted
|
|
19
|
+
|
|
20
|
+
List abuse reports submitted by the account.`).option(`page`,{type:`number`,description:`Page of submitted reports to return.`}).option(`per-page`,{type:`number`,description:`Number of submitted reports per page.`}).option(`sort`,{type:`string`,description:`A property and direction to sort by (id, cdate, domain, type, status).`}).option(`id`,{type:`string`,description:`Filter by report code.`}).option(`domain`,{type:`string`,description:`Filter by reported domain. This parameter can be specified multiple times.`}).option(`created-before`,{type:`string`,description:`Return reports submitted before this time.`}).option(`created-after`,{type:`string`,description:`Return reports submitted after this time.`}).option(`status`,{type:`string`,description:`Filter by submitter-facing status. This parameter can be specified multiple times.`}).option(`type`,{type:`string`,description:`Filter by report type. This parameter can be specified multiple times.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-submitted`,describe:`List submitted abuse reports`,builder:g(j),handler:async t=>c({command:`abuse-reports list-submitted`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],sort:t.sort,id:t.id,domain:t.domain,created_before:t[`created-before`],created_after:t[`created-after`],status:t.status,type:t.type};if(t.dryRun){let e=await r();o({command:`cf abuse-reports list-submitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/submitted`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.abuseReports.listSubmitted({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 abuse-reports list
|
|
21
|
+
|
|
22
|
+
List abuse reports made against domains or other content associated with the account. To list reports that the account submitted, use the submitted abuse reports endpoint instead.`).option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order (id, cdate, domain, type, status)`}).option(`domain`,{type:`string`,description:`Filter by domain name related to the abuse report`}).option(`created-before`,{type:`string`,description:`Returns reports created before the specified date`}).option(`created-after`,{type:`string`,description:`Returns reports created after the specified date`}).option(`status`,{type:`string`,description:`Filter by the status of the report.`,choices:[`accepted`,`in_review`]}).option(`type`,{type:`string`,description:`Filter by the type of the report.`,choices:[`PHISH`,`GEN`,`THREAT`,`DMCA`,`EMER`,`TM`,`REG_WHO`,`NCSEI`,`NETWORK`]}).option(`mitigation-status`,{type:`string`,description:`Filter reports that have any mitigations in the given status.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List abuse reports against the account`,builder:g(N),handler:async t=>c({command:`abuse-reports list`,classification:{safeFlags:[`status`,`type`,`mitigation-status`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],sort:t.sort,domain:t.domain,created_before:t[`created-before`],created_after:t[`created-after`],status:t.status,type:t.type,mitigation_status:t[`mitigation-status`]};if(t.dryRun){let e=await r();o({command:`cf abuse-reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.abuseReports.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 abuse-reports mitigations list
|
|
23
|
+
|
|
24
|
+
List mitigations done to remediate the abuse report.`).option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order`,choices:[`type,asc`,`type,desc`,`effective_date,asc`,`effective_date,desc`,`status,asc`,`status,desc`,`entity_type,asc`,`entity_type,desc`]}).option(`type`,{type:`string`,description:`Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set.`}).option(`effective-before`,{type:`string`,description:`Returns mitigations that were dispatched before the given date`}).option(`effective-after`,{type:`string`,description:`Returns mitigation that were dispatched after the given date`}).option(`status`,{type:`string`,description:`Filter by the status of the mitigation.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`entity-type`,{type:`string`,description:`Filter by the type of entity the mitigation impacts.`,choices:[`url_pattern`,`account`,`zone`,`custom_expression`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List abuse report mitigations`,builder:g(F),handler:async t=>c({command:`abuse-reports mitigations list`,classification:{safeFlags:[`sort`,`status`,`entity-type`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],sort:t.sort,type:t.type,effective_before:t[`effective-before`],effective_after:t[`effective-after`],status:t.status,entity_type:t[`entity-type`]};if(t.dryRun){let e=await r();o({command:`cf abuse-reports mitigations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/${t[`report-id`]==null?`<report-id>`:encodeURIComponent(String(t[`report-id`]))}/mitigations`,pathParams:{"report-id":String(t[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.abuseReports.mitigations.list({account_id:u,report_id:t[`report-id`],...c}));a(d,{successLabel:`Loaded`})})};function L(e){return e.usage("$0 abuse-reports mitigations review <report-id>\n\nRequest a review of mitigations applied because of an abuse report, or submit a report-level appeal. - To request a review of specific mitigations, send `appeals` with the mitigation IDs and reasons. Repeating a request for a mitigation with an unresolved appeal is idempotent and returns that mitigation in the in-review state. - To submit a report-level appeal, send `type` and, for a `counter_notice`, the counter-notice details in `data`. Report-level appeals are currently available only for DMCA (copyright) reports.").positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`appeals`,{type:`string`,description:`List of mitigations to appeal. Provide as a JSON array of objects or @path/to/file.json.`}).option(`data-city`,{type:`string`,description:`The data.city field`}).option(`data-company`,{type:`string`,description:`The data.company field`}).option(`data-counter-notice-response`,{type:`string`,description:`The data.counter_notice_response field`}).option(`data-country`,{type:`string`,description:`The data.country field`}).option(`data-email`,{type:`string`,description:`The data.email field`}).option(`data-full-name`,{type:`string`,description:`The data.full_name field`}).option(`data-jurisdiction-consent`,{type:`boolean`,description:`The data.jurisdiction_consent field`}).option(`data-perjury-attestation`,{type:`boolean`,description:`The data.perjury_attestation field`}).option(`data-phone-number`,{type:`string`,description:`The data.phone_number field`}).option(`data-signature`,{type:`string`,description:`The data.signature field`}).option(`data-state`,{type:`string`,description:`The data.state field`}).option(`data-street-address`,{type:`string`,description:`The data.street_address field`}).option(`data-urls`,{type:`string`,array:!0,description:`The data.urls field`}).option(`data-zip-code`,{type:`string`,description:`The data.zip_code field`}).option(`type`,{type:`string`,description:`The type of appeal being submitted.`,choices:[`counter_notice`,`content_removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Submit an appeal for a report. Provide either a list of mitigations to appeal, or an appeal type with its supporting details, but not both. When type is "counter_notice", the counter-notice details are required.`}).check(e=>{if([`data-city`,`data-company`,`data-counter-notice-response`,`data-country`,`data-email`,`data-full-name`,`data-jurisdiction-consent`,`data-perjury-attestation`,`data-phone-number`,`data-signature`,`data-state`,`data-street-address`,`data-urls`,`data-zip-code`].some(t=>e[t]!==void 0)){let t=[`data-city`,`data-country`,`data-email`,`data-full-name`,`data-jurisdiction-consent`,`data-perjury-attestation`,`data-phone-number`,`data-signature`,`data-state`,`data-street-address`,`data-urls`,`data-zip-code`].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 --data-* flag is set`)}return!0})}const R={command:`review <report-id>`,describe:`Request review on mitigations`,builder:L,handler:async t=>c({command:`abuse-reports mitigations review`,classification:{safeFlags:[`data-jurisdiction-consent`,`data-perjury-attestation`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf abuse-reports mitigations review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/abuse-reports/${t[`report-id`]==null?`<report-id>`:encodeURIComponent(String(t[`report-id`]))}/mitigations/appeal`,pathParams:{"report-id":String(t[`report-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({appeals:d(t.appeals,`appeals`),data:{city:p(t[`data-city`],`data-city`,`text`),company:p(t[`data-company`],`data-company`,`text`),counter_notice_response:p(t[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:p(t[`data-country`],`data-country`,`text`),email:p(t[`data-email`],`data-email`,`text`),full_name:p(t[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:t[`data-jurisdiction-consent`],perjury_attestation:t[`data-perjury-attestation`],phone_number:p(t[`data-phone-number`],`data-phone-number`,`text`),signature:p(t[`data-signature`],`data-signature`,`text`),state:p(t[`data-state`],`data-state`,`text`),street_address:p(t[`data-street-address`],`data-street-address`,`text`),urls:t[`data-urls`],zip_code:p(t[`data-zip-code`],`data-zip-code`,`text`)},type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.abuseReports.mitigations.review({body:e,account_id:l,report_id:t[`report-id`]}));a(n,{successLabel:`Created`});return}let m=f({appeals:d(t.appeals,`appeals`),data:{city:p(t[`data-city`],`data-city`,`text`),company:p(t[`data-company`],`data-company`,`text`),counter_notice_response:p(t[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:p(t[`data-country`],`data-country`,`text`),email:p(t[`data-email`],`data-email`,`text`),full_name:p(t[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:t[`data-jurisdiction-consent`],perjury_attestation:t[`data-perjury-attestation`],phone_number:p(t[`data-phone-number`],`data-phone-number`,`text`),signature:p(t[`data-signature`],`data-signature`,`text`),state:p(t[`data-state`],`data-state`,`text`),street_address:p(t[`data-street-address`],`data-street-address`,`text`),urls:t[`data-urls`],zip_code:p(t[`data-zip-code`],`data-zip-code`,`text`)},type:p(t.type,`type`,`text`)}),h=await s(`Creating`,async()=>c.abuseReports.mitigations.review({body:m,account_id:l,report_id:t[`report-id`]}));a(h,{successLabel:`Created`})})},z={command:`mitigations`,describe:`Mitigation actions taken in response to abuse reports`,builder:e=>e.command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},B={command:`abuse-reports`,describe:`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,builder:e=>e.command(x).command(A).command(O).command(P).command(M).command(y).command(E).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{B as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-_vZGz6mv.mjs";var t=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-CUkXxZsc.mjs`),{command:`access curl`,recordArgs:!1}),n=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-VuxpEvmH.mjs`),{command:`access login`,recordArgs:!1}),r=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-DyE8v4sd.mjs`),{command:`access ssh-config`,recordArgs:!1}),i=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-BQpXcGKV.mjs`),{command:`access ssh-gen`,recordArgs:!1}),a={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-CRl00uA2.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},o=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-DBaNgfA4.mjs`),{command:`access token`,recordArgs:!1});const s={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t).command(n).command(r).command(i).command(a).command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,i,t as a}from"./context-Bwkz4Lm_.mjs";import{t as o}from"./output-BGqhvqe2.mjs";import{t as s}from"./dry-run-DmsbOMF1.mjs";import{t as c}from"./progress-BYVZuEcG.mjs";import{t as l}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as u,n as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-F5wxc8zq.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";function v(e){return e.usage(`$0 account-tags delete
|
|
3
|
+
|
|
4
|
+
Removes all tags from a specific account or zone-level resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
5
|
+
verify the current resource ETag matches before applying the write. Returns
|
|
6
|
+
412 Precondition Failed if the resource has been modified since the ETag was
|
|
7
|
+
obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const y={command:`delete`,describe:`Delete tags from an account or zone-level resource`,builder:v,handler:async _=>l({command:`account-tags delete`,classification:{safeFlags:[`resource-type`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},_,async()=>{let l={};if(_[`if-match`]!==void 0&&(l[`If-Match`]=String(_[`if-match`])),_.dryRun){let e=_.zone===void 0?await r():void 0,t=_.zone===void 0?`accounts`:`zones`,n=_.zone??e??`<account-id>`;s({command:`cf account-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:_.body===void 0?f({resource_id:p(_[`resource-id`],`resource-id`,`text`),resource_type:p(_[`resource-type`],`resource-type`,`text`),worker_id:p(_[`worker-id`],`worker-id`,`text`)}):d(_.body)});return}let v=await n(_),y=_.zone===void 0?`accounts`:`zones`,b=y===`zones`?await i({zone:_.zone},v,{quiet:_.quiet}):_.local?e:await a();if(y===`zones`?_.zoneId=b:_.accountId=b,!await g({force:!!_.force})){process.stderr.write(`Aborted.
|
|
8
|
+
`);return}if(_.body){let e=d(_.body),n=await c(`Deleting`,async()=>t(v,`DELETE`,`/${y}/${b}/tags`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(n,{successLabel:`Deleted`});return}_[`resource-id`]===void 0&&(_[`resource-id`]=await m(`resource-id`,`Identifies the unique resource.`)),_[`resource-type`]===void 0&&(_[`resource-type`]=await h(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),_[`resource-type`]===`worker_version`&&_[`worker-id`]===void 0&&(_[`worker-id`]=await m(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let x={};_[`resource-id`]!==void 0&&u(x,[`resource_id`],p(_[`resource-id`],`resource-id`,`text`)),_[`resource-type`]!==void 0&&u(x,[`resource_type`],p(_[`resource-type`],`resource-type`,`text`)),_[`worker-id`]!==void 0&&u(x,[`worker_id`],p(_[`worker-id`],`worker-id`,`text`));let S=await c(`Deleting`,async()=>t(v,`DELETE`,`/${y}/${b}/tags`,{body:Object.keys(x).length>0?x:void 0,headers:Object.keys(l).length>0?l:void 0}));o(S,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 account-tags get
|
|
9
|
+
|
|
10
|
+
Retrieves tags for a specific account or zone-level resource.`).option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:/* @__PURE__ */ `access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_version`.split(`.`),demandOption:!0}).option(`worker-id`,{type:`string`,description:`Worker identifier. Required for worker_version resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get tags for an account or zone-level resource`,builder:_(b),handler:async t=>l({command:`account-tags get`,classification:{safeFlags:[`resource-type`,`dry-run`]}},t,async()=>{let l={resource_id:t[`resource-id`],resource_type:t[`resource-type`],worker_id:t[`worker-id`]};if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf account-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/tags`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(t),d=t.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:t.zone},u,{quiet:t.quiet}):t.local?e:await a();d===`zones`?t.zoneId=f:t.accountId=f;let p=await c(`Loading`,async()=>u.accountTags.get({account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 account-tags update
|
|
11
|
+
|
|
12
|
+
Creates or updates tags for a specific account or zone-level resource. Replaces all existing tags for the resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
13
|
+
verify the current resource ETag matches before applying the write. Returns
|
|
14
|
+
412 Precondition Failed if the resource has been modified since the ETag was
|
|
15
|
+
obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:/* @__PURE__ */ `worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on account-level resources.`})}const C={command:`update`,describe:`Set tags for an account or zone-level resource`,builder:S,handler:async g=>l({command:`account-tags update`,classification:{safeFlags:[`resource-type`,`dry-run`]}},g,async()=>{let l={};if(g[`if-match`]!==void 0&&(l[`If-Match`]=String(g[`if-match`])),g.dryRun){let e=g.zone===void 0?await r():void 0,t=g.zone===void 0?`accounts`:`zones`,n=g.zone??e??`<account-id>`;s({command:`cf account-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:g.body===void 0?f({resource_id:p(g[`resource-id`],`resource-id`,`text`),resource_type:p(g[`resource-type`],`resource-type`,`text`),worker_id:p(g[`worker-id`],`worker-id`,`text`)}):d(g.body)});return}let _=await n(g),v=g.zone===void 0?`accounts`:`zones`,y=v===`zones`?await i({zone:g.zone},_,{quiet:g.quiet}):g.local?e:await a();if(v===`zones`?g.zoneId=y:g.accountId=y,g.body){let e=d(g.body),n=await c(`Updating`,async()=>t(_,`PUT`,`/${v}/${y}/tags`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(n,{successLabel:`Updated`});return}g[`resource-id`]===void 0&&(g[`resource-id`]=await m(`resource-id`,`Identifies the unique resource.`)),g[`resource-type`]===void 0&&(g[`resource-type`]=await h(`resource-type`,`Enum for worker_version resource type.`,/* @__PURE__ */ `worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.cws_deployment.cws_policy.cws_policy_set.cws_workload.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),g[`resource-type`]===`worker_version`&&g[`worker-id`]===void 0&&(g[`worker-id`]=await m(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let b={};g[`resource-id`]!==void 0&&u(b,[`resource_id`],p(g[`resource-id`],`resource-id`,`text`)),g[`resource-type`]!==void 0&&u(b,[`resource_type`],p(g[`resource-type`],`resource-type`,`text`)),g[`worker-id`]!==void 0&&u(b,[`worker_id`],p(g[`worker-id`],`worker-id`,`text`));let x=await c(`Updating`,async()=>t(_,`PUT`,`/${v}/${y}/tags`,{body:Object.keys(b).length>0?b:void 0,headers:Object.keys(l).length>0?l:void 0}));o(x,{successLabel:`Updated`})})},w={command:`account-tags`,describe:`account-tags`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,i,t as a}from"./context-Bwkz4Lm_.mjs";import{t as o}from"./output-BGqhvqe2.mjs";import{t as s}from"./dry-run-DmsbOMF1.mjs";import{t as c}from"./progress-BYVZuEcG.mjs";import{t as l}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-DkHKPkJ7.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-F5wxc8zq.mjs";import{t as v}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-DyYWa923.mjs";function y(e){return e.usage(`$0 accounts applications create
|
|
3
|
+
|
|
4
|
+
Create a custom application for an account.`).option(`category-id`,{type:`number`,description:`Returns the category ID.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Returns the human readable ID.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`name`,{type:`string`,description:`Returns the application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom application. At least one hostname or IP subnet is required. Support domains and port/protocol pairs do not satisfy this requirement. `})}const b={command:`create`,describe:`Create application`,builder:y,handler:async t=>l({command:`accounts applications create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({category_id:t[`category-id`],hostnames:t.hostnames,human_id:m(t[`human-id`],`human-id`,`text`),ip_subnets:t[`ip-subnets`],name:m(t.name,`name`,`text`),port_protocols:t[`port-protocols`],support_domains:t[`support-domains`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.applications.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}if(t[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);t[`human-id`]===void 0&&(t[`human-id`]=await h(`human-id`,`Returns the human readable ID.`)),t.name===void 0&&(t.name=await h(`name`,`Returns the application name.`));let u=p({category_id:t[`category-id`],hostnames:t.hostnames,human_id:m(t[`human-id`],`human-id`,`text`),ip_subnets:t[`ip-subnets`],name:m(t.name,`name`,`text`),port_protocols:t[`port-protocols`],support_domains:t[`support-domains`]}),f=await c(`Creating`,async()=>i.accounts.applications.create({body:u,account_id:l}));o(f,{successLabel:`Created`})})};function x(e){return e.usage(`$0 accounts applications delete <id>
|
|
5
|
+
|
|
6
|
+
Delete a custom application and all of its versions. Deletion is rejected when other resources reference the application.`).positional(`id`,{type:`string`,description:`Application ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <id>`,describe:`Delete application`,builder:x,handler:async t=>l({command:`accounts applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/applications/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.applications.delete({account_id:l,id:t.id}));o(u,{successLabel:`Deleted`})})};function C(e){return e.usage("$0 accounts applications get applications\n\nList the applications available to an account, both the applications Cloudflare curates and the custom applications the account has defined. Results are paginated. Use `filter` and `search` to narrow the list, `order_by` to sort it, and `fields` to reduce each result to only the properties you need. The authenticated principal must have access to the account identified by `account_id`.").option(`filter`,{type:`string`,description:`Filter applications using key:value format. Supported filter keys:
|
|
8
|
+
- name: Filter by application name (e.g., name:HR)
|
|
9
|
+
- id: Filter by application ID (e.g., id:498)
|
|
10
|
+
- human_id: Filter by human-readable ID (e.g., human_id:HR)
|
|
11
|
+
- hostname: Filter by hostname or support domain (e.g., hostname:portal.example.com)
|
|
12
|
+
- source: Filter by application source name (e.g., source:cloudflare)
|
|
13
|
+
- ip_subnet: Filter by IP subnet using CIDR containment — returns applications where any stored subnet contains the search value (e.g., ip_subnet:10.0.1.5/32 matches apps with 10.0.0.0/16)
|
|
14
|
+
- category_id: Filter by category ID (e.g., category_id:12).
|
|
15
|
+
- category_name: Filter by category name (e.g., category_name:HR).
|
|
16
|
+
- supported: Filter by supported Cloudflare product (e.g., supported:ACCESS). Values: GATEWAY, ACCESS, CASB.
|
|
17
|
+
- review_status: Filter by the account's Gateway review status. Values: approved, unapproved, in_review, unreviewed.
|
|
18
|
+
.`}).option(`limit`,{type:`number`,description:`Limit of number of results to return (max 250).`}).option(`offset`,{type:`number`,description:`Offset of results to return.`}).option(`order-by`,{type:`string`,description:`Order results using field:direction format. Supported fields are name, id, human_id,
|
|
19
|
+
category_id, application_type, application_confidence_score, and gen_ai_score.
|
|
20
|
+
Supported directions are asc and desc. Ignored when search is provided; results are
|
|
21
|
+
ranked by relevance instead.`}).option(`search`,{type:`string`,description:`Fuzzy search across application name and hostnames. Results are ranked by relevance. Must be between 2 and 200 characters. Can be combined with filter parameters.`}).option(`fields`,{type:`string`,description:"Return only the listed properties on each application, as a comma-separated list.\nUse this to keep responses small when you only need part of each application — for\nexample populating a picker with `fields=id,name` instead of downloading every\nhostname and IP subnet.\n\nOmit this parameter to receive the full application object.\n\n`id` is always returned.\n\nSelectable properties: `id`, `name`, `human_id`, `version`, `hostnames`,\n`support_domains`, `ip_subnets`, `port_protocols`, `supported`, `gen_ai_score`,\n`application_confidence_score`, `created_at`, `updated_at`, `review_status`.\n\nUnknown or empty property names return `400`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`applications`,describe:`List applications`,builder:C,handler:async t=>l({command:`accounts applications get applications`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={filter:t.filter,limit:t.limit,offset:t.offset,order_by:t[`order-by`],search:t.search,fields:t.fields};if(t.dryRun){let e=await r();s({command:`cf accounts applications get applications`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/applications`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.applications.get.applications({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 accounts applications get by id <id>
|
|
22
|
+
|
|
23
|
+
Get application by ID.`).positional(`id`,{type:`string`,description:`Application ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`id <id>`,describe:`Get application`,builder:T,handler:async t=>l({command:`accounts applications get by id`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts applications get by id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/applications/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.applications.get.by.id({account_id:l,id:t.id}));o(u,{successLabel:`Loaded`})})},D={command:`by`,describe:`Operations for applications.get.by`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`get`,describe:`Operations for applications.get`,builder:e=>e.command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 accounts applications update <id>
|
|
24
|
+
|
|
25
|
+
Replace the network matchers for a custom application and create a new version.`).positional(`id`,{type:`string`,description:`Application ID.`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update the network matchers for the application. The service preserves omitted matcher lists; send an empty array to clear a list. The resulting application must contain at least one hostname or IP subnet. Support domains and port/protocol pairs do not satisfy this requirement. `})}const A={command:`update <id>`,describe:`Update application`,builder:k,handler:async t=>l({command:`accounts applications update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts applications update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/applications/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`json`,body:t.body===void 0?p({hostnames:t.hostnames,ip_subnets:t[`ip-subnets`],port_protocols:t[`port-protocols`],support_domains:t[`support-domains`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.applications.update({...e,account_id:l,id:t.id}));o(n,{successLabel:`Updated`});return}let u=p({hostnames:t.hostnames,ip_subnets:t[`ip-subnets`],port_protocols:t[`port-protocols`],support_domains:t[`support-domains`]}),f=await c(`Updating`,async()=>i.accounts.applications.update({...u,account_id:l,id:t.id}));o(f,{successLabel:`Updated`})})},j={command:`applications`,describe:`Applications operations`,builder:e=>e.command(b).command(S).command(A).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 accounts billing createSetupIntent
|
|
26
|
+
|
|
27
|
+
Creates a Stripe setup intent for adding a payment method to an account. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`createSetupIntent`,describe:`Create Setup Intent`,builder:M,handler:async t=>l({command:`accounts billing createSetupIntent`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing createSetupIntent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/client-secret`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Creating`,async()=>i.accounts.billing.createSetupIntent({account_id:l}));o(u,{successLabel:`Created`})})};function P(e){return e.usage(`$0 accounts billing getBadDebt
|
|
28
|
+
|
|
29
|
+
Gets bad debt information for an account, including outstanding invoices and total debt amount.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`getBadDebt`,describe:`Get Account Bad Debt`,builder:P,handler:async t=>l({command:`accounts billing getBadDebt`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing getBadDebt`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/bad-debt`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.billing.getBadDebt({account_id:l}));o(u,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 accounts billing getCredits
|
|
30
|
+
|
|
31
|
+
Gets the credit balance and eligibility for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`getCredits`,describe:`Get Account Credits`,builder:I,handler:async t=>l({command:`accounts billing getCredits`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing getCredits`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/credits`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.billing.getCredits({account_id:l}));o(u,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 accounts billing getReceiptPdf <receipt-id>
|
|
32
|
+
|
|
33
|
+
Downloads a receipt as a PDF document.`).positional(`receipt-id`,{type:`string`,description:`Receipt identifier.`,demandOption:!0}).option(`doctype`,{type:`string`,description:`The document type to generate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const z={command:`getReceiptPdf <receipt-id>`,describe:`Get Receipt PDF`,builder:R,handler:async t=>l({command:`accounts billing getReceiptPdf`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{let i={doctype:t.doctype};if(t.dryRun){let e=await r();s({command:`cf accounts billing getReceiptPdf`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/receipts/${t[`receipt-id`]==null?`<receipt-id>`:encodeURIComponent(String(t[`receipt-id`]))}/pdf`,pathParams:{"receipt-id":String(t[`receipt-id`]??``)},query:i,bodyKind:`none`});return}await n(t);let o=t.local?e:await a();t.accountId=o;let l=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>te(`/accounts/${o}/receipts/${encodeURIComponent(String(t[`receipt-id`]))}/pdf${l?`?`+l:``}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));ee(t.text===!0?u.toString(`utf-8`):u)})};function B(e){return e.usage(`$0 accounts billing getUnpaidInvoices
|
|
34
|
+
|
|
35
|
+
Gets unpaid invoice information for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`getUnpaidInvoices`,describe:`Get Unpaid Invoices`,builder:B,handler:async t=>l({command:`accounts billing getUnpaidInvoices`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing getUnpaidInvoices`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/unpaid-invoice`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.billing.getUnpaidInvoices({account_id:l}));o(u,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 accounts billing history list
|
|
36
|
+
|
|
37
|
+
Gets the billing history for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`status`,{type:`string`,description:`Filter billing history by status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`Get Account Billing History`,builder:H,handler:async t=>l({command:`accounts billing history list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`],status:t.status};if(t.dryRun){let e=await r();s({command:`cf accounts billing history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/history`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.billing.history.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},W={command:`history`,describe:`Operations for billing.history`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 accounts billing payBadDebt
|
|
38
|
+
|
|
39
|
+
Pays outstanding bad debt for an account. Discovers all debt automatically and handles invoice deduplication.`).option(`payment-method-id`,{type:`string`,description:`The payment method to use. If omitted, the default payment method is used.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`payBadDebt`,describe:`Pay Bad Debt`,builder:G,handler:async t=>l({command:`accounts billing payBadDebt`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payBadDebt`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-bad-debt`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({payment_method_id:m(t[`payment-method-id`],`payment-method-id`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.billing.payBadDebt({...e,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({payment_method_id:m(t[`payment-method-id`],`payment-method-id`,`text`)}),f=await c(`Creating`,async()=>i.accounts.billing.payBadDebt({...u,account_id:l}));o(f,{successLabel:`Created`})})};function q(e){return e.usage(`$0 accounts billing payInvoice
|
|
40
|
+
|
|
41
|
+
Pays an outstanding invoice for an account. Returns a Stripe client secret when Strong Customer Authentication (SCA) is required to complete the payment.`).option(`invoice-id`,{type:`string`,description:`The identifier of the invoice to pay.`}).option(`payment-method-id`,{type:`string`,description:`The payment method to use. If omitted, the default payment method is used.`}).option(`validate-payment-method`,{type:`boolean`,description:`Whether to validate the payment method before processing.`}).option(`dry-run`,{type:`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 J={command:`payInvoice`,describe:`Pay Invoice`,builder:q,handler:async t=>l({command:`accounts billing payInvoice`,classification:{safeFlags:[`validate-payment-method`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payInvoice`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-invoice`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({invoice_id:m(t[`invoice-id`],`invoice-id`,`text`),payment_method_id:m(t[`payment-method-id`],`payment-method-id`,`text`),validate_payment_method:t[`validate-payment-method`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.billing.payInvoice({...e,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({invoice_id:m(t[`invoice-id`],`invoice-id`,`text`),payment_method_id:m(t[`payment-method-id`],`payment-method-id`,`text`),validate_payment_method:t[`validate-payment-method`]}),f=await c(`Creating`,async()=>i.accounts.billing.payInvoice({...u,account_id:l}));o(f,{successLabel:`Created`})})};function Y(e){return e.usage(`$0 accounts billing payment-methods create
|
|
42
|
+
|
|
43
|
+
Creates a new payment method for an account.`).option(`address`,{type:`string`,description:`Billing address line 1.`}).option(`address2`,{type:`string`,description:`Billing address line 2.`}).option(`bank-account-type`,{type:`string`,description:`Bank account type.`}).option(`bank-code`,{type:`string`,description:`Bank code.`}).option(`bank-country`,{type:`string`,description:`Bank country.`}).option(`bank-name`,{type:`string`,description:`Bank name for bank-based payment methods.`}).option(`bank-routing-number`,{type:`string`,description:`Bank routing number.`}).option(`cashapp-cash-tag`,{type:`string`,description:`Cash App cash tag.`}).option(`city`,{type:`string`,description:`Billing city.`}).option(`country`,{type:`string`,description:`Billing country.`}).option(`default`,{type:`boolean`,description:`Whether this is the default payment method.`}).option(`device-data`,{type:`string`,description:`Device data for fraud prevention.`}).option(`first-name`,{type:`string`,description:`Billing first name.`}).option(`last-name`,{type:`string`,description:`Billing last name.`}).option(`nick-name`,{type:`string`,description:`A nickname for the payment method.`}).option(`payment-account-email`,{type:`string`,description:`Email associated with the payment account.`}).option(`payment-email`,{type:`string`,description:`Payment email address.`}).option(`payment-gateway`,{type:`string`,description:`The payment gateway used.`}).option(`payment-nonce`,{type:`string`,description:`Payment nonce for tokenized payments.`}).option(`state`,{type:`string`,description:`Billing state.`}).option(`type`,{type:`string`,description:`The payment method type.`,choices:[`CREDIT_CARD`,`PAYPAL`,`CASHAPP`,`SEPA_DEBIT`,`LINK`,`ACH_DIRECT_DEBIT`]}).option(`zipcode`,{type:`string`,description:`Billing zip code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`create`,describe:`Create Payment Method`,builder:Y,handler:async t=>l({command:`accounts billing payment-methods create`,classification:{safeFlags:[`default`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payment-methods create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({address:m(t.address,`address`,`text`),address2:m(t.address2,`address2`,`text`),bank_account_type:m(t[`bank-account-type`],`bank-account-type`,`text`),bank_code:m(t[`bank-code`],`bank-code`,`text`),bank_country:m(t[`bank-country`],`bank-country`,`text`),bank_name:m(t[`bank-name`],`bank-name`,`text`),bank_routing_number:m(t[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:m(t[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:m(t.city,`city`,`text`),country:m(t.country,`country`,`text`),default:t.default,device_data:m(t[`device-data`],`device-data`,`text`),first_name:m(t[`first-name`],`first-name`,`text`),last_name:m(t[`last-name`],`last-name`,`text`),nick_name:m(t[`nick-name`],`nick-name`,`text`),payment_account_email:m(t[`payment-account-email`],`payment-account-email`,`text`),payment_email:m(t[`payment-email`],`payment-email`,`text`),payment_gateway:m(t[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:m(t[`payment-nonce`],`payment-nonce`,`text`),state:m(t.state,`state`,`text`),type:m(t.type,`type`,`text`),zipcode:m(t.zipcode,`zipcode`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.billing.paymentMethods.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({address:m(t.address,`address`,`text`),address2:m(t.address2,`address2`,`text`),bank_account_type:m(t[`bank-account-type`],`bank-account-type`,`text`),bank_code:m(t[`bank-code`],`bank-code`,`text`),bank_country:m(t[`bank-country`],`bank-country`,`text`),bank_name:m(t[`bank-name`],`bank-name`,`text`),bank_routing_number:m(t[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:m(t[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:m(t.city,`city`,`text`),country:m(t.country,`country`,`text`),default:t.default,device_data:m(t[`device-data`],`device-data`,`text`),first_name:m(t[`first-name`],`first-name`,`text`),last_name:m(t[`last-name`],`last-name`,`text`),nick_name:m(t[`nick-name`],`nick-name`,`text`),payment_account_email:m(t[`payment-account-email`],`payment-account-email`,`text`),payment_email:m(t[`payment-email`],`payment-email`,`text`),payment_gateway:m(t[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:m(t[`payment-nonce`],`payment-nonce`,`text`),state:m(t.state,`state`,`text`),type:m(t.type,`type`,`text`),zipcode:m(t.zipcode,`zipcode`,`text`)}),f=await c(`Creating`,async()=>i.accounts.billing.paymentMethods.create({body:u,account_id:l}));o(f,{successLabel:`Created`})})};function Z(e){return e.usage(`$0 accounts billing payment-methods delete <payment-method-id>
|
|
44
|
+
|
|
45
|
+
Deletes a payment method from an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method 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 <payment-method-id>`,describe:`Delete Payment Method`,builder:Z,handler:async t=>l({command:`accounts billing payment-methods delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payment-methods delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods/${t[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(t[`payment-method-id`]))}`,pathParams:{"payment-method-id":String(t[`payment-method-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
46
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.billing.paymentMethods.delete({account_id:l,payment_method_id:t[`payment-method-id`]}));o(u,{successLabel:`Deleted`})})};function ne(e){return e.usage(`$0 accounts billing payment-methods get <payment-method-id>
|
|
47
|
+
|
|
48
|
+
Gets a specific payment method for an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <payment-method-id>`,describe:`Get Payment Method`,builder:ne,handler:async t=>l({command:`accounts billing payment-methods get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payment-methods get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods/${t[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(t[`payment-method-id`]))}`,pathParams:{"payment-method-id":String(t[`payment-method-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.billing.paymentMethods.get({account_id:l,payment_method_id:t[`payment-method-id`]}));o(u,{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 accounts billing payment-methods list
|
|
49
|
+
|
|
50
|
+
Lists all payment methods for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Payment Methods`,builder:ie,handler:async t=>l({command:`accounts billing payment-methods list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf accounts billing payment-methods list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.billing.paymentMethods.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 accounts billing payment-methods setDefault <payment-method-id>
|
|
51
|
+
|
|
52
|
+
Sets a payment method as the default for an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`setDefault <payment-method-id>`,describe:`Set Default Payment Method`,builder:oe,handler:async t=>l({command:`accounts billing payment-methods setDefault`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payment-methods setDefault`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods/${t[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(t[`payment-method-id`]))}/set-as-default`,pathParams:{"payment-method-id":String(t[`payment-method-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Creating`,async()=>i.accounts.billing.paymentMethods.setDefault({account_id:l,payment_method_id:t[`payment-method-id`]}));o(u,{successLabel:`Created`})})};function ce(e){return e.usage(`$0 accounts billing payment-methods update <payment-method-id>
|
|
53
|
+
|
|
54
|
+
Updates a payment method for an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`Billing address line 1.`}).option(`address2`,{type:`string`,description:`Billing address line 2.`}).option(`bank-account-type`,{type:`string`,description:`Bank account type.`}).option(`bank-code`,{type:`string`,description:`Bank code.`}).option(`bank-country`,{type:`string`,description:`Bank country.`}).option(`bank-name`,{type:`string`,description:`Bank name for bank-based payment methods.`}).option(`bank-routing-number`,{type:`string`,description:`Bank routing number.`}).option(`cashapp-cash-tag`,{type:`string`,description:`Cash App cash tag.`}).option(`city`,{type:`string`,description:`Billing city.`}).option(`country`,{type:`string`,description:`Billing country.`}).option(`default`,{type:`boolean`,description:`Whether this is the default payment method.`}).option(`device-data`,{type:`string`,description:`Device data for fraud prevention.`}).option(`first-name`,{type:`string`,description:`Billing first name.`}).option(`last-name`,{type:`string`,description:`Billing last name.`}).option(`nick-name`,{type:`string`,description:`A nickname for the payment method.`}).option(`payment-account-email`,{type:`string`,description:`Email associated with the payment account.`}).option(`payment-email`,{type:`string`,description:`Payment email address.`}).option(`payment-gateway`,{type:`string`,description:`The payment gateway used.`}).option(`payment-nonce`,{type:`string`,description:`Payment nonce for tokenized payments.`}).option(`state`,{type:`string`,description:`Billing state.`}).option(`type`,{type:`string`,description:`The payment method type.`,choices:[`CREDIT_CARD`,`PAYPAL`,`CASHAPP`,`SEPA_DEBIT`,`LINK`,`ACH_DIRECT_DEBIT`]}).option(`zipcode`,{type:`string`,description:`Billing zip code.`}).option(`dry-run`,{type:`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 le={command:`update <payment-method-id>`,describe:`Update Payment Method`,builder:ce,handler:async t=>l({command:`accounts billing payment-methods update`,classification:{safeFlags:[`default`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing payment-methods update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods/${t[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(t[`payment-method-id`]))}`,pathParams:{"payment-method-id":String(t[`payment-method-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({address:m(t.address,`address`,`text`),address2:m(t.address2,`address2`,`text`),bank_account_type:m(t[`bank-account-type`],`bank-account-type`,`text`),bank_code:m(t[`bank-code`],`bank-code`,`text`),bank_country:m(t[`bank-country`],`bank-country`,`text`),bank_name:m(t[`bank-name`],`bank-name`,`text`),bank_routing_number:m(t[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:m(t[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:m(t.city,`city`,`text`),country:m(t.country,`country`,`text`),default:t.default,device_data:m(t[`device-data`],`device-data`,`text`),first_name:m(t[`first-name`],`first-name`,`text`),last_name:m(t[`last-name`],`last-name`,`text`),nick_name:m(t[`nick-name`],`nick-name`,`text`),payment_account_email:m(t[`payment-account-email`],`payment-account-email`,`text`),payment_email:m(t[`payment-email`],`payment-email`,`text`),payment_gateway:m(t[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:m(t[`payment-nonce`],`payment-nonce`,`text`),state:m(t.state,`state`,`text`),type:m(t.type,`type`,`text`),zipcode:m(t.zipcode,`zipcode`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.billing.paymentMethods.update({body:e,account_id:l,payment_method_id:t[`payment-method-id`]}));o(n,{successLabel:`Updated`});return}let u=p({address:m(t.address,`address`,`text`),address2:m(t.address2,`address2`,`text`),bank_account_type:m(t[`bank-account-type`],`bank-account-type`,`text`),bank_code:m(t[`bank-code`],`bank-code`,`text`),bank_country:m(t[`bank-country`],`bank-country`,`text`),bank_name:m(t[`bank-name`],`bank-name`,`text`),bank_routing_number:m(t[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:m(t[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:m(t.city,`city`,`text`),country:m(t.country,`country`,`text`),default:t.default,device_data:m(t[`device-data`],`device-data`,`text`),first_name:m(t[`first-name`],`first-name`,`text`),last_name:m(t[`last-name`],`last-name`,`text`),nick_name:m(t[`nick-name`],`nick-name`,`text`),payment_account_email:m(t[`payment-account-email`],`payment-account-email`,`text`),payment_email:m(t[`payment-email`],`payment-email`,`text`),payment_gateway:m(t[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:m(t[`payment-nonce`],`payment-nonce`,`text`),state:m(t.state,`state`,`text`),type:m(t.type,`type`,`text`),zipcode:m(t.zipcode,`zipcode`,`text`)}),f=await c(`Updating`,async()=>i.accounts.billing.paymentMethods.update({body:u,account_id:l,payment_method_id:t[`payment-method-id`]}));o(f,{successLabel:`Updated`})})},ue={command:`payment-methods`,describe:`Operations for billing.payment-methods`,builder:e=>e.command(X).command(Q).command(re).command(ae).command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage(`$0 accounts billing togglePdfInvoices
|
|
55
|
+
|
|
56
|
+
Toggles PDF invoice generation for an account.`).option(`toggle`,{type:`boolean`,description:`Whether to enable or disable PDF invoice generation.`}).option(`dry-run`,{type:`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 fe={command:`togglePdfInvoices`,describe:`Toggle PDF Invoices`,builder:de,handler:async t=>l({command:`accounts billing togglePdfInvoices`,classification:{safeFlags:[`toggle`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts billing togglePdfInvoices`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/invoices`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({toggle:t.toggle}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.billing.togglePdfInvoices({...e,account_id:l}));o(n,{successLabel:`Updated`});return}let u=p({toggle:t.toggle}),f=await c(`Updating`,async()=>i.accounts.billing.togglePdfInvoices({...u,account_id:l}));o(f,{successLabel:`Updated`})})},pe={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(K).command(J).command(fe).command(W).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 accounts categories get by id <id>
|
|
57
|
+
|
|
58
|
+
Get application category by ID.`).positional(`id`,{type:`string`,description:`Application category ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`id <id>`,describe:`Get application category`,builder:me,handler:async t=>l({command:`accounts categories get by id`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts categories get by id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/categories/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.categories.get.by.id({account_id:l,id:t.id}));o(u,{successLabel:`Loaded`})})},ge={command:`by`,describe:`Operations for categories.get.by`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 accounts categories get categories
|
|
59
|
+
|
|
60
|
+
List application categories.`).option(`limit`,{type:`number`,description:`Limit of number of results to return.`}).option(`offset`,{type:`number`,description:`Offset of results to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`categories`,describe:`List application categories`,builder:_e,handler:async t=>l({command:`accounts categories get categories`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={limit:t.limit,offset:t.offset};if(t.dryRun){let e=await r();s({command:`cf accounts categories get categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/categories`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.categories.get.categories({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},ye={command:`get`,describe:`Operations for categories.get`,builder:e=>e.command(ve).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`categories`,describe:`Categories operations`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.usage("$0 accounts create\n\nCreate an Account. To create the Account within an Organization, provide `unit.id` and omit `standalone`. To create a standalone Free Account, provide `standalone: true` and omit `unit`. Providing both fields is invalid. If you omit both fields, Cloudflare can determine the destination only when the User is an administrator of exactly one Organization. Cloudflare creates the Account in that Organization; otherwise, the request returns an error.").option(`idempotency-key`,{type:`string`,description:`Optional key that identifies an Account-creation request. Free Account creation can require exactly one valid key, so API clients should send a key with every Account-creation request. Reuse the same key when retrying the same request.`}).option(`name`,{type:`string`,description:`Account name`}).option(`standalone`,{type:`boolean`,description:"Set to `true` and omit `unit` to create a standalone Free Account. If provided, this field must be `true`."}).option(`unit-id`,{type:`string`,description:`Tenant unit ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Parameters for account creation`})}const Se={command:`create`,describe:`Create an Account`,builder:xe,handler:async e=>l({command:`accounts create`,classification:{safeFlags:[`standalone`,`dry-run`]}},e,async()=>{let r={};if(e[`idempotency-key`]!==void 0&&(r[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){s({command:`cf accounts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),standalone:e.standalone,unit:{id:m(e[`unit-id`],`unit-id`,`text`)}}):d(e.body)});return}let i=await n(e);if(e.body){let n=d(e.body),a=await c(`Creating`,async()=>t(i,`POST`,`/accounts`,{body:n,headers:Object.keys(r).length>0?r:void 0}));o(a,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Account name`));let a={};e.name!==void 0&&u(a,[`name`],m(e.name,`name`,`text`)),e.standalone!==void 0&&u(a,[`standalone`],e.standalone),e[`unit-id`]!==void 0&&u(a,[`unit`,`id`],m(e[`unit-id`],`unit-id`,`text`));let l=await c(`Creating`,async()=>t(i,`POST`,`/accounts`,{body:Object.keys(a).length>0?a:void 0,headers:Object.keys(r).length>0?r:void 0}));o(l,{successLabel:`Created`})})};function Ce(e){return e.usage(`$0 accounts delete
|
|
61
|
+
|
|
62
|
+
Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const we={command:`delete`,describe:`Delete a specific account`,builder:Ce,handler:async t=>l({command:`accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
63
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.delete({account_id:l}));o(u,{successLabel:`Deleted`})})};function Te(e){return e.usage(`$0 accounts get
|
|
64
|
+
|
|
65
|
+
Get information about a specific account that you are a member of.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get`,describe:`Account Details`,builder:Te,handler:async t=>l({command:`accounts get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.get({account_id:l}));o(u,{successLabel:`Loaded`})})};function De(e){return e.usage(`$0 accounts list
|
|
66
|
+
|
|
67
|
+
List all accounts you have ownership or verified access to.`).option(`name`,{type:`string`,description:`Name of the account.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`list`,describe:`List Accounts`,builder:v(De),handler:async e=>l({command:`accounts list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let t={name:e.name,page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){s({command:`cf accounts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),i=await c(`Loading`,async()=>r.accounts.list(t));o(i,{successLabel:`Loaded`})})};function ke(e){return e.usage("$0 accounts logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`history <id>`,describe:`Get resource change history from an account audit log entry (Version 2)`,builder:v(ke),handler:async t=>l({command:`accounts logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},t,async()=>{let i={action_time:t[`action-time`],since:t.since,before:t.before,direction:t.direction,limit:t.limit,cursor:t.cursor};if(t.dryRun){let e=await r();s({command:`cf accounts logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/audit/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}/history`,pathParams:{id:String(t.id??``)},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.logs.audit.history({account_id:u,id:t.id,...i}));o(d,{successLabel:`Loaded`})})};function je(e){return e.usage(`$0 accounts logs audit list
|
|
68
|
+
|
|
69
|
+
Gets a list of audit logs for an account.`).option(`account-name`,{type:`string`,description:`Filters by the account name.`}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`audit-log-id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.`}).option(`product-category`,{type:`string`,description:`Filters audit logs by one or more predefined product categories. Each product category expands into a curated set of resource_product values and is unioned with any explicit resource_product filter. Matched case-insensitively; unknown product categories return 400. Repeatable. Use the audit log product categories endpoint to discover the available values.`}).option(`zone-id`,{type:`string`,description:`Filters by the zone ID.`}).option(`zone-name`,{type:`string`,description:`Filters by the zone name associated with the change.`}).option(`account-name-not`,{type:`string`,description:`Filters out audit logs by the account name.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`audit-log-id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.`}).option(`zone-id-not`,{type:`string`,description:`Filters out audit logs by the zone ID.`}).option(`zone-name-not`,{type:`string`,description:`Filters out audit logs by the zone name associated with the change.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`Get account audit logs (Version 2)`,builder:v(je),handler:async t=>l({command:`accounts logs audit list`,classification:{safeFlags:[`direction`,`dry-run`]}},t,async()=>{let i={account_name:t[`account-name`],action_result:t[`action-result`],action_type:t[`action-type`],actor_context:t[`actor-context`],actor_email:t[`actor-email`],actor_id:t[`actor-id`],actor_ip_address:t[`actor-ip-address`],actor_token_id:t[`actor-token-id`],actor_token_name:t[`actor-token-name`],actor_type:t[`actor-type`],audit_log_id:t[`audit-log-id`],id:t.id,raw_cf_ray_id:t[`raw-cf-ray-id`],raw_method:t[`raw-method`],raw_status_code:t[`raw-status-code`],raw_uri:t[`raw-uri`],resource_id:t[`resource-id`],resource_product:t[`resource-product`],resource_type:t[`resource-type`],resource_scope:t[`resource-scope`],product_category:t[`product-category`],zone_id:t[`zone-id`],zone_name:t[`zone-name`],"account_name.not":t[`account-name-not`],"action_result.not":t[`action-result-not`],"action_type.not":t[`action-type-not`],"actor_context.not":t[`actor-context-not`],"actor_email.not":t[`actor-email-not`],"actor_id.not":t[`actor-id-not`],"actor_ip_address.not":t[`actor-ip-address-not`],"actor_token_id.not":t[`actor-token-id-not`],"actor_token_name.not":t[`actor-token-name-not`],"actor_type.not":t[`actor-type-not`],"audit_log_id.not":t[`audit-log-id-not`],"id.not":t[`id-not`],"raw_cf_ray_id.not":t[`raw-cf-ray-id-not`],"raw_method.not":t[`raw-method-not`],"raw_status_code.not":t[`raw-status-code-not`],"raw_uri.not":t[`raw-uri-not`],"resource_id.not":t[`resource-id-not`],"resource_product.not":t[`resource-product-not`],"resource_type.not":t[`resource-type-not`],"resource_scope.not":t[`resource-scope-not`],"zone_id.not":t[`zone-id-not`],"zone_name.not":t[`zone-name-not`],since:t.since,before:t.before,direction:t.direction,limit:t.limit,cursor:t.cursor};if(t.dryRun){let e=await r();s({command:`cf accounts logs audit list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/audit`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.logs.audit.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function Ne(e){return e.usage(`$0 accounts logs audit product-categories
|
|
70
|
+
|
|
71
|
+
Lists the available audit log product categories and the resource products each one expands to. Use these values with the product_category filter on the account audit logs endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`product-categories`,describe:`List account audit log product categories (Version 2)`,builder:Ne,handler:async t=>l({command:`accounts logs audit product-categories`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts logs audit product-categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/audit/product_categories`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.logs.audit.productCategories({account_id:l}));o(u,{successLabel:`Loaded`})})},Fe={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(Ae).command(Me).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ie={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.usage(`$0 accounts members create
|
|
72
|
+
|
|
73
|
+
Add a user to the list of members for this account.`).option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`roles`,{type:`string`,array:!0,description:`Array of roles associated with this member.`}).option(`status`,{type:`string`,description:`Status of the member invitation. If not provided during creation, defaults to 'pending'.
|
|
74
|
+
Changing from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.
|
|
75
|
+
`,choices:[`accepted`,`pending`]}).option(`policies`,{type:`string`,description:`Array of policies associated with this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`roles`,[`policies`]).conflicts(`policies`,[`roles`])}const Re={command:`create`,describe:`Add Member`,builder:Le,handler:async t=>l({command:`accounts members create`,classification:{safeFlags:[`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/members`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({email:m(t.email,`email`,`text`),roles:t.roles,status:m(t.status,`status`,`text`),policies:f(t.policies,`policies`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.members.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}t.email===void 0&&(t.email=await h(`email`,`The contact email address of the user.`));let u=p({email:m(t.email,`email`,`text`),roles:t.roles,status:m(t.status,`status`,`text`),policies:f(t.policies,`policies`)}),g=await c(`Creating`,async()=>i.accounts.members.create({body:u,account_id:l}));o(g,{successLabel:`Created`})})};function ze(e){return e.usage(`$0 accounts members delete <member-id>
|
|
76
|
+
|
|
77
|
+
Remove a member from an account.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,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 Be={command:`delete <member-id>`,describe:`Remove Member`,builder:ze,handler:async t=>l({command:`accounts members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`Are you sure you want to remove this user from the account?`})){process.stderr.write(`Aborted.
|
|
78
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.members.delete({account_id:l,member_id:t[`member-id`]}));o(u,{successLabel:`Deleted`})})};function Ve(e){return e.usage(`$0 accounts members get <member-id>
|
|
79
|
+
|
|
80
|
+
Get information about a specific member of an account.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`get <member-id>`,describe:`Member Details`,builder:Ve,handler:async t=>l({command:`accounts members get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.members.get({account_id:l,member_id:t[`member-id`]}));o(u,{successLabel:`Loaded`})})};function Ue(e){return e.usage(`$0 accounts members list
|
|
81
|
+
|
|
82
|
+
List all members of an account.`).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`user.first_name`,`user.last_name`,`user.email`,`status`]}).option(`status`,{type:`string`,description:`A member's status in the account.`,choices:[`accepted`,`pending`,`rejected`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const We={command:`list`,describe:`List Members`,builder:v(Ue),handler:async t=>l({command:`accounts members list`,classification:{safeFlags:[`order`,`status`,`direction`,`dry-run`]}},t,async()=>{let i={order:t.order,status:t.status,page:t.page,per_page:t[`per-page`],direction:t.direction};if(t.dryRun){let e=await r();s({command:`cf accounts members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/members`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.members.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function Ge(e){return e.usage(`$0 accounts members update <member-id>
|
|
83
|
+
|
|
84
|
+
Modify an account member.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`roles`,{type:`string`,description:`Roles assigned to this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`policies`,{type:`string`,description:`Array of policies associated with this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`roles`,[`policies`]).conflicts(`policies`,[`roles`])}const Ke={command:`update <member-id>`,describe:`Update Member`,builder:Ge,handler:async t=>l({command:`accounts members update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({roles:f(t.roles,`roles`),policies:f(t.policies,`policies`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.members.update({body:e,account_id:l,member_id:t[`member-id`]}));o(n,{successLabel:`Updated`});return}let u=p({roles:f(t.roles,`roles`),policies:f(t.policies,`policies`)}),m=await c(`Updating`,async()=>i.accounts.members.update({body:u,account_id:l,member_id:t[`member-id`]}));o(m,{successLabel:`Updated`})})},qe={command:`members`,describe:`Operations for members`,builder:e=>e.command(Re).command(Be).command(He).command(We).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Je(e){return e.usage(`$0 accounts move
|
|
85
|
+
|
|
86
|
+
Move an account into a destination organization, either assigning a standalone account to an organization or moving it between organizations in the same hierarchy. Availability depends on the organization's capabilities. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`destination-organization-id`,{type:`string`,description:`The ID of the organization to move the account into.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const Ye={command:`move`,describe:`Move account to organization`,builder:Je,handler:async t=>l({command:`accounts move`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({destination_organization_id:m(t[`destination-organization-id`],`destination-organization-id`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.move({...e,account_id:l}));o(n,{successLabel:`Created`});return}t[`destination-organization-id`]===void 0&&(t[`destination-organization-id`]=await h(`destination-organization-id`,`The ID of the organization to move the account into.`));let u=p({destination_organization_id:m(t[`destination-organization-id`],`destination-organization-id`,`text`)}),f=await c(`Creating`,async()=>i.accounts.move({...u,account_id:l}));o(f,{successLabel:`Created`})})};function Xe(e){return e.usage(`$0 accounts organization list
|
|
87
|
+
|
|
88
|
+
Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`List account organizations`,builder:Xe,handler:async t=>l({command:`accounts organization list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.organization.list({account_id:l}));o(u,{successLabel:`Loaded`})})},Qe={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(Ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $e(e){return e.usage(`$0 accounts profile get
|
|
89
|
+
|
|
90
|
+
Retrieves the business profile (name, email, phone, address, and external metadata) associated with this account's parent organization customer record. Profiles can be shared across accounts and organizations. Only available to members of an organization that contains the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`get`,describe:`Get account profile`,builder:$e,handler:async t=>l({command:`accounts profile get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.profile.get({account_id:l}));o(u,{successLabel:`Loaded`})})};function tt(e){return e.usage(`$0 accounts profile update
|
|
91
|
+
|
|
92
|
+
Updates the business profile (name, email, phone, address, and external metadata) associated with this account's parent organization customer record. Changes apply to every account and organization sharing that profile. Omitted or empty fields are left unchanged. Only available to members of an organization that contains the account. Requires Account Settings Write permission.`).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nt={command:`update`,describe:`Update account profile`,builder:tt,handler:async t=>l({command:`accounts profile update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({business_address:m(t[`business-address`],`business-address`,`text`),business_email:m(t[`business-email`],`business-email`,`text`),business_name:m(t[`business-name`],`business-name`,`text`),business_phone:m(t[`business-phone`],`business-phone`,`text`),external_metadata:m(t[`external-metadata`],`external-metadata`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.profile.update({body:e,account_id:l}));o(n,{successLabel:`Updated`});return}t[`business-address`]===void 0&&(t[`business-address`]=await h(`business-address`,`The business_address field`)),t[`business-email`]===void 0&&(t[`business-email`]=await h(`business-email`,`The business_email field`)),t[`business-name`]===void 0&&(t[`business-name`]=await h(`business-name`,`The business_name field`)),t[`business-phone`]===void 0&&(t[`business-phone`]=await h(`business-phone`,`The business_phone field`)),t[`external-metadata`]===void 0&&(t[`external-metadata`]=await h(`external-metadata`,`The external_metadata field`));let u=p({business_address:m(t[`business-address`],`business-address`,`text`),business_email:m(t[`business-email`],`business-email`,`text`),business_name:m(t[`business-name`],`business-name`,`text`),business_phone:m(t[`business-phone`],`business-phone`,`text`),external_metadata:m(t[`external-metadata`],`external-metadata`,`text`)}),f=await c(`Updating`,async()=>i.accounts.profile.update({body:u,account_id:l}));o(f,{successLabel:`Updated`})})},rt={command:`profile`,describe:`View and manage the profile for a Cloudflare account`,builder:e=>e.command(et).command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function it(e){return e.usage(`$0 accounts subscriptions cancelDelayedDowngrade
|
|
93
|
+
|
|
94
|
+
Cancels pending delayed downgrades for the specified subscriptions.`).option(`subscription-ids`,{type:`string`,array:!0,description:`List of subscription identifiers to cancel downgrades for.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const at={command:`cancelDelayedDowngrade`,describe:`Cancel Delayed Downgrade`,builder:it,handler:async t=>l({command:`accounts subscriptions cancelDelayedDowngrade`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts subscriptions cancelDelayedDowngrade`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/subscriptions/cancel-downgrade`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({subscription_ids:t[`subscription-ids`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.subscriptions.cancelDelayedDowngrade({...e,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({subscription_ids:t[`subscription-ids`]}),f=await c(`Creating`,async()=>i.accounts.subscriptions.cancelDelayedDowngrade({...u,account_id:l}));o(f,{successLabel:`Created`})})};function ot(e){return e.usage(`$0 accounts subscriptions create
|
|
95
|
+
|
|
96
|
+
Creates an account or zone subscription.`).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`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 st={command:`create`,describe:`Create Subscription`,builder:ot,handler:async t=>l({command:`accounts subscriptions create`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf accounts subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/subscriptions`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:t.body===void 0?p({app:{install_id:m(t[`app-install-id`],`app-install-id`,`text`)},component_values:f(t[`component-values`],`component-values`),frequency:m(t.frequency,`frequency`,`text`),rate_plan:{currency:m(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:m(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:m(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:m(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}}):d(t.body)});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,h=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();if(u===`zones`?t.zoneId=h:t.accountId=h,t.body){let e=d(t.body),n=await c(`Creating`,async()=>l.accounts.subscriptions.create({body:e,account_or_zone:u,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}let g=p({app:{install_id:m(t[`app-install-id`],`app-install-id`,`text`)},component_values:f(t[`component-values`],`component-values`),frequency:m(t.frequency,`frequency`,`text`),rate_plan:{currency:m(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:m(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:m(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:m(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}}),_=await c(`Creating`,async()=>l.accounts.subscriptions.create({body:g,account_or_zone:u,account_or_zone_id:h}));o(_,{successLabel:`Created`})})};function ct(e){return e.usage(`$0 accounts subscriptions createCancelReason <subscription-identifier>
|
|
97
|
+
|
|
98
|
+
Records a cancellation reason for an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`other`,{type:`string`,description:`Additional cancellation details.`}).option(`reason-code`,{type:`string`,array:!0,description:`The cancellation reason codes.`}).option(`dry-run`,{type:`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 lt={command:`createCancelReason <subscription-identifier>`,describe:`Create Cancel Reason`,builder:ct,handler:async t=>l({command:`accounts subscriptions createCancelReason`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts subscriptions createCancelReason`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}/cancel-reason`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?p({other:m(t.other,`other`,`text`),reason_code:t[`reason-code`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.subscriptions.createCancelReason({...e,account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(n,{successLabel:`Created`});return}let u=p({other:m(t.other,`other`,`text`),reason_code:t[`reason-code`]}),f=await c(`Creating`,async()=>i.accounts.subscriptions.createCancelReason({...u,account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(f,{successLabel:`Created`})})};function ut(e){return e.usage(`$0 accounts subscriptions delete <subscription-identifier>
|
|
99
|
+
|
|
100
|
+
Deletes an account's subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const dt={command:`delete <subscription-identifier>`,describe:`Delete Subscription`,builder:ut,handler:async t=>l({command:`accounts subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
101
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.subscriptions.delete({account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(u,{successLabel:`Deleted`})})};function ft(e){return e.usage(`$0 accounts subscriptions get
|
|
102
|
+
|
|
103
|
+
Lists all of an account or zone's subscriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pt={command:`get`,describe:`List Subscriptions`,builder:ft,handler:async t=>l({command:`accounts subscriptions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf accounts subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/subscriptions`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.accounts.subscriptions.get({account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};function mt(e){return e.usage(`$0 accounts subscriptions getByIdentifier <subscription-identifier>
|
|
104
|
+
|
|
105
|
+
Gets an account subscription by identifier.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`getByIdentifier <subscription-identifier>`,describe:`Get Subscription`,builder:mt,handler:async t=>l({command:`accounts subscriptions getByIdentifier`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts subscriptions getByIdentifier`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.subscriptions.getByIdentifier({account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(u,{successLabel:`Loaded`})})};function gt(e){return e.usage(`$0 accounts subscriptions getCancelReason <subscription-identifier>
|
|
106
|
+
|
|
107
|
+
Gets the cancellation reason for an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _t={command:`getCancelReason <subscription-identifier>`,describe:`Get Cancel Reason`,builder:gt,handler:async t=>l({command:`accounts subscriptions getCancelReason`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts subscriptions getCancelReason`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}/cancel-reason`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.subscriptions.getCancelReason({account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(u,{successLabel:`Loaded`})})};function vt(e){return e.usage(`$0 accounts subscriptions update <subscription-identifier>
|
|
108
|
+
|
|
109
|
+
Updates an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yt={command:`update <subscription-identifier>`,describe:`Update Subscription`,builder:vt,handler:async t=>l({command:`accounts subscriptions update`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?p({app:{install_id:m(t[`app-install-id`],`app-install-id`,`text`)},component_values:f(t[`component-values`],`component-values`),frequency:m(t.frequency,`frequency`,`text`),rate_plan:{currency:m(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:m(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:m(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:m(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.subscriptions.update({body:e,account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(n,{successLabel:`Updated`});return}let u=p({app:{install_id:m(t[`app-install-id`],`app-install-id`,`text`)},component_values:f(t[`component-values`],`component-values`),frequency:m(t.frequency,`frequency`,`text`),rate_plan:{currency:m(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:m(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:m(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:m(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}}),h=await c(`Updating`,async()=>i.accounts.subscriptions.update({body:u,account_id:l,subscription_identifier:t[`subscription-identifier`]}));o(h,{successLabel:`Updated`})})},bt={command:`subscriptions`,describe:`View and manage plan subscriptions attached to this account`,builder:e=>e.command(at).command(st).command(lt).command(dt).command(pt).command(ht).command(_t).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.usage(`$0 accounts tokens create
|
|
110
|
+
|
|
111
|
+
Create a new Account Owned API token.`).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const St={command:`create`,describe:`Create Token`,builder:xt,handler:async t=>l({command:`accounts tokens create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:m(t[`expires-on`],`expires-on`,`text`),name:m(t.name,`name`,`text`),not_before:m(t[`not-before`],`not-before`,`text`),policies:f(t.policies,`policies`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.accounts.tokens.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.name===void 0&&(t.name=await h(`name`,`Token name.`)),t.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let u=p({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:m(t[`expires-on`],`expires-on`,`text`),name:m(t.name,`name`,`text`),not_before:m(t[`not-before`],`not-before`,`text`),policies:f(t.policies,`policies`)}),g=await c(`Creating`,async()=>i.accounts.tokens.create({body:u,account_id:l}));o(g,{successLabel:`Created`})})};function Ct(e){return e.usage(`$0 accounts tokens delete <token-id>
|
|
112
|
+
|
|
113
|
+
Destroy an Account Owned API token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,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 wt={command:`delete <token-id>`,describe:`Delete Token`,builder:Ct,handler:async t=>l({command:`accounts tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
114
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.tokens.delete({account_id:l,token_id:t[`token-id`]}));o(u,{successLabel:`Deleted`})})};function Tt(e){return e.usage(`$0 accounts tokens get <token-id>
|
|
115
|
+
|
|
116
|
+
Get information about a specific Account Owned API token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`get <token-id>`,describe:`Token Details`,builder:Tt,handler:async t=>l({command:`accounts tokens get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.tokens.get({account_id:l,token_id:t[`token-id`]}));o(u,{successLabel:`Loaded`})})};function Dt(e){return e.usage("$0 accounts tokens list\n\nList Account Owned API tokens created for this account. Callers with `com.cloudflare.api.account.token.list_self` permission only receive tokens they created. Results include active, disabled, and recently-expired tokens when `include_expired` is set to true.").option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`include-expired`,{type:`boolean`,description:`When true, includes recently-expired tokens in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ot={command:`list`,describe:`List Tokens`,builder:v(Dt),handler:async t=>l({command:`accounts tokens list`,classification:{safeFlags:[`direction`,`include-expired`,`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`],direction:t.direction,include_expired:t[`include-expired`]};if(t.dryRun){let e=await r();s({command:`cf accounts tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.tokens.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function kt(e){return e.usage(`$0 accounts tokens permission-groups list
|
|
117
|
+
|
|
118
|
+
Find all available permission groups for Account Owned API Tokens. Each permission group indicates whether the caller can select it when creating a token. Token creation performs the authoritative permission check.`).option(`name`,{type:`string`,description:`Filter by the name of the permission group.
|
|
119
|
+
The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
|
|
120
|
+
The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const At={command:`list`,describe:`List Permission Groups`,builder:kt,handler:async t=>l({command:`accounts tokens permission-groups list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={name:t.name,scope:t.scope};if(t.dryRun){let e=await r();s({command:`cf accounts tokens permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/permission_groups`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.accounts.tokens.permissionGroups.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},jt={command:`permission-groups`,describe:`Operations for tokens.permission-groups`,builder:e=>e.command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mt(e){return e.usage(`$0 accounts tokens roll <token-id>
|
|
121
|
+
|
|
122
|
+
Roll the Account Owned API token secret.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,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 Nt={command:`roll <token-id>`,describe:`Roll Token`,builder:Mt,handler:async t=>l({command:`accounts tokens roll`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts tokens roll`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}/value`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`Rolling this token will invalidate the current secret and generate a new one. Any integrations using the current secret will stop working.`})){process.stderr.write(`Aborted.
|
|
123
|
+
`);return}let u=await c(`Deleting`,async()=>i.accounts.tokens.roll({account_id:l,token_id:t[`token-id`]}));o(u,{successLabel:`Deleted`})})};function $(e){return e.usage(`$0 accounts tokens update <token-id>
|
|
124
|
+
|
|
125
|
+
Update an existing token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pt={command:`update <token-id>`,describe:`Update Token`,builder:$,handler:async t=>l({command:`accounts tokens update`,classification:{safeFlags:[`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:m(t[`expires-on`],`expires-on`,`text`),name:m(t.name,`name`,`text`),not_before:m(t[`not-before`],`not-before`,`text`),policies:f(t.policies,`policies`),status:m(t.status,`status`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.tokens.update({body:e,account_id:l,token_id:t[`token-id`]}));o(n,{successLabel:`Updated`});return}if(t.name===void 0&&(t.name=await h(`name`,`Token name.`)),t.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let u=p({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:m(t[`expires-on`],`expires-on`,`text`),name:m(t.name,`name`,`text`),not_before:m(t[`not-before`],`not-before`,`text`),policies:f(t.policies,`policies`),status:m(t.status,`status`,`text`)}),g=await c(`Updating`,async()=>i.accounts.tokens.update({body:u,account_id:l,token_id:t[`token-id`]}));o(g,{successLabel:`Updated`})})};function Ft(e){return e.usage(`$0 accounts tokens verify
|
|
126
|
+
|
|
127
|
+
Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const It={command:`verify`,describe:`Verify Token`,builder:Ft,handler:async t=>l({command:`accounts tokens verify`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/verify`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.tokens.verify({account_id:l}));o(u,{successLabel:`Loaded`})})},Lt={command:`tokens`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(St).command(wt).command(Et).command(Ot).command(Nt).command(Pt).command(It).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Rt(e){return e.usage(`$0 accounts transformations list
|
|
128
|
+
|
|
129
|
+
Returns a list of Image Resizing configurations across all zones for the account. This endpoint is useful for retrieving the transformations (image_resizing) state for all zones belonging to an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zt={command:`list`,describe:`List Image Resizing configurations for account`,builder:Rt,handler:async t=>l({command:`accounts transformations list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts transformations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/settings/transformations`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.transformations.list({account_id:l}));o(u,{successLabel:`Loaded`})})},Bt={command:`transformations`,describe:`Operations for transformations`,builder:e=>e.command(zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Vt(e){return e.usage(`$0 accounts update
|
|
130
|
+
|
|
131
|
+
Update an existing account.`).option(`id`,{type:`string`,description:`Identifier`}).option(`name`,{type:`string`,description:`Account name`}).option(`settings-abuse-contact-email`,{type:`string`,description:`Sets an abuse contact email to notify for abuse reports.`}).option(`settings-enforce-twofactor`,{type:`boolean`,description:`Indicates whether membership in this account requires that
|
|
132
|
+
Two-Factor Authentication is enabled`}).option(`dry-run`,{type:`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 Ht={command:`update`,describe:`Update Account`,builder:Vt,handler:async t=>l({command:`accounts update`,classification:{safeFlags:[`settings-enforce-twofactor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({id:m(t.id,`id`,`text`),name:m(t.name,`name`,`text`),settings:{abuse_contact_email:m(t[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`),enforce_twofactor:t[`settings-enforce-twofactor`]}}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.update({body:e,account_id:l}));o(n,{successLabel:`Updated`});return}t.id===void 0&&(t.id=await h(`id`,`Identifier`)),t.name===void 0&&(t.name=await h(`name`,`Account name`));let u=p({id:m(t.id,`id`,`text`),name:m(t.name,`name`,`text`),settings:{abuse_contact_email:m(t[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`),enforce_twofactor:t[`settings-enforce-twofactor`]}}),f=await c(`Updating`,async()=>i.accounts.update({body:u,account_id:l}));o(f,{successLabel:`Updated`})})};function Ut(e){return e.usage(`$0 accounts ut-billing edit
|
|
133
|
+
|
|
134
|
+
Updates the Unique Transformations billing configuration for an account. When enabled, billing data is directed to the Transformations pipeline. Note: setting the value to "off" is not permitted once enabled.`).option(`value`,{type:`string`,description:`Enables Unique Transformations billing for the account.
|
|
135
|
+
Note: once enabled, this setting cannot be set back to "off".
|
|
136
|
+
`,choices:[`on`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Wt={command:`edit`,describe:`Change Unique Transformations billing setting`,builder:Ut,handler:async t=>l({command:`accounts ut-billing edit`,classification:{safeFlags:[`value`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts ut-billing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/settings/ut-billing`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({value:m(t.value,`value`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.accounts.utBilling.edit({...e,account_id:l}));o(n,{successLabel:`Updated`});return}t.value===void 0&&(t.value=await g(`value`,`Enables Unique Transformations billing for the account. Note: once enabled, this setting cannot be set back to "off". `,[`on`]));let u=p({value:m(t.value,`value`,`text`)}),f=await c(`Updating`,async()=>i.accounts.utBilling.edit({...u,account_id:l}));o(f,{successLabel:`Updated`})})};function Gt(e){return e.usage(`$0 accounts ut-billing get
|
|
137
|
+
|
|
138
|
+
Retrieves the Unique Transformations billing configuration for an account. When enabled, billing data is directed to the Transformations pipeline.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kt={command:`get`,describe:`Get Unique Transformations billing setting`,builder:Gt,handler:async t=>l({command:`accounts ut-billing get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf accounts ut-billing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/settings/ut-billing`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.accounts.utBilling.get({account_id:l}));o(u,{successLabel:`Loaded`})})},qt={command:`ut-billing`,describe:`Operations for ut-billing`,builder:e=>e.command(Wt).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Jt={command:`accounts`,describe:`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,builder:e=>e.command(Se).command(we).command(Ee).command(Oe).command(Ye).command(Ht).command(j).command(pe).command(be).command(Ie).command(qe).command(Qe).command(rt).command(bt).command(Lt).command(Bt).command(qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Jt as default};
|