cf 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/dist/_meta/agent-context.json +13 -5
- package/dist/_meta/commands.json +2393 -262
- package/dist/_meta/hand-written-commands.json +960 -0
- package/dist/_meta/schemas.json +1882 -155
- package/dist/{abuse-reports-CGF4zcKf.mjs → abuse-reports-D40QFl-y.mjs} +2 -2
- package/dist/{access-lhLJo1v2.mjs → access-Dl2IU1ID.mjs} +1 -1
- package/dist/account-CPbieCZ4.mjs +2 -0
- package/dist/{account-tags-B88TotoH.mjs → account-tags-skfP7H8k.mjs} +4 -4
- package/dist/{accounts-BSIAT_iP.mjs → accounts-CSgR6909.mjs} +12 -12
- package/dist/{acm-VULm1djv.mjs → acm-CVvCTaNk.mjs} +1 -1
- package/dist/{addressing-BHPBIkRY.mjs → addressing-Uq5hEDDP.mjs} +11 -11
- package/dist/{agent-context-KBy48G1b.mjs → agent-context-BvuDdaJb.mjs} +1 -1
- package/dist/agent-memory-BrHMIU0E.mjs +6 -0
- package/dist/ai-audit-BoZuL84i.mjs +2 -0
- package/dist/ai-gateway-DE50Jem1.mjs +13 -0
- package/dist/ai-search-Fx7NHCHB.mjs +7 -0
- package/dist/ai-security-DyLbY9kv.mjs +4 -0
- package/dist/ai-v2fP1r0s.mjs +5 -0
- package/dist/{alerting-Bl8OqViR.mjs → alerting-5mFZjTcD.mjs} +1 -1
- package/dist/analytics-BygTfozw.mjs +3 -0
- package/dist/analytics_engine-4L-q362P.mjs +2 -0
- package/dist/{api-security-4FVrD4n8.mjs → api-security-DjFsRYWx.mjs} +20 -20
- package/dist/argo-TzXPN7tz.mjs +2 -0
- package/dist/args-CDgWUP4J.mjs +2 -0
- package/dist/{artifacts-CVDGnr2V.mjs → artifacts-dEw2UUBV.mjs} +1 -1
- package/dist/audit-logs-CqY7zzwv.mjs +2 -0
- package/dist/auth-CPLdkOC7.mjs +5 -0
- package/dist/{auth-MQEamPN9.mjs → auth-DY_Y2bXC.mjs} +3 -3
- package/dist/billing-DHQuRT8S.mjs +3 -0
- package/dist/body-parser-BGVbwPeM.mjs +2 -0
- package/dist/bot-management-CfqG79hF.mjs +5 -0
- package/dist/botnet-feed-BOeNnDoH.mjs +3 -0
- package/dist/brand-protection-DYttrKIM.mjs +3 -0
- package/dist/{browser-extension-BtpCbh-2.mjs → browser-extension-CTUCdgfn.mjs} +1 -1
- package/dist/browser-run-373D4e1i.mjs +4 -0
- package/dist/build-D0ir_S70.mjs +2 -0
- package/dist/{cache-VyWK1SjY.mjs → cache-DJXBmc3w.mjs} +1 -1
- package/dist/{calls-BxoRYxs4.mjs → calls-COO0Eoz1.mjs} +1 -1
- package/dist/certificate-authorities-DbHLmKbd.mjs +2 -0
- package/dist/cf-yPz_IqW6.mjs +18 -0
- package/dist/chunk-LQW53VED-9MACsvSG.mjs +119 -0
- package/dist/chunk-QBZBEHZB-yeyhVUeD.mjs +2 -0
- package/dist/{client-certificates-DDUv8K0a.mjs → client-certificates-RBRqYP3f.mjs} +1 -1
- package/dist/{client-side-security-D4ysjwWT.mjs → client-side-security-HOmA37et.mjs} +1 -1
- package/dist/cloud-connector-C7hw1c1f.mjs +2 -0
- package/dist/cloudforce-one-DLOj76q4.mjs +36 -0
- package/dist/command-BV87D4tR.mjs +2 -0
- package/dist/{completions-BHE4pRjB.mjs → completions-BnD46cXe.mjs} +3 -3
- package/dist/config.d.mts +1451 -1366
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-DY-z_LrH.mjs +2 -0
- package/dist/connector-telemetry-events-DCXmcAc9.mjs +2 -0
- package/dist/connector-telemetry-snapshots-D8GNuzx3.mjs +2 -0
- package/dist/{connectors-BqxYMMtQ.mjs → connectors-fEOn-J_i.mjs} +1 -1
- package/dist/containers-BDBsEs7-.mjs +58 -0
- package/dist/{content-scan-Dgd7A8KF.mjs → content-scan-Cmj9--XY.mjs} +1 -1
- package/dist/{csamScanner-DYL37wLc.mjs → csamScanner-BRXyMCyH.mjs} +1 -1
- package/dist/{ct-alerting-CkhSbfAs.mjs → ct-alerting-9AvYys-f.mjs} +1 -1
- package/dist/custom-certificates-C5qrlyhb.mjs +5 -0
- package/dist/custom-csrs-BgOnTbBW.mjs +3 -0
- package/dist/{custom-hostnames-q_nsnlye.mjs → custom-hostnames-CbQD9aYo.mjs} +1 -1
- package/dist/custom-nameservers-2ZajBkRC.mjs +3 -0
- package/dist/custom-pages-Buki_Cb8.mjs +3 -0
- package/dist/d1-n2in0cSF.mjs +20 -0
- package/dist/data-security-DzOQMkv3.mjs +7 -0
- package/dist/dcv-delegation-BTP9LCOm.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-BUSz35vq.mjs +2 -0
- package/dist/deploy-input-BvD9aRP1.mjs +2 -0
- package/dist/dev-DY_DquQx.mjs +4 -0
- package/dist/{diagnostics-BTH-8nJH.mjs → diagnostics-BvHV8kQb.mjs} +1 -1
- package/dist/{directory-BlH6N6Qy.mjs → directory-BeiSyg8A.mjs} +1 -1
- package/dist/{dispatch-namespaces-BCjH1JzB.mjs → dispatch-namespaces-Dp8Jjpwy.mjs} +1 -1
- package/dist/dist-BBx1io2f.mjs +2 -0
- package/dist/dist-Cb9TJ2VV.mjs +9 -0
- package/dist/dist-DV7LR38l.mjs +387 -0
- package/dist/dist-DvizctjW.mjs +48 -0
- package/dist/{dls-BF5iN78p.mjs → dls-BwoU29mS.mjs} +1 -1
- package/dist/{dns-CeCTNqRk.mjs → dns-DISAfuzj.mjs} +13 -13
- package/dist/{dns-firewall-B54MaLGm.mjs → dns-firewall-wBcCx_ua.mjs} +1 -1
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
- package/dist/dry-run-ILZRVpnp.mjs +2 -0
- package/dist/durable-objects-DhDL3San.mjs +2 -0
- package/dist/email-auth-BROqK6-C.mjs +2 -0
- package/dist/email-routing-BZXHDAOO.mjs +6 -0
- package/dist/email-security-DVumybrk.mjs +18 -0
- package/dist/email-sending-CDQ3_wyz.mjs +7 -0
- package/dist/fieldExtractors-Cy1rxHEF.mjs +3 -0
- package/dist/{firewall-CBPGJ43p.mjs → firewall-C0g5X7Zd.mjs} +9 -9
- package/dist/flagship-fFBiZUz-.mjs +4 -0
- package/dist/{fraud-BIhS8pLf.mjs → fraud-CjIETOaM.mjs} +1 -1
- package/dist/google-tag-gateway-hPa5IHUx.mjs +2 -0
- package/dist/{healthchecks-FiXIk-KP.mjs → healthchecks-CoycpTf9.mjs} +1 -1
- package/dist/{hostnames-Bx0mykMR.mjs → hostnames-x_Yezxpr.mjs} +1 -1
- package/dist/{hyperdrive-C8qCabBF.mjs → hyperdrive-BlfrTwSq.mjs} +1 -1
- package/dist/iam-Bk7K_PPO.mjs +6 -0
- package/dist/images-BAEFb9q1.mjs +8 -0
- package/dist/index.mjs +1 -1
- package/dist/{intel-B-9Z_sJs.mjs → intel-DDkyJVaP.mjs} +1 -1
- package/dist/interactive-CRnq-B5I.mjs +11 -0
- package/dist/{interactive-DtsCYfrK.mjs → interactive-cytQzL94.mjs} +1 -1
- package/dist/ips-DU0ti0i0.mjs +2 -0
- package/dist/{keyless-certificates-THHvoXX3.mjs → keyless-certificates-E1P9jBTb.mjs} +1 -1
- package/dist/keys-DqldTZqH.mjs +2 -0
- package/dist/{kv-BFDUCnft.mjs → kv-CcfCfnwq.mjs} +1 -1
- package/dist/{leaked-credential-checks-DUlUCOoJ.mjs → leaked-credential-checks-CqmKaEbd.mjs} +1 -1
- package/dist/load-balancers-Dg4pDad1.mjs +6 -0
- package/dist/{local-D-aVNu6A.mjs → local-DGiIS1uM.mjs} +1 -1
- package/dist/local-runtime--IQr44qq.mjs +2 -0
- package/dist/logexplorer-Bu2mG5rh.mjs +17 -0
- package/dist/logo-matches-CWUzxY7G.mjs +2 -0
- package/dist/logos-BTfdkDPi.mjs +3 -0
- package/dist/{logpush-BK34mMQs.mjs → logpush-BZyay3h2.mjs} +1 -1
- package/dist/{logs-CLAqX9h2.mjs → logs-BqF7jjQO.mjs} +1 -1
- package/dist/{magic-cloud-networking-h_ozrC5S.mjs → magic-cloud-networking-Dhd8pTyM.mjs} +4 -4
- package/dist/magic-network-monitoring-D0FnkjuN.mjs +4 -0
- package/dist/magic-transit-B5skt0G7.mjs +111 -0
- package/dist/managed-transforms-B6X_crcJ.mjs +3 -0
- package/dist/matches-DeYaB4I0.mjs +2 -0
- package/dist/mcp-ChjBiMx2.mjs +4 -0
- package/dist/mesh-DRVAFLBX.mjs +4 -0
- package/dist/{moq-qmuVPAO0.mjs → moq-DE7VDEFS.mjs} +1 -1
- package/dist/mtls-certificates-Cbc3uAkN.mjs +3 -0
- package/dist/{network-D74cSy3t.mjs → network-CDPZNFbn.mjs} +1 -1
- package/dist/{network-interconnects-BJ0Nc48J.mjs → network-interconnects-CMRs_chR.mjs} +1 -1
- package/dist/oauth-DAa7SwkM.mjs +14 -0
- package/dist/{oauth-clients-Br-smLxQ.mjs → oauth-clients-DAI_gcuL.mjs} +1 -1
- package/dist/oauth-scopes-BE6xF4_h.mjs +2 -0
- package/dist/observability-DnyI8rPJ.mjs +4 -0
- package/dist/{open-PBXRGS4R-R-qesf18.mjs → open-PBXRGS4R-DIiYQyU9.mjs} +3 -3
- package/dist/{organization-NX7yCZrq.mjs → organization-yh0mSUdI.mjs} +6 -6
- package/dist/organizations-B3aU-RCG.mjs +2 -0
- package/dist/origin-ca-certificates-BaNWfVqf.mjs +3 -0
- package/dist/origin-post-quantum-encryption-CIUtQgyv.mjs +2 -0
- package/dist/origin-tls-client-auth-CvEpbX2Q.mjs +4 -0
- package/dist/{output-DrpYYfnB.mjs → output-BqDR9h74.mjs} +1 -1
- package/dist/page-rules-CzbyXbt6.mjs +27 -0
- package/dist/pages-CX8yefTI.mjs +14 -0
- package/dist/pay-per-crawl-v4vBOMWD.mjs +4 -0
- package/dist/pipelines-BZ1KGupx.mjs +6 -0
- package/dist/precursor-D42A9ay5.mjs +4 -0
- package/dist/progress-jYW64HY7.mjs +2 -0
- package/dist/project-settings-BN7tL0c7.mjs +3 -0
- package/dist/prompt-CyATfGUu.mjs +3 -0
- package/dist/{public-BwQqexwo-CNW_dPly.mjs → public-BMg6-Hxh-DgIH5obr.mjs} +1 -1
- package/dist/queries-xvETUjUE.mjs +3 -0
- package/dist/queues-CpqHDtxF.mjs +6 -0
- package/dist/{r2-data-catalog-Du7hN9jA.mjs → r2-data-catalog-DgKmlTKR.mjs} +1 -1
- package/dist/r2-jhmLvD1z.mjs +24 -0
- package/dist/radar-C2J16wpX.mjs +2 -0
- package/dist/{rate-limits-yBF3qoYD.mjs → rate-limits-CoH9Xma0.mjs} +1 -1
- package/dist/raw-fetch-CNKIypJ7.mjs +2 -0
- package/dist/{realtimekit-CIP7lP-a.mjs → realtimekit-CDs0Z5WW.mjs} +1 -1
- package/dist/registrar-BI5ewTAk.mjs +23 -0
- package/dist/{registrar-sandbox-DiXg8p_1.mjs → registrar-sandbox-al1znWMc.mjs} +4 -4
- package/dist/{registry-Bck_zFkz.mjs → registry-5-I2XLwF.mjs} +1 -1
- package/dist/reporting-CxsdHAH3.mjs +2 -0
- package/dist/request-tracers-DJJCncft.mjs +2 -0
- package/dist/{resource-sharing-D1pSDvtf.mjs → resource-sharing-qQGn8AEn.mjs} +1 -1
- package/dist/resource-tagging-aTtpX5e5.mjs +2 -0
- package/dist/rules-PpsDU89Q.mjs +4 -0
- package/dist/rulesets-DP12Aqik.mjs +5 -0
- package/dist/rum-DxvpzJYc.mjs +4 -0
- package/dist/{schema-B34Q9tLF.mjs → schema-DlLbiOJj.mjs} +1 -1
- package/dist/schema-flags-CTfQVGCs.mjs +5 -0
- package/dist/schemas-BFCBlp_W.mjs +65 -0
- package/dist/{scim-CcSyfKCH.mjs → scim-DJ4AVU20.mjs} +1 -1
- package/dist/{secrets-store-DFmvtphu.mjs → secrets-store-D6KDNo_s.mjs} +1 -1
- package/dist/security-center-008FMs_z.mjs +2 -0
- package/dist/{security-txt-DqnFpjMI.mjs → security-txt-CqcfrhlN.mjs} +1 -1
- package/dist/{share-BuwYUzOL.mjs → share-D5fzsVAJ.mjs} +4 -4
- package/dist/{deploy-input-CrvuoDGJ.mjs → shared-DlKGNPiT.mjs} +97 -99
- package/dist/smart-shield-DpFscIk8.mjs +4 -0
- package/dist/snippets-CCKgI2ZX.mjs +4 -0
- package/dist/spawn-C3_tJ3RB.mjs +526 -0
- package/dist/{spectrum-b7N1ZRAm.mjs → spectrum-LmdqY3ki.mjs} +1 -1
- package/dist/{speed-cw31yFva.mjs → speed-CEK36h3A.mjs} +1 -1
- package/dist/src-CEb2fgtT.mjs +108 -0
- package/dist/{ssl-CsEhRVTO.mjs → ssl-ChHUyaQm.mjs} +1 -1
- package/dist/startup-profile-Dpxg-MjV.mjs +17 -0
- package/dist/{state-Bb5Cbc_L.mjs → state-DeX23Kmg.mjs} +1 -1
- package/dist/{stream-DFOao6Gu.mjs → stream-DfUSELMX.mjs} +13 -13
- package/dist/submit-DF2G5CIz.mjs +2 -0
- package/dist/tags-nFJJHlLJ.mjs +2 -0
- package/dist/tenant-CRLw1oRU.mjs +2 -0
- package/dist/tenant-custom-nameservers-BvBQRDcs.mjs +3 -0
- package/dist/{tools-BHfBOZOU.mjs → tools-j8UGEtP1.mjs} +1 -1
- package/dist/{tunnel-DkMiNtVY.mjs → tunnel-CMQeBgmb.mjs} +1 -1
- package/dist/tunnels-iVA3MrdS.mjs +2 -0
- package/dist/turnstile-DQHP6-_b.mjs +23 -0
- package/dist/{ui-DE8CNn6c.mjs → ui-DJFcf61J.mjs} +1 -1
- package/dist/url-info-BVgdb_pf.mjs +2 -0
- package/dist/{url-normalization-ClfFiruK.mjs → url-normalization-BTcxLxIQ.mjs} +1 -1
- package/dist/url-scanner-DwuDZLPk.mjs +2 -0
- package/dist/user-I_MbB_KX.mjs +12 -0
- package/dist/values-S-Q7-5o8.mjs +2 -0
- package/dist/{vectorize-CVKu7lEt.mjs → vectorize-CNZdF_0A.mjs} +1 -1
- package/dist/waiting-rooms-Bo-OSsxu.mjs +11 -0
- package/dist/{web-assets-C2s9kzWf.mjs → web-assets-tlFzKdNL.mjs} +1 -1
- package/dist/web3-CdbfoZ2x.mjs +4 -0
- package/dist/workers-DQ9Q7czn.mjs +28 -0
- package/dist/{workers-builds-B55-oXOa.mjs → workers-builds-CGRhYx-x.mjs} +1 -1
- package/dist/{workflows-B-kGHxFu.mjs → workflows-BhEy-crm.mjs} +1 -1
- package/dist/zaraz-DbKvA_8C.mjs +2 -0
- package/dist/{zero-trust-DV3sIOvu.mjs → zero-trust-DrHCPVOc.mjs} +67 -66
- package/dist/zone-D2zrbJI2.mjs +2 -0
- package/dist/zones-DrpxQ_-A.mjs +21 -0
- package/package.json +12 -8
- package/dist/account-CYRm3yoN.mjs +0 -2
- package/dist/agent-memory-DDv_Gxr7.mjs +0 -6
- package/dist/ai-audit-BWZGvbca.mjs +0 -2
- package/dist/ai-gateway-jeB-sAgP.mjs +0 -13
- package/dist/ai-search-BmdskMjR.mjs +0 -7
- package/dist/ai-security-CsmfcaUx.mjs +0 -4
- package/dist/ai-viHB1tgI.mjs +0 -5
- package/dist/analytics-vOxw8Hy0.mjs +0 -3
- package/dist/analytics_engine-DO4-C0wD.mjs +0 -2
- package/dist/argo-CQfCgazW.mjs +0 -2
- package/dist/args-DlUhyGU0.mjs +0 -2
- package/dist/audit-logs-CzpwvQ6A.mjs +0 -2
- package/dist/auth-D0xZxAEa.mjs +0 -5
- package/dist/billing-aJgapeRm.mjs +0 -3
- package/dist/body-parser-C-c9gfH1.mjs +0 -2
- package/dist/bot-management-Y2q5d-pi.mjs +0 -5
- package/dist/botnet-feed-DANJqfmE.mjs +0 -3
- package/dist/brand-protection-CjpZWBjp.mjs +0 -3
- package/dist/browser-run-BFn9h2Tz.mjs +0 -4
- package/dist/build-DcflwvqN.mjs +0 -2
- package/dist/certificate-authorities-D7OAFxF_.mjs +0 -2
- package/dist/cf-C7DU4819.mjs +0 -18
- package/dist/chunk-LQW53VED-DLrXV-hE.mjs +0 -499
- package/dist/cloud-connector-Bhec6z2P.mjs +0 -2
- package/dist/cloudforce-one-J_hn9ss9.mjs +0 -36
- package/dist/connector-interrupts-Dycx8zFx.mjs +0 -2
- package/dist/connector-telemetry-events-BmxOSNtN.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CdcqfKnH.mjs +0 -2
- package/dist/containers-CKW081JA.mjs +0 -54
- package/dist/custom-certificates-BzAOnEoT.mjs +0 -5
- package/dist/custom-csrs-CgzG3pd3.mjs +0 -3
- package/dist/custom-nameservers-BUBmfhUe.mjs +0 -3
- package/dist/custom-pages-M7jA2Hit.mjs +0 -3
- package/dist/d1-BFvMd6-S.mjs +0 -20
- package/dist/data-security-Bji4Or_j.mjs +0 -7
- package/dist/dcv-delegation-BuoRQ1Yh.mjs +0 -2
- package/dist/deploy-CZ7bgNDu.mjs +0 -2
- package/dist/dev-V10MG-Bg.mjs +0 -4
- package/dist/dist-CgrMkXFx.mjs +0 -72
- package/dist/durable-objects-D8FQORrL.mjs +0 -2
- package/dist/email-auth-DJK0Eb30.mjs +0 -2
- package/dist/email-routing-NpmiKIrl.mjs +0 -6
- package/dist/email-security-BLZ7WZ9Z.mjs +0 -18
- package/dist/email-sending-dn-353Nx.mjs +0 -7
- package/dist/fieldExtractors-ahysj57J.mjs +0 -3
- package/dist/flagship-BusjRNIb.mjs +0 -4
- package/dist/google-tag-gateway-TZZ3F1tV.mjs +0 -2
- package/dist/iam-Cj63Kjc6.mjs +0 -6
- package/dist/images-CBWXCDhy.mjs +0 -8
- package/dist/ips-qs9eGJnI.mjs +0 -2
- package/dist/keys-D7N0j4-x.mjs +0 -2
- package/dist/load-balancers-D2zbQ8fT.mjs +0 -6
- package/dist/local-runtime-Dh3keC5v.mjs +0 -2
- package/dist/logexplorer-CUsfZ_bS.mjs +0 -13
- package/dist/logo-matches-CJcthPHf.mjs +0 -2
- package/dist/logos-BS65zN8q.mjs +0 -3
- package/dist/magic-network-monitoring-C7tAPNKP.mjs +0 -4
- package/dist/magic-transit-BtsFePMx.mjs +0 -111
- package/dist/managed-transforms-Cm_KVCMB.mjs +0 -3
- package/dist/matches-InA1hwII.mjs +0 -2
- package/dist/mcp-mJ7bekNJ.mjs +0 -4
- package/dist/mesh-BK4S1Ezy.mjs +0 -4
- package/dist/mtls-certificates-CU4OAAXY.mjs +0 -3
- package/dist/oauth-B0ETkNcX.mjs +0 -15
- package/dist/oauth-scopes-D5bF11ju.mjs +0 -2
- package/dist/observability-BWE0Gg3V.mjs +0 -4
- package/dist/organizations-DLhiRt8g.mjs +0 -2
- package/dist/origin-ca-certificates-Ff4McZRQ.mjs +0 -3
- package/dist/origin-post-quantum-encryption-UuTr4_SW.mjs +0 -2
- package/dist/origin-tls-client-auth-DOJ1zlH3.mjs +0 -4
- package/dist/page-rules-BSz1gO-_.mjs +0 -18
- package/dist/pages-DVDogxPs.mjs +0 -14
- package/dist/pay-per-crawl-BrLXK7gT.mjs +0 -4
- package/dist/pipelines-BszRk4sM.mjs +0 -6
- package/dist/precursor-BPNjQr76.mjs +0 -4
- package/dist/progress-CsHIt3Tp.mjs +0 -2
- package/dist/prompt-DdegNPpg.mjs +0 -3
- package/dist/queries-JL1H1Biz.mjs +0 -3
- package/dist/queues-DpkYdRUE.mjs +0 -6
- package/dist/r2-CKozthw_.mjs +0 -24
- package/dist/radar-C-92vggG.mjs +0 -2
- package/dist/raw-fetch-CteyTOM2.mjs +0 -2
- package/dist/registrar-DKKN0M29.mjs +0 -21
- package/dist/reporting-fg_GKXe1.mjs +0 -2
- package/dist/request-tracers-CkMya96z.mjs +0 -2
- package/dist/resource-tagging-z48JGHCq.mjs +0 -2
- package/dist/rules-BTmNjDN-.mjs +0 -4
- package/dist/rulesets-CsoSM-17.mjs +0 -5
- package/dist/rum-DB4iO2q5.mjs +0 -4
- package/dist/schema-flags-iGoOriJt.mjs +0 -5
- package/dist/security-center-DFKeHq5c.mjs +0 -2
- package/dist/session-D6KHthHf.mjs +0 -2
- package/dist/shared-VppSAQf4.mjs +0 -2
- package/dist/smart-shield-D6X8L7p8.mjs +0 -4
- package/dist/snippets-DIpc9pb_.mjs +0 -4
- package/dist/spawn-O1RS01vr.mjs +0 -523
- package/dist/src-D_HETJNy.mjs +0 -108
- package/dist/submit--xTzyNPy.mjs +0 -2
- package/dist/tags-efICDkah.mjs +0 -2
- package/dist/tenant-CerHuToJ.mjs +0 -2
- package/dist/tenant-custom-nameservers-C4otMBm2.mjs +0 -3
- package/dist/triggers-BEsiiKAf.mjs +0 -2
- package/dist/tunnels-D0J8lJoI.mjs +0 -2
- package/dist/turnstile-CFmtY5bn.mjs +0 -23
- package/dist/url-info-DBCeRWwb.mjs +0 -2
- package/dist/url-scanner-CNyvg65L.mjs +0 -2
- package/dist/user-bifVEQq5.mjs +0 -12
- package/dist/values-OxkdP1tV.mjs +0 -2
- package/dist/versions-BVL-Ludh.mjs +0 -2
- package/dist/waiting-rooms-CmRAl51T.mjs +0 -11
- package/dist/web3-y_cY91V_.mjs +0 -4
- package/dist/workers-jDcq14GH.mjs +0 -24
- package/dist/zaraz-27zwjLvv.mjs +0 -2
- package/dist/zone-BJix2KQ9.mjs +0 -2
- package/dist/zones-Bkj5i92c.mjs +0 -21
- /package/dist/{alerts-CRmjqOZi.mjs → alerts-9PR5sQ_z.mjs} +0 -0
- /package/dist/{autorag-BD7cu5NU.mjs → autorag-Bevo1kIH.mjs} +0 -0
- /package/dist/{brands-BhALBkX2.mjs → brands-C4M04Man.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
- /package/dist/{clear-BgF8No7D.mjs → clear-DS0eRXOc.mjs} +0 -0
- /package/dist/{cli-types-BsTty22w.mjs → cli-types-C3nVfpSG.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BY2556uL.mjs → connector-telemetry-events-latest-CKKG6_pD.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-BHYdxUEF.mjs → connector-telemetry-snapshots-latest-Bv5OddJr.mjs} +0 -0
- /package/dist/{domain-info-C50W5GhA.mjs → domain-info-BUiaGCEq.mjs} +0 -0
- /package/dist/{health-BFNZqiAm.mjs → health-vX6Ml2Na.mjs} +0 -0
- /package/dist/{input-validation-Bav2M9F-.mjs → input-validation-1esLElok.mjs} +0 -0
- /package/dist/{internal-BTeSewwB.mjs → internal-ROz7anul.mjs} +0 -0
- /package/dist/{live-Dkiyu30_.mjs → live-CSxvigCS.mjs} +0 -0
- /package/dist/{metadata-8AkOftcB.mjs → metadata-DEqBUaSv.mjs} +0 -0
- /package/dist/{rate-limit-analytics-Dz-Wv1T0.mjs → rate-limit-analytics-CgHgKjmV.mjs} +0 -0
- /package/dist/{ready-TKOkKeRg.mjs → ready-6G9zVGPJ.mjs} +0 -0
- /package/dist/{recent-submissions-3Asm6eIi.mjs → recent-submissions-B3Smh-QM.mjs} +0 -0
- /package/dist/{refute-BVz9nMyd.mjs → refute-DjkmLSNe.mjs} +0 -0
- /package/dist/{resolve-CeBbH6Pq.mjs → resolve-DEvdeprv.mjs} +0 -0
- /package/dist/{scan-logo-ZteA-PUV.mjs → scan-logo-545qLcGs.mjs} +0 -0
- /package/dist/{scan-page-DWDSyzQ7.mjs → scan-page-DRQiVufl.mjs} +0 -0
- /package/dist/{search-DGNc37HK.mjs → search-CXbqFoqe.mjs} +0 -0
- /package/dist/{signed-url-B5Qpn2mn.mjs → signed-url-rU_nvgFA.mjs} +0 -0
- /package/dist/{submission-info-FjUolE6A.mjs → submission-info-D6PgXNQP.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-CrIBazAF.mjs} +0 -0
- /package/dist/{total-queries-NHJj1HGq.mjs → total-queries-XkFyu8H5.mjs} +0 -0
- /package/dist/{tracked-domains-CniKVHIp.mjs → tracked-domains-CmcRXHj_.mjs} +0 -0
- /package/dist/{verify-DS1PWAJe.mjs → verify-CM1NakP0.mjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,r as c,t as l}from"./body-parser-BGVbwPeM.mjs";import{n as u}from"./input-validation-1esLElok.mjs";import{a as d,i as f}from"./prompt-CyATfGUu.mjs";import{t as p}from"./cli-types-C3nVfpSG.mjs";function m(e){return e.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 h={command:`eligibility <report-id>`,describe:`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.`,builder:m,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(s[`report-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.appeals.eligibility({account_id:l,report_id:s[`report-id`]})),{successLabel:`Loaded`})}},g={command:`appeals`,describe:`Operations for appeals`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.positional(`report-param`,{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/).
|
|
3
3
|
`}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
4
4
|
`,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/).
|
|
5
5
|
`}).option(`owner-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
6
6
|
`,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.
|
|
7
7
|
`}).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.
|
|
8
|
-
`,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 _={command:`create <report-param>`,describe:"Submit 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 `Account > Abuse Reports > Edit` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).",builder:g,handler:async f=>{if(f.dryRun){a({command:`cf abuse-reports create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${f[`report-param`]==null?`<report-param>`:encodeURIComponent(String(f[`report-param`]))}`,pathParams:{"report-param":String(f[`report-param`]??``)},bodyKind:`json`,body:f.body===void 0?c({act:l(f.act,`act`,`text`),comments:l(f.comments,`comments`,`text`),company:l(f.company,`company`,`text`),email:l(f.email,`email`,`text`),email2:l(f.email2,`email2`,`text`),name:l(f.name,`name`,`text`),reported_country:l(f[`reported-country`],`reported-country`,`text`),reported_user_agent:l(f[`reported-user-agent`],`reported-user-agent`,`text`),tele:l(f.tele,`tele`,`text`),title:l(f.title,`title`,`text`),urls:l(f.urls,`urls`,`text`),address1:l(f.address1,`address1`,`text`),agent_name:l(f[`agent-name`],`agent-name`,`text`),agree:f.agree,city:l(f.city,`city`,`text`),country:l(f.country,`country`,`text`),host_notification:l(f[`host-notification`],`host-notification`,`text`),original_work:l(f[`original-work`],`original-work`,`text`),owner_notification:l(f[`owner-notification`],`owner-notification`,`text`),signature:l(f.signature,`signature`,`text`),state:l(f.state,`state`,`text`),justification:l(f.justification,`justification`,`text`),trademark_number:l(f[`trademark-number`],`trademark-number`,`text`),trademark_office:l(f[`trademark-office`],`trademark-office`,`text`),trademark_symbol:l(f[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:l(f[`destination-ips`],`destination-ips`,`text`),ports_protocols:l(f[`ports-protocols`],`ports-protocols`,`text`),source_ips:l(f[`source-ips`],`source-ips`,`text`),ncmec_notification:l(f[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:l(f[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:f[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:f[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:l(f[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:l(f[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:f[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:l(f[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:f[`ncsei-subject-representation`]}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.abuseReports.create({body:e,account_id:m,report_param:f[`report-param`]})),{successLabel:`Created`});return}if(f.act===void 0&&(f.act=await d(`act`,`The act field`,[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`])),f.email===void 0&&(f.email=await u(`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/).`)),f.email2===void 0&&(f.email2=await u(`email2`,"Should match the value provided in `email`")),f.name===void 0&&(f.name=await u(`name`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),f.urls===void 0&&(f.urls=await u(`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/).`)),f[`owner-notification`]===void 0&&(f[`owner-notification`]=await d(`owner-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,[`send`,`send-anon`,`none`])),f.act===`abuse_dmca`&&f.address1===void 0&&(f.address1=await u(`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`})),f.act===`abuse_dmca`&&f[`agent-name`]===void 0&&(f[`agent-name`]=await u(`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`})),f.act===`abuse_dmca`&&f.agree===void 0)throw Error(`--agree is required (or pass --body with this field set).`);if(f.act===`abuse_dmca`&&f.city===void 0&&(f.city=await u(`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`})),f.act===`abuse_dmca`&&f.country===void 0&&(f.country=await u(`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`})),f.act===`abuse_dmca`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_dmca`&&f[`original-work`]===void 0&&(f[`original-work`]=await u(`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`})),f.act===`abuse_dmca`&&f.signature===void 0&&(f.signature=await u(`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`})),f.act===`abuse_dmca`&&f.state===void 0&&(f.state=await u(`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`})),f.act===`abuse_trademark`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_trademark`&&f.justification===void 0&&(f.justification=await u(`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`})),f.act===`abuse_trademark`&&f[`trademark-number`]===void 0&&(f[`trademark-number`]=await u(`trademark-number`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-number`})),f.act===`abuse_trademark`&&f[`trademark-office`]===void 0&&(f[`trademark-office`]=await u(`trademark-office`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-office`})),f.act===`abuse_trademark`&&f[`trademark-symbol`]===void 0&&(f[`trademark-symbol`]=await u(`trademark-symbol`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-symbol`})),f.act===`abuse_general`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_general`&&f.justification===void 0&&(f.justification=await u(`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`})),f.act===`abuse_phishing`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_phishing`&&f.justification===void 0&&(f.justification=await u(`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`})),f.act===`abuse_children`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_children`&&f.justification===void 0&&(f.justification=await u(`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`})),f.act===`abuse_children`&&f[`ncmec-notification`]===void 0&&(f[`ncmec-notification`]=await u(`ncmec-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --ncmec-notification`})),f.act===`abuse_threat`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_threat`&&f.justification===void 0&&(f.justification=await u(`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`})),f.act===`abuse_ncsei`&&f[`host-notification`]===void 0&&(f[`host-notification`]=await u(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),f.act===`abuse_ncsei`&&f[`ncsei-subject-representation`]===void 0)throw Error(`--ncsei-subject-representation is required (or pass --body with this field set).`);let h=c({act:l(f.act,`act`,`text`),comments:l(f.comments,`comments`,`text`),company:l(f.company,`company`,`text`),email:l(f.email,`email`,`text`),email2:l(f.email2,`email2`,`text`),name:l(f.name,`name`,`text`),reported_country:l(f[`reported-country`],`reported-country`,`text`),reported_user_agent:l(f[`reported-user-agent`],`reported-user-agent`,`text`),tele:l(f.tele,`tele`,`text`),title:l(f.title,`title`,`text`),urls:l(f.urls,`urls`,`text`),address1:l(f.address1,`address1`,`text`),agent_name:l(f[`agent-name`],`agent-name`,`text`),agree:f.agree,city:l(f.city,`city`,`text`),country:l(f.country,`country`,`text`),host_notification:l(f[`host-notification`],`host-notification`,`text`),original_work:l(f[`original-work`],`original-work`,`text`),owner_notification:l(f[`owner-notification`],`owner-notification`,`text`),signature:l(f.signature,`signature`,`text`),state:l(f.state,`state`,`text`),justification:l(f.justification,`justification`,`text`),trademark_number:l(f[`trademark-number`],`trademark-number`,`text`),trademark_office:l(f[`trademark-office`],`trademark-office`,`text`),trademark_symbol:l(f[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:l(f[`destination-ips`],`destination-ips`,`text`),ports_protocols:l(f[`ports-protocols`],`ports-protocols`,`text`),source_ips:l(f[`source-ips`],`source-ips`,`text`),ncmec_notification:l(f[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:l(f[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:f[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:f[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:l(f[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:l(f[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:f[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:l(f[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:f[`ncsei-subject-representation`]});i(await o(`Creating`,async()=>p.abuseReports.create({body:h,account_id:m,report_param:f[`report-param`]})),{successLabel:`Created`})}};function v(e){return e.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 y={command:`list`,describe:`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.`,builder:v,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf abuse-reports emails list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/emails`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.list({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}};function b(e){return e.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 x={command:`listSubmitted <report-id>`,describe:`List successful emails sent to the submitter of a report submitted by the account. Does not include emails sent to customers or hosts.`,builder:b,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf abuse-reports emails listSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/emails`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.listSubmitted({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}},S={command:`emails`,describe:`Emails operations`,builder:e=>e.command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.positional(`report-param`,{type:`string`,description:`Identifier of the abuse report`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <report-param>`,describe:`Retrieve the details of an abuse report.`,builder:C,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-param`]==null?`<report-param>`:encodeURIComponent(String(s[`report-param`]))}`,pathParams:{"report-param":String(s[`report-param`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.get({account_id:l,report_param:s[`report-param`]})),{successLabel:`Loaded`})}};function T(e){return e.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 E={command:`getSubmitted <report-id>`,describe:`Retrieve a report submitted by the account.`,builder:T,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports getSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}`,pathParams:{"report-id":String(s[`report-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.getSubmitted({account_id:l,report_id:s[`report-id`]})),{successLabel:`Loaded`})}};function D(e){return e.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 O={command:`list`,describe:`List the abuse reports for a given account`,builder:f(D),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,domain:s.domain,created_before:s[`created-before`],created_after:s[`created-after`],status:s.status,type:s.type,mitigation_status:s[`mitigation-status`]};if(s.dryRun){a({command:`cf abuse-reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.list({account_id:u,...c})),{successLabel:`Loaded`})}};function k(e){return e.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 A={command:`listSubmitted`,describe:`List abuse reports submitted by the account.`,builder:f(k),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,id:s.id,domain:s.domain,created_before:s[`created-before`],created_after:s[`created-after`],status:s.status,type:s.type};if(s.dryRun){a({command:`cf abuse-reports listSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.listSubmitted({account_id:u,...c})),{successLabel:`Loaded`})}};function j(e){return e.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 M={command:`list`,describe:`List mitigations done to remediate the abuse report.`,builder:f(j),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,type:s.type,effective_before:s[`effective-before`],effective_after:s[`effective-after`],status:s.status,entity_type:s[`entity-type`]};if(s.dryRun){a({command:`cf abuse-reports mitigations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/mitigations`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.mitigations.list({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}};function N(e){return e.positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).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 P={command:`review <report-id>`,describe:`Request a review for mitigations on an account.`,builder:N,handler:async u=>{if(u.dryRun){a({command:`cf abuse-reports mitigations review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${u[`report-id`]==null?`<report-id>`:encodeURIComponent(String(u[`report-id`]))}/mitigations/appeal`,pathParams:{"report-id":String(u[`report-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({data:{city:l(u[`data-city`],`data-city`,`text`),company:l(u[`data-company`],`data-company`,`text`),counter_notice_response:l(u[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:l(u[`data-country`],`data-country`,`text`),email:l(u[`data-email`],`data-email`,`text`),full_name:l(u[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:u[`data-jurisdiction-consent`],perjury_attestation:u[`data-perjury-attestation`],phone_number:l(u[`data-phone-number`],`data-phone-number`,`text`),signature:l(u[`data-signature`],`data-signature`,`text`),state:l(u[`data-state`],`data-state`,`text`),street_address:l(u[`data-street-address`],`data-street-address`,`text`),urls:u[`data-urls`],zip_code:l(u[`data-zip-code`],`data-zip-code`,`text`)},type:l(u.type,`type`,`text`)}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.abuseReports.mitigations.review({body:e,account_id:f,report_id:u[`report-id`]})),{successLabel:`Created`});return}let p=c({data:{city:l(u[`data-city`],`data-city`,`text`),company:l(u[`data-company`],`data-company`,`text`),counter_notice_response:l(u[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:l(u[`data-country`],`data-country`,`text`),email:l(u[`data-email`],`data-email`,`text`),full_name:l(u[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:u[`data-jurisdiction-consent`],perjury_attestation:u[`data-perjury-attestation`],phone_number:l(u[`data-phone-number`],`data-phone-number`,`text`),signature:l(u[`data-signature`],`data-signature`,`text`),state:l(u[`data-state`],`data-state`,`text`),street_address:l(u[`data-street-address`],`data-street-address`,`text`),urls:u[`data-urls`],zip_code:l(u[`data-zip-code`],`data-zip-code`,`text`)},type:l(u.type,`type`,`text`)});i(await o(`Creating`,async()=>d.abuseReports.mitigations.review({body:p,account_id:f,report_id:u[`report-id`]})),{successLabel:`Created`})}},F={command:`mitigations`,describe:`Mitigation actions taken in response to abuse reports`,builder:e=>e.command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`abuse-reports`,describe:`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,builder:e=>e.command(_).command(w).command(E).command(O).command(A).command(h).command(S).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
|
|
8
|
+
`,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 v={command:`create <report-param>`,describe:"Submit 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 `Account > Abuse Reports > Edit` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).",builder:_,handler:async c=>{if(c.dryRun){a({command:`cf abuse-reports create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${c[`report-param`]==null?`<report-param>`:encodeURIComponent(String(c[`report-param`]))}`,pathParams:{"report-param":String(c[`report-param`]??``)},bodyKind:`json`,body:c.body===void 0?l({act:u(c.act,`act`,`text`),comments:u(c.comments,`comments`,`text`),company:u(c.company,`company`,`text`),email:u(c.email,`email`,`text`),email2:u(c.email2,`email2`,`text`),name:u(c.name,`name`,`text`),reported_country:u(c[`reported-country`],`reported-country`,`text`),reported_user_agent:u(c[`reported-user-agent`],`reported-user-agent`,`text`),tele:u(c.tele,`tele`,`text`),title:u(c.title,`title`,`text`),urls:u(c.urls,`urls`,`text`),address1:u(c.address1,`address1`,`text`),agent_name:u(c[`agent-name`],`agent-name`,`text`),agree:c.agree,city:u(c.city,`city`,`text`),country:u(c.country,`country`,`text`),host_notification:u(c[`host-notification`],`host-notification`,`text`),original_work:u(c[`original-work`],`original-work`,`text`),owner_notification:u(c[`owner-notification`],`owner-notification`,`text`),signature:u(c.signature,`signature`,`text`),state:u(c.state,`state`,`text`),justification:u(c.justification,`justification`,`text`),trademark_number:u(c[`trademark-number`],`trademark-number`,`text`),trademark_office:u(c[`trademark-office`],`trademark-office`,`text`),trademark_symbol:u(c[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:u(c[`destination-ips`],`destination-ips`,`text`),ports_protocols:u(c[`ports-protocols`],`ports-protocols`,`text`),source_ips:u(c[`source-ips`],`source-ips`,`text`),ncmec_notification:u(c[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:u(c[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:c[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:c[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:u(c[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:u(c[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:c[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:u(c[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:c[`ncsei-subject-representation`]}):s(c.body)});return}let p=await r(c),m=c.local?e:await t();if(c.accountId=m,c.body){let e=s(c.body);i(await o(`Creating`,async()=>p.abuseReports.create({body:e,account_id:m,report_param:c[`report-param`]})),{successLabel:`Created`});return}if(c.act===void 0&&(c.act=await f(`act`,`The act field`,[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`])),c.email===void 0&&(c.email=await d(`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/).`)),c.email2===void 0&&(c.email2=await d(`email2`,"Should match the value provided in `email`")),c.name===void 0&&(c.name=await d(`name`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),c.urls===void 0&&(c.urls=await d(`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/).`)),c[`owner-notification`]===void 0&&(c[`owner-notification`]=await f(`owner-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,[`send`,`send-anon`,`none`])),c.act===`abuse_dmca`&&c.address1===void 0&&(c.address1=await d(`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`})),c.act===`abuse_dmca`&&c[`agent-name`]===void 0&&(c[`agent-name`]=await d(`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`})),c.act===`abuse_dmca`&&c.agree===void 0)throw Error(`--agree is required (or pass --body with this field set).`);if(c.act===`abuse_dmca`&&c.city===void 0&&(c.city=await d(`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`})),c.act===`abuse_dmca`&&c.country===void 0&&(c.country=await d(`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`})),c.act===`abuse_dmca`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_dmca`&&c[`original-work`]===void 0&&(c[`original-work`]=await d(`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`})),c.act===`abuse_dmca`&&c.signature===void 0&&(c.signature=await d(`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`})),c.act===`abuse_dmca`&&c.state===void 0&&(c.state=await d(`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`})),c.act===`abuse_trademark`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_trademark`&&c.justification===void 0&&(c.justification=await d(`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`})),c.act===`abuse_trademark`&&c[`trademark-number`]===void 0&&(c[`trademark-number`]=await d(`trademark-number`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-number`})),c.act===`abuse_trademark`&&c[`trademark-office`]===void 0&&(c[`trademark-office`]=await d(`trademark-office`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-office`})),c.act===`abuse_trademark`&&c[`trademark-symbol`]===void 0&&(c[`trademark-symbol`]=await d(`trademark-symbol`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-symbol`})),c.act===`abuse_general`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_general`&&c.justification===void 0&&(c.justification=await d(`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`})),c.act===`abuse_phishing`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_phishing`&&c.justification===void 0&&(c.justification=await d(`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`})),c.act===`abuse_children`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_children`&&c.justification===void 0&&(c.justification=await d(`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`})),c.act===`abuse_children`&&c[`ncmec-notification`]===void 0&&(c[`ncmec-notification`]=await d(`ncmec-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --ncmec-notification`})),c.act===`abuse_threat`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_threat`&&c.justification===void 0&&(c.justification=await d(`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`})),c.act===`abuse_ncsei`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_ncsei`&&c[`ncsei-subject-representation`]===void 0)throw Error(`--ncsei-subject-representation is required (or pass --body with this field set).`);let h=l({act:u(c.act,`act`,`text`),comments:u(c.comments,`comments`,`text`),company:u(c.company,`company`,`text`),email:u(c.email,`email`,`text`),email2:u(c.email2,`email2`,`text`),name:u(c.name,`name`,`text`),reported_country:u(c[`reported-country`],`reported-country`,`text`),reported_user_agent:u(c[`reported-user-agent`],`reported-user-agent`,`text`),tele:u(c.tele,`tele`,`text`),title:u(c.title,`title`,`text`),urls:u(c.urls,`urls`,`text`),address1:u(c.address1,`address1`,`text`),agent_name:u(c[`agent-name`],`agent-name`,`text`),agree:c.agree,city:u(c.city,`city`,`text`),country:u(c.country,`country`,`text`),host_notification:u(c[`host-notification`],`host-notification`,`text`),original_work:u(c[`original-work`],`original-work`,`text`),owner_notification:u(c[`owner-notification`],`owner-notification`,`text`),signature:u(c.signature,`signature`,`text`),state:u(c.state,`state`,`text`),justification:u(c.justification,`justification`,`text`),trademark_number:u(c[`trademark-number`],`trademark-number`,`text`),trademark_office:u(c[`trademark-office`],`trademark-office`,`text`),trademark_symbol:u(c[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:u(c[`destination-ips`],`destination-ips`,`text`),ports_protocols:u(c[`ports-protocols`],`ports-protocols`,`text`),source_ips:u(c[`source-ips`],`source-ips`,`text`),ncmec_notification:u(c[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:u(c[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:c[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:c[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:u(c[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:u(c[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:c[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:u(c[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:c[`ncsei-subject-representation`]});i(await o(`Creating`,async()=>p.abuseReports.create({body:h,account_id:m,report_param:c[`report-param`]})),{successLabel:`Created`})}};function y(e){return e.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 b={command:`list`,describe:`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.`,builder:y,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf abuse-reports emails list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/emails`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.list({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}};function x(e){return e.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 S={command:`listSubmitted <report-id>`,describe:`List successful emails sent to the submitter of a report submitted by the account. Does not include emails sent to customers or hosts.`,builder:x,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf abuse-reports emails listSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/emails`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.listSubmitted({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}},C={command:`emails`,describe:`Emails operations`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.positional(`report-param`,{type:`string`,description:`Identifier of the abuse report`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <report-param>`,describe:`Retrieve the details of an abuse report.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-param`]==null?`<report-param>`:encodeURIComponent(String(s[`report-param`]))}`,pathParams:{"report-param":String(s[`report-param`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.get({account_id:l,report_param:s[`report-param`]})),{successLabel:`Loaded`})}};function E(e){return e.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 D={command:`getSubmitted <report-id>`,describe:`Retrieve a report submitted by the account.`,builder:E,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports getSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}`,pathParams:{"report-id":String(s[`report-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.getSubmitted({account_id:l,report_id:s[`report-id`]})),{successLabel:`Loaded`})}};function O(e){return e.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 k={command:`list`,describe:`List the abuse reports for a given account`,builder:p(O),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,domain:s.domain,created_before:s[`created-before`],created_after:s[`created-after`],status:s.status,type:s.type,mitigation_status:s[`mitigation-status`]};if(s.dryRun){a({command:`cf abuse-reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.list({account_id:u,...c})),{successLabel:`Loaded`})}};function A(e){return e.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 j={command:`listSubmitted`,describe:`List abuse reports submitted by the account.`,builder:p(A),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,id:s.id,domain:s.domain,created_before:s[`created-before`],created_after:s[`created-after`],status:s.status,type:s.type};if(s.dryRun){a({command:`cf abuse-reports listSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.listSubmitted({account_id:u,...c})),{successLabel:`Loaded`})}};function M(e){return e.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 N={command:`list`,describe:`List mitigations done to remediate the abuse report.`,builder:p(M),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,type:s.type,effective_before:s[`effective-before`],effective_after:s[`effective-after`],status:s.status,entity_type:s[`entity-type`]};if(s.dryRun){a({command:`cf abuse-reports mitigations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/mitigations`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.mitigations.list({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}};function P(e){return e.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 F={command:`review <report-id>`,describe:`Request a review for mitigations on an account.`,builder:P,handler:async d=>{if(d.dryRun){a({command:`cf abuse-reports mitigations review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${d[`report-id`]==null?`<report-id>`:encodeURIComponent(String(d[`report-id`]))}/mitigations/appeal`,pathParams:{"report-id":String(d[`report-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({appeals:c(d.appeals,`appeals`),data:{city:u(d[`data-city`],`data-city`,`text`),company:u(d[`data-company`],`data-company`,`text`),counter_notice_response:u(d[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:u(d[`data-country`],`data-country`,`text`),email:u(d[`data-email`],`data-email`,`text`),full_name:u(d[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:d[`data-jurisdiction-consent`],perjury_attestation:d[`data-perjury-attestation`],phone_number:u(d[`data-phone-number`],`data-phone-number`,`text`),signature:u(d[`data-signature`],`data-signature`,`text`),state:u(d[`data-state`],`data-state`,`text`),street_address:u(d[`data-street-address`],`data-street-address`,`text`),urls:d[`data-urls`],zip_code:u(d[`data-zip-code`],`data-zip-code`,`text`)},type:u(d.type,`type`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.abuseReports.mitigations.review({body:e,account_id:p,report_id:d[`report-id`]})),{successLabel:`Created`});return}let m=l({appeals:c(d.appeals,`appeals`),data:{city:u(d[`data-city`],`data-city`,`text`),company:u(d[`data-company`],`data-company`,`text`),counter_notice_response:u(d[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:u(d[`data-country`],`data-country`,`text`),email:u(d[`data-email`],`data-email`,`text`),full_name:u(d[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:d[`data-jurisdiction-consent`],perjury_attestation:d[`data-perjury-attestation`],phone_number:u(d[`data-phone-number`],`data-phone-number`,`text`),signature:u(d[`data-signature`],`data-signature`,`text`),state:u(d[`data-state`],`data-state`,`text`),street_address:u(d[`data-street-address`],`data-street-address`,`text`),urls:d[`data-urls`],zip_code:u(d[`data-zip-code`],`data-zip-code`,`text`)},type:u(d.type,`type`,`text`)});i(await o(`Creating`,async()=>f.abuseReports.mitigations.review({body:m,account_id:p,report_id:d[`report-id`]})),{successLabel:`Created`})}},I={command:`mitigations`,describe:`Mitigation actions taken in response to abuse reports`,builder:e=>e.command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`abuse-reports`,describe:`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,builder:e=>e.command(v).command(T).command(D).command(k).command(j).command(g).command(C).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u,n as d}from"./prompt-CyATfGUu.mjs";import{t as f}from"./cli-types-C3nVfpSG.mjs";function p(e){return e.option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).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 m={command:`delete`,describe:`Removes one or more targets.`,builder:p,handler:async l=>{if(l.dryRun){a({command:`cf access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:l.body===void 0?c({target_ids:l[`target-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...e,account_id:d})),{successLabel:`Created`});return}if(l[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let f=c({target_ids:l[`target-ids`]});i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...f,account_id:d})),{successLabel:`Created`})}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`update`,describe:`Adds one or more targets.`,builder:h,handler:async c=>{if(c.dryRun){a({command:`cf access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch`,pathParams:{},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Updating`,async()=>l.access.targets.bulk.update({body:e,account_id:u})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},_={command:`bulk`,describe:`Operations for targets.bulk`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
3
3
|
length of 255 characters, supports the use of special characters dash
|
|
4
4
|
and period, does not support spaces, and must start and end with an
|
|
5
5
|
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be 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 y={command:`create`,describe:`Creates a new infrastructure access target in the account.`,builder:v,handler:async d=>{if(d.dryRun){a({command:`cf access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.access.targets.create({...e,account_id:p})),{successLabel:`Created`});return}d.hostname===void 0&&(d.hostname=await u(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let m=c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});i(await o(`Creating`,async()=>f.access.targets.create({...m,account_id:p})),{successLabel:`Created`})}};function b(e){return e.positional(`target-id`,{type:`string`,description:`Target 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 x={command:`delete <target-id>`,describe:`Removes a single infrastructure access target by its ID.`,builder:b,handler:async s=>{if(s.dryRun){a({command:`cf access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${s[`target-id`]==null?`<target-id>`:encodeURIComponent(String(s[`target-id`]))}`,pathParams:{"target-id":String(s[`target-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await d({force:!!s.force})){process.stderr.write(`Aborted.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u}from"./prompt-CyATfGUu.mjs";function d(e){return e.option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization ID.`}).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 f={command:`move`,describe:`Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`,builder:d,handler:async e=>{if(e.dryRun){a({command:`cf account batch move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)}):s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await u(`destination-organization-id`,`Move accounts to this organization ID.`));let n=c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`})}},p={command:`batch`,describe:`Operations for batch`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).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 h={command:`move`,describe:`Move an account within an organization hierarchy or an account outside an organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:m,handler:async d=>{if(d.dryRun){a({command:`cf account move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.account.move({...e,account_id:p})),{successLabel:`Created`});return}d[`destination-organization-id`]===void 0&&(d[`destination-organization-id`]=await u(`destination-organization-id`,`The destination_organization_id field`));let m=c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>f.account.move({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`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.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf account organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.organization.list({account_id:l})),{successLabel:`Loaded`})}},v={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf account profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.profile.get({account_id:l})),{successLabel:`Loaded`})}};function x(e){return e.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 S={command:`update`,describe:`Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`,builder:x,handler:async d=>{if(d.dryRun){a({command:`cf account profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.account.profile.update({body:e,account_id:p})),{successLabel:`Updated`});return}d[`business-address`]===void 0&&(d[`business-address`]=await u(`business-address`,`The business_address field`)),d[`business-email`]===void 0&&(d[`business-email`]=await u(`business-email`,`The business_email field`)),d[`business-name`]===void 0&&(d[`business-name`]=await u(`business-name`,`The business_name field`)),d[`business-phone`]===void 0&&(d[`business-phone`]=await u(`business-phone`,`The business_phone field`)),d[`external-metadata`]===void 0&&(d[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let m=c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)});i(await o(`Updating`,async()=>f.account.profile.update({body:m,account_id:p})),{successLabel:`Updated`})}},C={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`account`,describe:`account`,builder:e=>e.command(h).command(p).command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n,h as r}from"./oauth-DAa7SwkM.mjs";import{a as i,r as a}from"./auth-DY_Y2bXC.mjs";import{t as o}from"./output-BqDR9h74.mjs";import{t as s}from"./dry-run-ILZRVpnp.mjs";import{t as c}from"./progress-jYW64HY7.mjs";import{i as l,n as u,t as d}from"./body-parser-BGVbwPeM.mjs";import{n as f}from"./input-validation-1esLElok.mjs";import{a as p,i as m,n as h}from"./prompt-CyATfGUu.mjs";import{t as g}from"./cli-types-C3nVfpSG.mjs";function _(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
3
3
|
verify the current resource ETag matches before applying the write. Returns
|
|
4
4
|
412 Precondition Failed if the resource has been modified since the ETag was
|
|
5
|
-
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:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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 v={command:`delete`,describe:`Removes all tags from a specific account or zone-level resource.`,builder:_,handler:async g=>{let _={};if(g[`if-match`]!==void 0&&(_[`If-Match`]=String(g[`if-match`])),g.dryRun){let e=g.zone===void 0?await n():void 0,t=g.zone===void 0?`accounts`:`zones`,r=g.zone??e??`<account-id>`;s({command:`cf account-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:g.body===void 0?d({resource_id:f(g[`resource-id`],`resource-id`,`text`),resource_type:f(g[`resource-type`],`resource-type`,`text`),worker_id:f(g[`worker-id`],`worker-id`,`text`)}):
|
|
6
|
-
`);return}if(g.body){let e=
|
|
5
|
+
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:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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 v={command:`delete`,describe:`Removes all tags from a specific account or zone-level resource.`,builder:_,handler:async g=>{let _={};if(g[`if-match`]!==void 0&&(_[`If-Match`]=String(g[`if-match`])),g.dryRun){let e=g.zone===void 0?await n():void 0,t=g.zone===void 0?`accounts`:`zones`,r=g.zone??e??`<account-id>`;s({command:`cf account-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:g.body===void 0?d({resource_id:f(g[`resource-id`],`resource-id`,`text`),resource_type:f(g[`resource-type`],`resource-type`,`text`),worker_id:f(g[`worker-id`],`worker-id`,`text`)}):u(g.body)});return}let v=await a(g),y=g.zone===void 0?`accounts`:`zones`,b=y===`zones`?await r({zone:g.zone},v,{quiet:g.quiet}):g.local?e:await t();if(y===`zones`?g.zoneId=b:g.accountId=b,!await h({force:!!g.force})){process.stderr.write(`Aborted.
|
|
6
|
+
`);return}if(g.body){let e=u(g.body);o(await c(`Deleting`,async()=>i(v,`DELETE`,`/${y}/${b}/tags`,{body:e,headers:Object.keys(_).length>0?_:void 0})),{successLabel:`Deleted`});return}g[`resource-id`]===void 0&&(g[`resource-id`]=await p(`resource-id`,`Identifies the unique resource.`)),g[`resource-type`]===void 0&&(g[`resource-type`]=await m(`resource-type`,`Enum for worker_version resource type.`,`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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 p(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let x={};g[`resource-id`]!==void 0&&l(x,[`resource_id`],f(g[`resource-id`],`resource-id`,`text`)),g[`resource-type`]!==void 0&&l(x,[`resource_type`],f(g[`resource-type`],`resource-type`,`text`)),g[`worker-id`]!==void 0&&l(x,[`worker_id`],f(g[`worker-id`],`worker-id`,`text`)),o(await c(`Deleting`,async()=>i(v,`DELETE`,`/${y}/${b}/tags`,{body:Object.keys(x).length>0?x:void 0,headers:Object.keys(_).length>0?_:void 0})),{successLabel:`Deleted`})}};function y(e){return e.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:`access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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 b={command:`get`,describe:`Retrieves tags for a specific account or zone-level resource.`,builder:g(y),handler:async i=>{let l={resource_id:i[`resource-id`],resource_type:i[`resource-type`],worker_id:i[`worker-id`]};if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf account-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await t();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.accountTags.get({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})}};function x(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
7
7
|
verify the current resource ETag matches before applying the write. Returns
|
|
8
8
|
412 Precondition Failed if the resource has been modified since the ETag was
|
|
9
|
-
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:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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 S={command:`update`,describe:`Creates or updates tags for a specific account or zone-level resource.`,builder:x,handler:async h=>{let g={};if(h[`if-match`]!==void 0&&(g[`If-Match`]=String(h[`if-match`])),h.dryRun){let e=h.zone===void 0?await n():void 0,t=h.zone===void 0?`accounts`:`zones`,r=h.zone??e??`<account-id>`;s({command:`cf account-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:h.body===void 0?d({resource_id:f(h[`resource-id`],`resource-id`,`text`),resource_type:f(h[`resource-type`],`resource-type`,`text`),worker_id:f(h[`worker-id`],`worker-id`,`text`)}):
|
|
9
|
+
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:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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 S={command:`update`,describe:`Creates or updates tags for a specific account or zone-level resource.`,builder:x,handler:async h=>{let g={};if(h[`if-match`]!==void 0&&(g[`If-Match`]=String(h[`if-match`])),h.dryRun){let e=h.zone===void 0?await n():void 0,t=h.zone===void 0?`accounts`:`zones`,r=h.zone??e??`<account-id>`;s({command:`cf account-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:h.body===void 0?d({resource_id:f(h[`resource-id`],`resource-id`,`text`),resource_type:f(h[`resource-type`],`resource-type`,`text`),worker_id:f(h[`worker-id`],`worker-id`,`text`)}):u(h.body)});return}let _=await a(h),v=h.zone===void 0?`accounts`:`zones`,y=v===`zones`?await r({zone:h.zone},_,{quiet:h.quiet}):h.local?e:await t();if(v===`zones`?h.zoneId=y:h.accountId=y,h.body){let e=u(h.body);o(await c(`Updating`,async()=>i(_,`PUT`,`/${v}/${y}/tags`,{body:e,headers:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`});return}h[`resource-id`]===void 0&&(h[`resource-id`]=await p(`resource-id`,`Identifies the unique resource.`)),h[`resource-type`]===void 0&&(h[`resource-type`]=await m(`resource-type`,`Enum for worker_version resource type.`,`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.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(`.`))),h[`resource-type`]===`worker_version`&&h[`worker-id`]===void 0&&(h[`worker-id`]=await p(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let b={};h[`resource-id`]!==void 0&&l(b,[`resource_id`],f(h[`resource-id`],`resource-id`,`text`)),h[`resource-type`]!==void 0&&l(b,[`resource_type`],f(h[`resource-type`],`resource-type`,`text`)),h[`worker-id`]!==void 0&&l(b,[`worker_id`],f(h[`worker-id`],`worker-id`,`text`)),o(await c(`Updating`,async()=>i(_,`PUT`,`/${v}/${y}/tags`,{body:Object.keys(b).length>0?b:void 0,headers:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`})}},C={command:`account-tags`,describe:`account-tags`,builder:e=>e.command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{C as default};
|