cf 1.0.0-beta.14 → 1.0.0-beta.16
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 +10 -0
- package/dist/_meta/commands.json +6545 -3180
- package/dist/_meta/hand-written-commands.json +35 -2
- package/dist/_meta/schemas.json +7031 -4599
- package/dist/abuse-reports-17K-TRhO.mjs +24 -0
- package/dist/{access-k1QjF5rE.mjs → access-BwB7sg1D.mjs} +1 -1
- package/dist/account-tags-povXTDAu.mjs +15 -0
- package/dist/accounts-BnIGu_ac.mjs +132 -0
- package/dist/acm-CQRcu_zw.mjs +15 -0
- package/dist/addressing-Qcm9jd3C.mjs +105 -0
- package/dist/agent-memory-B3xN9I6-.mjs +34 -0
- package/dist/ai-BRKOCckA.mjs +31 -0
- package/dist/ai-audit-Cd9Rc2Fc.mjs +6 -0
- package/dist/ai-gateway-BWU5064V.mjs +80 -0
- package/dist/ai-search-CJ3b8eot.mjs +79 -0
- package/dist/ai-security-Dn0Ee6QS.mjs +10 -0
- package/dist/alerting-BXTiMfXo.mjs +56 -0
- package/dist/analytics-Jyd04TRW.mjs +17 -0
- package/dist/analytics-engine-CzrNfUeh.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DRBHZaf_.mjs +154 -0
- package/dist/argo-DiQt0pSb.mjs +14 -0
- package/dist/artifacts-eBZ4YN53.mjs +43 -0
- package/dist/audit-logs-Bb4HTZay.mjs +4 -0
- package/dist/auth-C6My1gI6.mjs +2 -0
- package/dist/auth-OFqV2M4q.mjs +2 -0
- package/dist/auth-eVI_UEt8.mjs +2 -0
- package/dist/{auth-token-Dop0wLCw.mjs → auth-token-Cfj2yehs.mjs} +1 -1
- package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-Cwk1RSMX.mjs +46 -0
- package/dist/billing-CfV8oi6A.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-CH4_Kewx.mjs +9 -0
- package/dist/botnet-feed-Cg_Wp8ei.mjs +11 -0
- package/dist/brand-protection-Cp2ckWou.mjs +27 -0
- package/dist/browser-run-CfQ30dB6.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-B2RBgVL9.mjs +71 -0
- package/dist/cache-yvrYPvRI.mjs +45 -0
- package/dist/certificate-authorities-BdMRaOnD.mjs +6 -0
- package/dist/cf-Bq4pA4n6.mjs +18 -0
- package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
- package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
- package/dist/{chunk-DSGVRFIS-CPI5cYtB.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-ht4q6i2y.mjs → cli-CsnoQloF.mjs} +1 -1
- package/dist/client-certificates-CuWGvZSr.mjs +13 -0
- package/dist/client-side-security-D50iZjd_.mjs +63 -0
- package/dist/cloud-connector-wvSGdxWT.mjs +6 -0
- package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-j6vlmaMB.mjs +405 -0
- package/dist/{command-9VAc7b30.mjs → command-74P4_CTx.mjs} +1 -1
- package/dist/{command-B_Ixlz8Q.mjs → command-BDpm-U8z.mjs} +1 -1
- package/dist/{command-OHov3PEc.mjs → command-BSbhJRmu.mjs} +1 -1
- package/dist/{command-DjEJaOwV.mjs → command-BbO3sBQ2.mjs} +1 -1
- package/dist/{command-CtVUNm__.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-DtgJilOK.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-CyJQ40fc.mjs → command-CM_f48gs.mjs} +1 -1
- package/dist/command-CmUtmu5j.mjs +2 -0
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-SmWD-MeI.mjs → command-DFRsim8q.mjs} +1 -1
- package/dist/command-DQojhTEQ.mjs +2 -0
- package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-BtDY_MKv.mjs → command-DiqRELHF.mjs} +1 -1
- package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{command-Ckb9FufU.mjs → command-Dr4PEvB2.mjs} +1 -1
- package/dist/{completions-CuqAO3N_.mjs → completions-oD1EcuHk.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-DP4rbOe8.mjs +6 -0
- package/dist/connector-telemetry-events-BQGBQwzR.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DBO0Mdcj.mjs +6 -0
- package/dist/connectors-BSVr3Kz1.mjs +15 -0
- package/dist/containers-BOpKpipz.mjs +376 -0
- package/dist/containers-BTqAeVV2.mjs +78 -0
- package/dist/content-scan-B9Keyxe-.mjs +14 -0
- package/dist/{context-BBLtgdR1.mjs → context-B-vEsyrK.mjs} +2 -2
- package/dist/{cps-C5phNoVU.mjs → cps-VRP794c5.mjs} +3 -3
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csam-scanner-C1jOgXVu.mjs +10 -0
- package/dist/ct-alerting-Y9vfa6Fo.mjs +5 -0
- package/dist/custom-certificates-CojTEC0E.mjs +17 -0
- package/dist/custom-csrs-DM5X-K6H.mjs +11 -0
- package/dist/custom-hostnames-BBjqaiFF.mjs +27 -0
- package/dist/custom-nameservers-C0NDMLPJ.mjs +9 -0
- package/dist/custom-pages-M4RUxcn6.mjs +21 -0
- package/dist/{d1-EQMUlHTJ.mjs → d1-hin5PmxW.mjs} +31 -31
- package/dist/dcv-delegation-KOO8syyQ.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/{deploy-B22sEVHd.mjs → deploy-Bo7FtE44.mjs} +1 -1
- package/dist/deploy-context-ClvBD87y.mjs +56 -0
- package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-LZuMrGjK.mjs +15 -0
- package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
- package/dist/dls-Bq8k3iy-.mjs +17 -0
- package/dist/dns-firewall-zavP5Qxj.mjs +71 -0
- package/dist/dns-ry5E2Bsa.mjs +144 -0
- package/dist/docs-B08YtL0U.mjs +3 -0
- package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
- package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
- package/dist/durable-objects-B9fo41B1.mjs +6 -0
- package/dist/email-auth-D9LGjFlh.mjs +6 -0
- package/dist/email-routing-6iDnNPhY.mjs +45 -0
- package/dist/email-security-ty4ufRnJ.mjs +158 -0
- package/dist/email-sending-d7LO_Cz_.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/field-extractors-DkgQ7PSw.mjs +9 -0
- package/dist/firewall-Q88YyEwD.mjs +36 -0
- package/dist/flagship-CzI8zhd6.mjs +28 -0
- package/dist/fraud-CvFXTR0w.mjs +22 -0
- package/dist/get-By1q8YlI.mjs +2 -0
- package/dist/get-CRKvqCu6.mjs +2 -0
- package/dist/get-iPUHxD1r.mjs +2 -0
- package/dist/google-tag-gateway-Y2zbyey8.mjs +6 -0
- package/dist/healthchecks-4Hz-6xYi.mjs +22 -0
- package/dist/{hostnames-DvaUSzsj.mjs → hostnames-B3k7fIUL.mjs} +6 -6
- package/dist/hyperdrive-BWGYz95H.mjs +37 -0
- package/dist/iam-AXco_qmt.mjs +52 -0
- package/dist/images-BzYh8y0u.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Da8pe296.mjs → init-DlenHBtS.mjs} +2 -2
- package/dist/intel-BBi3i_GU.mjs +76 -0
- package/dist/ips-CWG2b7AM.mjs +4 -0
- package/dist/k2-DXdMe3Cb.mjs +11 -0
- package/dist/keyless-certificates-B4ta_OGS.mjs +13 -0
- package/dist/keys-B9zvFzrf.mjs +4 -0
- package/dist/kv-FUd7UdDu.mjs +15 -0
- package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-BC8rIlHu.mjs} +1 -1
- package/dist/leaked-credential-checks-BufVA9vL.mjs +18 -0
- package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-CWd9mSWM.mjs} +40 -40
- package/dist/{local-BcPM4I0s.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-BHKyRlCP.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
- package/dist/login-BJr2PBaJ.mjs +5 -0
- package/dist/login-DVbXZ_Tv.mjs +2 -0
- package/dist/logo-matches-BluaPvMa.mjs +6 -0
- package/dist/logos-CXtmYWEJ.mjs +7 -0
- package/dist/logpush-DCYgrqz0.mjs +46 -0
- package/dist/logs-as60IP29.mjs +36 -0
- package/dist/magic-cloud-networking-0RsHugUF.mjs +71 -0
- package/dist/magic-network-monitoring-CPqvZdcb.mjs +36 -0
- package/dist/magic-transit-ClPyGzOE.mjs +386 -0
- package/dist/managed-defense-P4_QWSbK.mjs +18 -0
- package/dist/managed-transforms-CUwQXMij.mjs +9 -0
- package/dist/matches-BjckDBW1.mjs +6 -0
- package/dist/mcp-C2EG2c7L.mjs +32 -0
- package/dist/mesh-CpMZA7Xt.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-DypuCZmU.mjs +20 -0
- package/dist/mtls-certificates-B5AWTU6u.mjs +13 -0
- package/dist/network-DQ5Ridgy.mjs +50 -0
- package/dist/network-interconnects-ifU4JhGE.mjs +72 -0
- package/dist/o11y-CzssfRHt.mjs +93 -0
- package/dist/{oauth-n8um6MFk.mjs → oauth-BDdhqasa.mjs} +1 -1
- package/dist/oauth-BNTiErBG.mjs +4 -0
- package/dist/oauth-clients-gknNcBdV.mjs +16 -0
- package/dist/oauth-scopes-BJeSanuF.mjs +4 -0
- package/dist/organization-CXAM41sd.mjs +71 -0
- package/dist/organizations-kfFFW4uO.mjs +4 -0
- package/dist/origin-ca-certificates-DwhYV3m_.mjs +11 -0
- package/dist/origin-post-quantum-encryption-DfrnptJ1.mjs +6 -0
- package/dist/origin-tls-client-auth-COSxTc2q.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-ByrDMDBZ.mjs +39 -0
- package/dist/{pages-Bn0Sg1ay.mjs → pages-DuGcBC6k.mjs} +29 -29
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-B3_Gn9Cj.mjs +38 -0
- package/dist/pay-per-use-49EXt75f.mjs +33 -0
- package/dist/pipelines-Bvgh1BQZ.mjs +44 -0
- package/dist/precursor-VobQf--m.mjs +4 -0
- package/dist/previews-DkwFHNRx.mjs +7 -0
- package/dist/progress-R-1tIuep.mjs +2 -0
- package/dist/prompt-dgLm0iFJ.mjs +4 -0
- package/dist/queries-EbIadtC5.mjs +9 -0
- package/dist/queues-C4GZ-O3f.mjs +57 -0
- package/dist/r2-DEuFfWBR.mjs +128 -0
- package/dist/{radar-CdvQL4xm.mjs → radar-CDOERVcR.mjs} +150 -150
- package/dist/raw-fetch-BapeoreV.mjs +2 -0
- package/dist/realtime-D_A9Qgly.mjs +172 -0
- package/dist/registrar-X1YLlnmg.mjs +43 -0
- package/dist/registrar-sandbox-BF3cYO3n.mjs +56 -0
- package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-BWm9jIF8.mjs +14 -0
- package/dist/{request-headers-D8L95bEQ.mjs → request-headers-BRxv6NkA.mjs} +1 -1
- package/dist/request-tracers-CHWpiejG.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-C186jZv0.mjs +40 -0
- package/dist/resource-tagging-BTagOZli.mjs +4 -0
- package/dist/rules-DYnGIU_0.mjs +18 -0
- package/dist/rulesets-BcNrbVcq.mjs +37 -0
- package/dist/rum-BDyRecfp.mjs +30 -0
- package/dist/{run-CW2Cgi0S.mjs → run-BvDCuZ8q.mjs} +1 -1
- package/dist/run-roYb_Odh.mjs +2 -0
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-DcKjAxI1.mjs} +1 -1
- package/dist/scim-zn-CNCsc.mjs +18 -0
- package/dist/secrets-store-CFhyQUV6.mjs +24 -0
- package/dist/security-insights-D8XgtCed.mjs +40 -0
- package/dist/security-txt-CCM-Vro0.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-ouAF7o4S.mjs +2 -0
- package/dist/smart-shield-DwW7N92r.mjs +24 -0
- package/dist/snippets-B2jBY0m_.mjs +20 -0
- package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Cf_4cGE8.mjs} +16 -16
- package/dist/speed-DoXdyIYK.mjs +24 -0
- package/dist/sql-Bze4h80q.mjs +4 -0
- package/dist/src-BguQDHjS.mjs +125 -0
- package/dist/ssl-u_0gUhPA.mjs +45 -0
- package/dist/{startup-profile-CrtCP-6-.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-DIiIGEtR.mjs → state-Boubf1X6.mjs} +1 -1
- package/dist/state-CODDG9Nx.mjs +2 -0
- package/dist/stream-BcReYIHJ.mjs +102 -0
- package/dist/submit-ldFVNfNC.mjs +4 -0
- package/dist/{tags-CX23P4jg.mjs → tags-D_Hc_A-r.mjs} +2 -2
- package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-Cojgz4Sv.mjs} +1 -1
- package/dist/telemetry-Ct_2AaO4.mjs +2 -0
- package/dist/tenant-AZ0EAsmT.mjs +10 -0
- package/dist/tenant-custom-nameservers-aozjaasc.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/tunnels-CXez5LPB.mjs +29 -0
- package/dist/turnstile-B2NQ8Nsk.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/{update-check-HFkPml6x.mjs → update-check-BlyKN8m0.mjs} +1 -1
- package/dist/update-check-BnGDxswi.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-D_UqGiWD.mjs +4 -0
- package/dist/url-normalization-CF1YHpIN.mjs +9 -0
- package/dist/url-scanner-ChF3GO2U.mjs +16 -0
- package/dist/{user-rXca0J9M.mjs → user-BfWRsdJh.mjs} +58 -58
- package/dist/values-CLfxkAUJ.mjs +4 -0
- package/dist/vectorize-CRYbWKg5.mjs +32 -0
- package/dist/version-CVlh2Zaq.mjs +2 -0
- package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-Crp7MVd9.mjs} +25 -25
- package/dist/web-assets-CgyrPnT-.mjs +64 -0
- package/dist/web3-Cd0Yd0eQ.mjs +28 -0
- package/dist/workers-CTwJpTfJ.mjs +40 -0
- package/dist/workers-builds-f2nVw7EZ.mjs +14 -0
- package/dist/workers-for-platforms-DjeKp2uy.mjs +40 -0
- package/dist/workers-vpc-B_L3TEg2.mjs +13 -0
- package/dist/workflows-CBPGf65x.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-3VDxl0gF.mjs +22 -0
- package/dist/zero-trust-B9xY8zcn.mjs +957 -0
- package/dist/zone-CmwVqTI2.mjs +4 -0
- package/dist/zones-Bf0VVpMf.mjs +124 -0
- package/package.json +17 -19
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-CVv52Q2w.mjs +0 -24
- package/dist/account-tags-RhvWOkOf.mjs +0 -15
- package/dist/accounts--3lrEkmu.mjs +0 -125
- package/dist/acm-BJxINEcu.mjs +0 -15
- package/dist/addressing-BqByG9JW.mjs +0 -105
- package/dist/agent-memory-D4dQMGbh.mjs +0 -34
- package/dist/ai-CRkQ4pjC.mjs +0 -31
- package/dist/ai-audit-fMSn4c5L.mjs +0 -6
- package/dist/ai-gateway-CbhvQK4L.mjs +0 -80
- package/dist/ai-search-CvVSnOA0.mjs +0 -79
- package/dist/ai-security-Z_qpI92I.mjs +0 -10
- package/dist/alerting-CpbCB8br.mjs +0 -56
- package/dist/alerts-BSON-vFh.mjs +0 -2
- package/dist/analytics-DkY9dOP1.mjs +0 -17
- package/dist/analytics_engine-DE_jvlx_.mjs +0 -4
- package/dist/api-security-BHnOU5MM.mjs +0 -154
- package/dist/argo-DhC5L_aN.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-CrIupY7P.mjs +0 -43
- package/dist/audit-logs-BjeBxTox.mjs +0 -4
- package/dist/auth-BNYfOMl0.mjs +0 -2
- package/dist/auth-CAWalgW0.mjs +0 -2
- package/dist/auth-DOwC01PW.mjs +0 -2
- package/dist/autorag-kNrLiqDX.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-DZ7QV-_N.mjs +0 -46
- package/dist/billing-BFyte9fL.mjs +0 -23
- package/dist/bot-management-DXcbV3am.mjs +0 -9
- package/dist/botnet-feed-bGGp_cwX.mjs +0 -11
- package/dist/brand-protection-DN36XkxH.mjs +0 -27
- package/dist/brands-bBJgbbOH.mjs +0 -2
- package/dist/browser-extension-C1_fcw7h.mjs +0 -2
- package/dist/browser-run-hHD1RT43.mjs +0 -42
- package/dist/build-BhpWYgNm.mjs +0 -2
- package/dist/builds-6aO61R9R.mjs +0 -71
- package/dist/cache-C5YJpMqi.mjs +0 -45
- package/dist/certificate-authorities-CbqDAktQ.mjs +0 -6
- package/dist/cf-oRSQKirD.mjs +0 -18
- package/dist/chunk-NDZDTP46-Civns3WA.mjs +0 -361
- package/dist/clear-BW9vLgI3.mjs +0 -2
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-balaN_my.mjs +0 -13
- package/dist/client-side-security-3_4Ermmg.mjs +0 -63
- package/dist/cloud-connector-avx27sLw.mjs +0 -6
- package/dist/cloudforce-one-CXdeqJ9l.mjs +0 -405
- package/dist/command-DPX9sJVi.mjs +0 -2
- package/dist/command-OWe3v69l.mjs +0 -2
- package/dist/connector-interrupts-ftd10Du-.mjs +0 -6
- package/dist/connector-telemetry-events-TwDZYdEM.mjs +0 -6
- package/dist/connector-telemetry-events-latest-BQdOvbWh.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
- package/dist/connector-telemetry-snapshots-latest-CtdN_dGu.mjs +0 -2
- package/dist/connectors-6lVSr-fd.mjs +0 -15
- package/dist/containers-Dqs_ZnO2.mjs +0 -78
- package/dist/containers-ncw3bd3a.mjs +0 -376
- package/dist/content-scan-BWFbqfQ0.mjs +0 -14
- package/dist/csamScanner-BwZNZu0A.mjs +0 -10
- package/dist/ct-alerting-DPp3qLqO.mjs +0 -5
- package/dist/custom-certificates-pfpZcr06.mjs +0 -17
- package/dist/custom-csrs-DrvGRAkl.mjs +0 -11
- package/dist/custom-hostnames-wGtmFbz1.mjs +0 -27
- package/dist/custom-nameservers-HTG6MPKv.mjs +0 -9
- package/dist/custom-pages-DqEHBSVt.mjs +0 -21
- package/dist/dcv-delegation-D6nj0Z5N.mjs +0 -4
- package/dist/deploy-context-DmG9rgPO.mjs +0 -56
- package/dist/diagnostics-tqHjq-Pl.mjs +0 -15
- package/dist/dls-BEHj4X9T.mjs +0 -17
- package/dist/dns-firewall-zwbkutyf.mjs +0 -71
- package/dist/dns-n4mfYBZg.mjs +0 -144
- package/dist/domain-info-BkcBcyfF.mjs +0 -2
- package/dist/durable-objects-CQ2dHhho.mjs +0 -6
- package/dist/email-auth-DOi6yOt3.mjs +0 -6
- package/dist/email-routing-WcSPt22u.mjs +0 -45
- package/dist/email-security-BXu3OGay.mjs +0 -158
- package/dist/email-sending-B9zTlIjt.mjs +0 -47
- package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
- package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
- package/dist/errors-_sob7Ihu.mjs +0 -3
- package/dist/fieldExtractors-B37m2lKW.mjs +0 -9
- package/dist/firewall-CRtYO0Ha.mjs +0 -36
- package/dist/flagship-DvTFZSay.mjs +0 -28
- package/dist/fraud-uSyibsit.mjs +0 -22
- package/dist/google-tag-gateway-BFXiiokq.mjs +0 -6
- package/dist/health-CTaCeVyC.mjs +0 -2
- package/dist/healthchecks-27u7b7Jb.mjs +0 -22
- package/dist/hyperdrive-BzJvPdu6.mjs +0 -37
- package/dist/iam-Dl3cU9GI.mjs +0 -52
- package/dist/images-C2OkI1j7.mjs +0 -71
- package/dist/intel-DoB1g_K7.mjs +0 -76
- package/dist/internal-BYS7hO8c.mjs +0 -2
- package/dist/ips-BRt68epr.mjs +0 -4
- package/dist/k2-_eq5ZY2t.mjs +0 -11
- package/dist/keyless-certificates-DaO2yqYu.mjs +0 -13
- package/dist/keys-7BQ3Zq6Y.mjs +0 -4
- package/dist/kv-BTYCXKML.mjs +0 -15
- package/dist/leaked-credential-checks-CPHOK_dE.mjs +0 -18
- package/dist/live-BJE_YWE1.mjs +0 -2
- package/dist/local-BundUuDT.mjs +0 -2
- package/dist/login-BBYC_BtH.mjs +0 -2
- package/dist/login-D2uoWhWh.mjs +0 -5
- package/dist/logo-matches-Bc1DQ4-g.mjs +0 -6
- package/dist/logos-X5B8z7Iv.mjs +0 -7
- package/dist/logpush-C2ENi1et.mjs +0 -46
- package/dist/logs-BKDz7kBW.mjs +0 -36
- package/dist/magic-cloud-networking-B60Gld8A.mjs +0 -71
- package/dist/magic-network-monitoring-CxXI3Y-H.mjs +0 -36
- package/dist/magic-transit-ZCSaCbl8.mjs +0 -386
- package/dist/managed-defense-DrxMb7xi.mjs +0 -18
- package/dist/managed-transforms-AI7KrRU1.mjs +0 -9
- package/dist/matches-rPMLS3Ip.mjs +0 -6
- package/dist/mcp-DXUMvEWt.mjs +0 -32
- package/dist/mesh-MmBCQ37q.mjs +0 -26
- package/dist/monetization-DQE5VtUO.mjs +0 -20
- package/dist/mtls-certificates-DwkEb-Hy.mjs +0 -13
- package/dist/network-BcfobxQY.mjs +0 -50
- package/dist/network-interconnects-BU3tN_Ab.mjs +0 -72
- package/dist/o11y-BBv7nedp.mjs +0 -93
- package/dist/oauth-BUr8bPwo.mjs +0 -9
- package/dist/oauth-clients-qWVImhHE.mjs +0 -16
- package/dist/oauth-scopes-CdeIgJIx.mjs +0 -4
- package/dist/organization-CJeOVWH7.mjs +0 -71
- package/dist/organizations-BpfoqZcG.mjs +0 -4
- package/dist/origin-ca-certificates-Bimf07RF.mjs +0 -11
- package/dist/origin-post-quantum-encryption-CM-If38w.mjs +0 -6
- package/dist/origin-tls-client-auth-BPwYPhc9.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-DOeekMrj.mjs +0 -39
- package/dist/pay-per-crawl-qJpseNNx.mjs +0 -38
- package/dist/pay-per-use-C1MWKJ4O.mjs +0 -33
- package/dist/pipelines-rCwXQw6S.mjs +0 -44
- package/dist/precursor-Bk8Pp6jT.mjs +0 -4
- package/dist/previews-BEheHO3T.mjs +0 -4
- package/dist/progress-CQqDtgmF.mjs +0 -2
- package/dist/prompt-C8FyienX.mjs +0 -3
- package/dist/queries-DJ8looyq.mjs +0 -9
- package/dist/queues-BBH9Q-Tt.mjs +0 -57
- package/dist/r2-CdJKpP2w.mjs +0 -128
- package/dist/r2-data-catalog-BRo-Rx2I.mjs +0 -2
- package/dist/rate-limit-analytics-BiRyU0Xd.mjs +0 -2
- package/dist/rate-limits-Cr2zpncO.mjs +0 -2
- package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
- package/dist/ready-B3pLxnjc.mjs +0 -2
- package/dist/realtime-onrXppzh.mjs +0 -172
- package/dist/recent-submissions-JLOvuZq-.mjs +0 -2
- package/dist/refute-Dp3VodMn.mjs +0 -2
- package/dist/registrar-CbEBc5IE.mjs +0 -43
- package/dist/registrar-sandbox-BJhn1HFT.mjs +0 -56
- package/dist/reporting-bXZY6obP.mjs +0 -14
- package/dist/request-tracers-CihskC2A.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-DDqcCHVs.mjs +0 -40
- package/dist/resource-tagging-D63RpBce.mjs +0 -4
- package/dist/rules-CAW0-Wde.mjs +0 -18
- package/dist/rulesets-CPir63Qc.mjs +0 -37
- package/dist/rum-BfwTcuup.mjs +0 -30
- package/dist/run-DEynXvCc.mjs +0 -2
- package/dist/scan-logo-3Zr6CDJB.mjs +0 -2
- package/dist/scan-page-CxeudOzj.mjs +0 -2
- package/dist/scim-CtZ1FeQE.mjs +0 -18
- package/dist/search-B_P5ZTQj.mjs +0 -2
- package/dist/secrets-store-BIuBYUJT.mjs +0 -24
- package/dist/security-insights-DfUus0bs.mjs +0 -40
- package/dist/security-txt-CgZOsAIZ.mjs +0 -9
- package/dist/session-BcM8Vyyx.mjs +0 -2
- package/dist/shared-CpS23WwR.mjs +0 -2
- package/dist/signed-url-D5RwvrQq.mjs +0 -2
- package/dist/smart-shield-ClgB7r-9.mjs +0 -24
- package/dist/snippets-DLO3iFAg.mjs +0 -20
- package/dist/speed-DX5X2EIR.mjs +0 -24
- package/dist/sql-CF044HDW.mjs +0 -4
- package/dist/src-BMATTZU_.mjs +0 -125
- package/dist/ssl-CM-rChEC.mjs +0 -45
- package/dist/startup-profile-D662WI9s.mjs +0 -2
- package/dist/state-D7uNYnoi.mjs +0 -2
- package/dist/stream-5EmUOQvy.mjs +0 -102
- package/dist/submission-info-_t78q2OE.mjs +0 -2
- package/dist/submit-lEAaRSMR.mjs +0 -4
- package/dist/telemetry-0Y5hAtCX.mjs +0 -2
- package/dist/tenant-DnI7QziH.mjs +0 -10
- package/dist/tenant-custom-nameservers-MR0dlcGm.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/total-queries-CPrKEciQ.mjs +0 -2
- package/dist/tracked-domains-CTRItgFT.mjs +0 -2
- package/dist/tunnels-NzYpsfi_.mjs +0 -29
- package/dist/turnstile-M7sKCEz3.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-aTutXNRd.mjs +0 -2
- package/dist/url-info-Dos9VOXV.mjs +0 -4
- package/dist/url-normalization-CZbFOq_v.mjs +0 -9
- package/dist/url-scanner-B7quLPGW.mjs +0 -16
- package/dist/values-D-rrZrDa.mjs +0 -4
- package/dist/vectorize-D2tf_oA8.mjs +0 -32
- package/dist/verify-5KcvRk-q.mjs +0 -2
- package/dist/version-BGnqDvNR.mjs +0 -2
- package/dist/web-assets-DQAfvPT9.mjs +0 -64
- package/dist/web3-MI0GQDnu.mjs +0 -28
- package/dist/workers-By6Pf8fv.mjs +0 -40
- package/dist/workers-builds-6YsWsCmC.mjs +0 -14
- package/dist/workers-for-platforms-DL8fC1qR.mjs +0 -40
- package/dist/workers-vpc-BYx6sbgd.mjs +0 -13
- package/dist/workflows-ByQLnV0E.mjs +0 -52
- package/dist/zaraz-CgbpmA85.mjs +0 -22
- package/dist/zero-trust-CpjTkkWt.mjs +0 -837
- package/dist/zone-DnKIe6po.mjs +0 -4
- package/dist/zones--5ZzsDmQ.mjs +0 -124
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as a,r as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,i as u,n as d}from"./prompt-C8FyienX.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 organization account list
|
|
3
|
-
|
|
4
|
-
Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.read\` is required. User API Tokens are not currently supported.`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
|
|
5
|
-
a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
|
|
6
|
-
a particular string.`}).option(`account-pubname-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname ends with
|
|
7
|
-
a particular string.`}).option(`account-pubname-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname contains
|
|
8
|
-
a particular string.`}).option(`name`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name is equal to a
|
|
9
|
-
particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name starts with a
|
|
10
|
-
particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name ends with a particular
|
|
11
|
-
string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name contains a particular
|
|
12
|
-
string.`}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.\nWhen not specified, results are ordered by internal account ID.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-tags`,{type:`boolean`,description:`Include Account tags from the resource tag mirror. Omit this parameter to preserve the existing Account response shape.`}).option(`include-total`,{type:`boolean`,description:`Whether to calculate and return the exact result_info.total_size for cursor
|
|
13
|
-
pagination. Defaults to true. When false, total_size is omitted. page_size and
|
|
14
|
-
include_total may change between pages; next_page_token remains the authoritative
|
|
15
|
-
continuation signal.
|
|
16
|
-
Legacy page/per_page requests always calculate total_count.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
|
|
17
|
-
provided will retrieve the next page.
|
|
18
|
-
|
|
19
|
-
Parameters used to filter the retrieved list must remain in subsequent
|
|
20
|
-
requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List organization accounts`,builder:f(p),handler:async a=>i({command:`organization account list`,classification:{safeFlags:[`order-by`,`direction`,`include-tags`,`include-total`,`dry-run`]}},a,async()=>{let i={account_pubname:a[`account-pubname`],"account_pubname.startsWith":a[`account-pubname-starts-with`],"account_pubname.endsWith":a[`account-pubname-ends-with`],"account_pubname.contains":a[`account-pubname-contains`],name:a.name,"name.startsWith":a[`name-starts-with`],"name.endsWith":a[`name-ends-with`],"name.contains":a[`name-contains`],order_by:a[`order-by`],direction:a.direction,include_tags:a[`include-tags`],include_total:a[`include-total`],page_token:a[`page-token`],page_size:a[`page-size`]};if(a.dryRun){n({command:`cf organization account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/accounts`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organization.account.list({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})},h={command:`account`,describe:`Operations for account`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 organization create
|
|
21
|
-
|
|
22
|
-
Create a new organization for a user. Sub-organization creation availability depends on the organization's capabilities. Authentication: Use a Global API key, or a User API Token with the \`User Details Write\` permission.`).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`The parent.id field`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`References an Organization in the Cloudflare data model.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].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 --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].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 --profile-* flag is set`)}return!0})}const _={command:`create`,describe:`Create organization`,builder:g,handler:async o=>i({command:`organization create`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},bodyKind:`json`,body:o.body===void 0?s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body),n=await r(`Creating`,async()=>i.organization.create({...e}));t(n,{successLabel:`Created`});return}o.name===void 0&&(o.name=await l(`name`,`The name field`));let u=s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await r(`Creating`,async()=>i.organization.create({...u}));t(d,{successLabel:`Created`})})};function v(e){return e.usage(`$0 organization delete <organization-id>
|
|
23
|
-
|
|
24
|
-
Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. Sub-organization deletion availability depends on the organization's capabilities. **Access Control:** Restricted to enterprise organizations. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <organization-id>`,describe:`Delete organization`,builder:v,handler:async a=>i({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await d({force:!!a.force,message:`Delete this empty organization? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
25
|
-
`);return}let o=await r(`Deleting`,async()=>i.organization.delete({organization_id:a[`organization-id`]}));t(o,{successLabel:`Deleted`})})};function b(e){return e.usage("$0 organization get <organization-id>\n\nRetrieve the details of a certain organization. Authentication: A Global API key for a user with `com.cloudflare.api.tenant.unit.read` is required. User API Tokens are not currently supported and return HTTP `403` with error code `10000`.").positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <organization-id>`,describe:`Get organization`,builder:b,handler:async a=>i({command:`organization get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``)},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.organization.get({organization_id:a[`organization-id`]}));t(o,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 organization invite update <member-code>
|
|
26
|
-
|
|
27
|
-
Accept or reject an invitation to a specific organization. Authentication: A Global API key for the invited user is required. User API Tokens are not currently supported. No additional permission is required; the invitation must belong to the authenticated user.`).positional(`member-code`,{type:`string`,description:`The invitation code to accept or reject.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The ID of the organization associated with the invitation.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`accept`,`reject`]}).coerce(`status`,e=>c(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The invitation action. Use `accept` to join the organization or `reject` to decline the invitation."})}const C={command:`update <member-code>`,describe:`Handle organization invite`,builder:S,handler:async o=>i({command:`organization invite update`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization invite update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}/invites/${o[`member-code`]==null?`<member-code>`:encodeURIComponent(String(o[`member-code`]))}`,pathParams:{"organization-id":String(o[`organization-id`]??``),"member-code":String(o[`member-code`]??``)},bodyKind:`json`,body:o.body===void 0?s({status:o.status}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body),n=await r(`Updating`,async()=>i.organization.invite.update({...e,organization_id:o[`organization-id`],member_code:o[`member-code`]}));t(n,{successLabel:`Updated`});return}o.status===void 0&&(o.status=await u(`status`,`The status field`,[`accept`,`reject`]));let c=s({status:o.status}),l=await r(`Updating`,async()=>i.organization.invite.update({...c,organization_id:o[`organization-id`],member_code:o[`member-code`]}));t(l,{successLabel:`Updated`})})},w={command:`invite`,describe:`Operations for invite`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 organization list\n\nRetrieve a list of organizations a particular user has access to. Authentication: Use a Global API key, or a User API Token with the `User Details Read` or `User Details Write` permission.").option(`id`,{type:`string`,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
|
|
28
|
-
by repeating the query value.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of organizations to where the name is equal to a
|
|
29
|
-
particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name starts with a
|
|
30
|
-
particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name ends with a particular
|
|
31
|
-
string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name contains a particular
|
|
32
|
-
string.`}).option(`containing-account`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
|
|
33
|
-
account.`}).option(`containing-user`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
|
|
34
|
-
user.
|
|
35
|
-
|
|
36
|
-
IMPORTANT: Just because an organization "contains" a user is not a
|
|
37
|
-
representation of any authorization or privilege to manage any resources
|
|
38
|
-
therein. An organization "containing" a user simply means the user is managed by
|
|
39
|
-
that organization.`}).option(`containing-organization`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
|
|
40
|
-
organization.`}).option(`parent-id`,{type:`string`,description:`Filter the list of organizations to the ones that are a sub-organization
|
|
41
|
-
of the specified organization.
|
|
42
|
-
|
|
43
|
-
"null" is a valid value to provide for this parameter. It means "where
|
|
44
|
-
an organization has no parent (i.e. it is a 'root' organization)."`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
|
|
45
|
-
provided will retrieve the next page.
|
|
46
|
-
|
|
47
|
-
Parameters used to filter the retrieved list must remain in subsequent
|
|
48
|
-
requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List organizations the user has access to`,builder:f(T),handler:async a=>i({command:`organization list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={id:a.id,name:a.name,"name.startsWith":a[`name-starts-with`],"name.endsWith":a[`name-ends-with`],"name.contains":a[`name-contains`],"containing.account":a[`containing-account`],"containing.user":a[`containing-user`],"containing.organization":a[`containing-organization`],"parent.id":a[`parent-id`],page_token:a[`page-token`],page_size:a[`page-size`]};if(a.dryRun){n({command:`cf organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organization.list(i));t(s,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 organization member batch create <organization-id>
|
|
49
|
-
|
|
50
|
-
Batch create multiple memberships that grant access to a specific Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.create\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`members`,{type:`string`,description:`The members field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`create <organization-id>`,describe:`Batch create organization members`,builder:D,handler:async c=>i({command:`organization member batch create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){n({command:`cf organization member batch create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${c[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(c[`organization-id`]))}/members:batchCreate`,pathParams:{"organization-id":String(c[`organization-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({members:o(c.members,`members`)}):a(c.body)});return}let i=await e(c);if(c.body){let e=a(c.body),n=await r(`Creating`,async()=>i.organization.member.batch.create({...e,organization_id:c[`organization-id`]}));t(n,{successLabel:`Created`});return}if(c.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let l=s({members:o(c.members,`members`)}),u=await r(`Creating`,async()=>i.organization.member.batch.create({...l,organization_id:c[`organization-id`]}));t(u,{successLabel:`Created`})})},k={command:`batch`,describe:`Operations for member.batch`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 organization member create <organization-id>
|
|
51
|
-
|
|
52
|
-
Create a membership that grants access to a specific Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.create\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`member-status`,{type:`string`,description:`The member.status field`,choices:[`active`,`canceled`]}).coerce(`member-status`,e=>c(e,`member-status`,`text`)).option(`member-user-email`,{type:`string`,description:`The member.user.email 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 j={command:`create <organization-id>`,describe:`Create organization member`,builder:A,handler:async o=>i({command:`organization member create`,classification:{safeFlags:[`member-status`,`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization member create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}/members`,pathParams:{"organization-id":String(o[`organization-id`]??``)},bodyKind:`json`,body:o.body===void 0?s({member:{status:o[`member-status`],user:{email:c(o[`member-user-email`],`member-user-email`,`text`)}}}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body),n=await r(`Creating`,async()=>i.organization.member.create({...e,organization_id:o[`organization-id`]}));t(n,{successLabel:`Created`});return}o[`member-user-email`]===void 0&&(o[`member-user-email`]=await l(`member-user-email`,`The member.user.email field`));let u=s({member:{status:o[`member-status`],user:{email:c(o[`member-user-email`],`member-user-email`,`text`)}}}),d=await r(`Creating`,async()=>i.organization.member.create({...u,organization_id:o[`organization-id`]}));t(d,{successLabel:`Created`})})};function M(e){return e.usage(`$0 organization member delete <member-id>
|
|
53
|
-
|
|
54
|
-
Delete a membership to a particular Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.delete\` is required. User API Tokens are not currently supported.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const N={command:`delete <member-id>`,describe:`Delete organization member`,builder:M,handler:async a=>i({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/members/${a[`member-id`]==null?`<member-id>`:encodeURIComponent(String(a[`member-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``),"member-id":String(a[`member-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await d({force:!!a.force,message:`Delete this organization membership? The member will lose access to this organization and its sub-organizations.`})){process.stderr.write(`Aborted.
|
|
55
|
-
`);return}let o=await r(`Deleting`,async()=>i.organization.member.delete({organization_id:a[`organization-id`],member_id:a[`member-id`]}));t(o,{successLabel:`Deleted`})})};function P(e){return e.usage(`$0 organization member get <member-id>
|
|
56
|
-
|
|
57
|
-
Retrieve a single membership from an Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.read\` is required. User API Tokens are not currently supported.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <member-id>`,describe:`Get organization member`,builder:P,handler:async a=>i({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/members/${a[`member-id`]==null?`<member-id>`:encodeURIComponent(String(a[`member-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``),"member-id":String(a[`member-id`]??``)},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.organization.member.get({organization_id:a[`organization-id`],member_id:a[`member-id`]}));t(o,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 organization member list
|
|
58
|
-
|
|
59
|
-
List memberships for an Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.list\` is required. User API Tokens are not currently supported.`).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
|
|
60
|
-
provided will retrieve the next page.
|
|
61
|
-
|
|
62
|
-
Parameters used to filter the retrieved list must remain in subsequent
|
|
63
|
-
requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List organization members`,builder:f(I),handler:async a=>i({command:`organization member list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={status:a.status,"user.email":a[`user-email`],"user.email.contains":a[`user-email-contains`],"user.email.startsWith":a[`user-email-starts-with`],"user.email.endsWith":a[`user-email-ends-with`],page_token:a[`page-token`],page_size:a[`page-size`]};if(a.dryRun){n({command:`cf organization member list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/members`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organization.member.list({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})},R={command:`member`,describe:`Operations for member`,builder:e=>e.command(j).command(N).command(F).command(L).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 organization profile get <organization-id>
|
|
64
|
-
|
|
65
|
-
Get an organizations profile if it exists. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.read\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a profile for.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <organization-id>`,describe:`Get organization profile`,builder:z,handler:async a=>i({command:`organization profile get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf organization profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/profile`,pathParams:{"organization-id":String(a[`organization-id`]??``)},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.organization.profile.get({organization_id:a[`organization-id`]}));t(o,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 organization profile update <organization-id>
|
|
66
|
-
|
|
67
|
-
Modify organization profile. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).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 H={command:`update <organization-id>`,describe:`Modify organization profile.`,builder:V,handler:async o=>i({command:`organization profile update`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}/profile`,pathParams:{"organization-id":String(o[`organization-id`]??``)},bodyKind:`json`,body:o.body===void 0?s({business_address:c(o[`business-address`],`business-address`,`text`),business_email:c(o[`business-email`],`business-email`,`text`),business_name:c(o[`business-name`],`business-name`,`text`),business_phone:c(o[`business-phone`],`business-phone`,`text`),external_metadata:c(o[`external-metadata`],`external-metadata`,`text`)}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body),n=await r(`Updating`,async()=>i.organization.profile.update({...e,organization_id:o[`organization-id`]}));t(n,{successLabel:`Updated`});return}o[`business-address`]===void 0&&(o[`business-address`]=await l(`business-address`,`The business_address field`)),o[`business-email`]===void 0&&(o[`business-email`]=await l(`business-email`,`The business_email field`)),o[`business-name`]===void 0&&(o[`business-name`]=await l(`business-name`,`The business_name field`)),o[`business-phone`]===void 0&&(o[`business-phone`]=await l(`business-phone`,`The business_phone field`)),o[`external-metadata`]===void 0&&(o[`external-metadata`]=await l(`external-metadata`,`The external_metadata field`));let u=s({business_address:c(o[`business-address`],`business-address`,`text`),business_email:c(o[`business-email`],`business-email`,`text`),business_name:c(o[`business-name`],`business-name`,`text`),business_phone:c(o[`business-phone`],`business-phone`,`text`),external_metadata:c(o[`external-metadata`],`external-metadata`,`text`)}),d=await r(`Updating`,async()=>i.organization.profile.update({...u,organization_id:o[`organization-id`]}));t(d,{successLabel:`Updated`})})},U={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 organization share list
|
|
68
|
-
|
|
69
|
-
Lists all organization shares.`).option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List organization shares`,builder:f(W),handler:async a=>i({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},a,async()=>{let i={status:a.status,kind:a.kind,target_type:a[`target-type`],resource_types:a[`resource-types`],order:a.order,direction:a.direction,page:a.page,per_page:a[`per-page`]};if(a.dryRun){n({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/shares`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organization.share.list({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})},K={command:`share`,describe:`Operations for share`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 organization update <organization-id>
|
|
70
|
-
|
|
71
|
-
Update an organization's name. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to modify.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`The parent.id field`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new details of the organization. Only accepts updates to "name" currently.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].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 --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].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 --profile-* flag is set`)}return!0})}const J={command:`update <organization-id>`,describe:`Update organization`,builder:q,handler:async o=>i({command:`organization update`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}`,pathParams:{"organization-id":String(o[`organization-id`]??``)},bodyKind:`json`,body:o.body===void 0?s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body),n=await r(`Updating`,async()=>i.organization.update({body:e,organization_id:o[`organization-id`]}));t(n,{successLabel:`Updated`});return}o.name===void 0&&(o.name=await l(`name`,`The name field`));let u=s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await r(`Updating`,async()=>i.organization.update({body:u,organization_id:o[`organization-id`]}));t(d,{successLabel:`Updated`})})},Y={command:`organization`,describe:`organization`,builder:e=>e.command(_).command(y).command(x).command(E).command(J).command(h).command(w).command(R).command(U).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{t as a}from"./cli-types-9oYmRTHJ.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. Rated costs are available per account via `POST /accounts/{account_id}/billable/usage` with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
|
|
3
|
-
|
|
4
|
-
Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:a(u),handler:async a=>i({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_result:a[`action-result`],action_type:a[`action-type`],actor_context:a[`actor-context`],actor_email:a[`actor-email`],actor_id:a[`actor-id`],actor_ip_address:a[`actor-ip-address`],actor_token_id:a[`actor-token-id`],actor_token_name:a[`actor-token-name`],actor_type:a[`actor-type`],id:a.id,raw_cf_ray_id:a[`raw-cf-ray-id`],raw_method:a[`raw-method`],raw_status_code:a[`raw-status-code`],raw_uri:a[`raw-uri`],resource_id:a[`resource-id`],resource_product:a[`resource-product`],resource_type:a[`resource-type`],resource_scope:a[`resource-scope`],"action_result.not":a[`action-result-not`],"action_type.not":a[`action-type-not`],"actor_context.not":a[`actor-context-not`],"actor_email.not":a[`actor-email-not`],"actor_id.not":a[`actor-id-not`],"actor_ip_address.not":a[`actor-ip-address-not`],"actor_token_id.not":a[`actor-token-id-not`],"actor_token_name.not":a[`actor-token-name-not`],"actor_type.not":a[`actor-type-not`],"id.not":a[`id-not`],"raw_cf_ray_id.not":a[`raw-cf-ray-id-not`],"raw_method.not":a[`raw-method-not`],"raw_status_code.not":a[`raw-status-code-not`],"raw_uri.not":a[`raw-uri-not`],"resource_id.not":a[`resource-id-not`],"resource_product.not":a[`resource-product-not`],"resource_type.not":a[`resource-type-not`],"resource_scope.not":a[`resource-scope-not`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.logs.audit.get({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})};function f(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:a(f),handler:async a=>i({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_time:a[`action-time`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit/${a.id==null?`<id>`:encodeURIComponent(String(a.id))}/history`,pathParams:{"organization-id":String(a[`organization-id`]??``),id:String(a.id??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.logs.audit.history({organization_id:a[`organization-id`],id:a.id,...i}));t(s,{successLabel:`Loaded`})})},m={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(l).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,i as l,n as u}from"./prompt-C8FyienX.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
|
|
3
|
-
|
|
4
|
-
Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).coerce(`request-type`,e=>s(e,`request-type`,`text`)).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).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 p={command:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:u[`request-type`],requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body),n=await r(`Creating`,async()=>i.originCaCertificates.create({...e}));t(n,{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:u[`request-type`],requested_validity:u[`requested-validity`]}),f=await r(`Creating`,async()=>i.originCaCertificates.create({...d}));t(f,{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
|
|
5
|
-
|
|
6
|
-
Revoke an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).positional(`certificate-id`,{type:`string`,description:`The x509 serial number of the Origin CA certificate.`,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 h={command:`delete <certificate-id>`,describe:`Revoke Certificate`,builder:m,handler:async a=>i({command:`origin-ca-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf origin-ca-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"certificate-id":String(a[`certificate-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await u({force:!!a.force})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}let o=await r(`Deleting`,async()=>i.originCaCertificates.delete({certificate_id:a[`certificate-id`]}));t(o,{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 origin-ca-certificates get <certificate-id>
|
|
8
|
-
|
|
9
|
-
Get an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).positional(`certificate-id`,{type:`string`,description:`The x509 serial number of the Origin CA certificate.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <certificate-id>`,describe:`Get Certificate`,builder:g,handler:async a=>i({command:`origin-ca-certificates get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf origin-ca-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"certificate-id":String(a[`certificate-id`]??``)},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.originCaCertificates.get({certificate_id:a[`certificate-id`]}));t(o,{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 origin-ca-certificates list
|
|
10
|
-
|
|
11
|
-
List all existing Origin CA certificates for a given zone. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`zone-id`,{type:`string`,description:`Identifier.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List Certificates`,builder:d(v),handler:async a=>i({command:`origin-ca-certificates list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={zone_id:a[`zone-id`],page:a.page,per_page:a[`per-page`],limit:a.limit,offset:a.offset};if(a.dryRun){n({command:`cf origin-ca-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.originCaCertificates.list(i));t(s,{successLabel:`Loaded`})})},b={command:`origin-ca-certificates`,describe:`origin-ca-certificates`,builder:e=>e.command(p).command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{i as l}from"./prompt-C8FyienX.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
|
|
3
|
-
|
|
4
|
-
Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 origin-post-quantum-encryption update
|
|
5
|
-
|
|
6
|
-
Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`value`,{type:`string`,description:`Value of the Origin Post Quantum Encryption Setting.`,choices:[`preferred`,`supported`,`off`]}).coerce(`value`,e=>c(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Change Origin Post-Quantum Encryption setting`,builder:f,handler:async c=>a({command:`origin-post-quantum-encryption update`,classification:{safeFlags:[`value`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf origin-post-quantum-encryption update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({value:c.value}):o(c.body)});return}let a=await e(c),u=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...e,zone_id:u}));n(t,{successLabel:`Updated`});return}c.value===void 0&&(c.value=await l(`value`,`Value of the Origin Post Quantum Encryption Setting.`,[`preferred`,`supported`,`off`]));let d=s({value:c.value}),f=await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...d,zone_id:u}));n(f,{successLabel:`Updated`})})},m={command:`origin-post-quantum-encryption`,describe:`Enable post-quantum key exchange for connections between Cloudflare and your origin server`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-C8FyienX.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
|
|
3
|
-
|
|
4
|
-
List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List Hostname Associations`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
|
|
5
|
-
|
|
6
|
-
Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed.`).option(`certificate`,{type:`string`,description:`The hostname certificate.`}).option(`private-key`,{type:`string`,description:`The hostname certificate's private key.`}).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 _={command:`create`,describe:`Upload a Hostname Client Certificate`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body),sensitiveBodyPaths:[[`private_key`]]});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
|
|
7
|
-
|
|
8
|
-
Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with \`enabled\` set to null. After invalidating the association, the certificate can be safely deleted.`).positional(`certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <certificate-id>`,describe:`Delete Hostname Client Certificate`,builder:v,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
|
|
9
|
-
`);return}let c=await i(`Deleting`,async()=>a.originTlsClientAuth.hostnameCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates get <certificate-id>
|
|
10
|
-
|
|
11
|
-
Get the certificate by ID to be used for client authentication on a hostname.`).positional(`certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <certificate-id>`,describe:`Get the Hostname Client Certificate`,builder:b,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originTlsClientAuth.hostnameCertificates.get({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates list
|
|
12
|
-
|
|
13
|
-
Lists all client certificates configured for per-hostname authenticated origin pulls on the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Certificates`,builder:S,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originTlsClientAuth.hostnameCertificates.list({zone_id:s}));n(c,{successLabel:`Loaded`})})},w={command:`hostname-certificates`,describe:`Operations for hostname-certificates`,builder:e=>e.command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 origin-tls-client-auth hostnames get <hostname>
|
|
14
|
-
|
|
15
|
-
Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled.`).positional(`hostname`,{type:`string`,description:`The hostname on the origin for which the client certificate uploaded will be used.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <hostname>`,describe:`Get the Hostname Status for Client Authentication`,builder:T,handler:async o=>a({command:`origin-tls-client-auth hostnames get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/${o.hostname==null?`<hostname>`:encodeURIComponent(String(o.hostname))}`,pathParams:{hostname:String(o.hostname??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originTlsClientAuth.hostnames.get({zone_id:s,hostname:o.hostname}));n(c,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 origin-tls-client-auth hostnames update
|
|
16
|
-
|
|
17
|
-
Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter *enabled* to invalidate the association.`).option(`config`,{type:`string`,description:`The config field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`update`,describe:`Enable or Disable a Hostname for Client Authentication`,builder:D,handler:async l=>a({command:`origin-tls-client-auth hostnames update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf origin-tls-client-auth hostnames update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({config:s(l.config,`config`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.originTlsClientAuth.hostnames.update({...e,zone_id:u}));n(t,{successLabel:`Updated`});return}if(l.config===void 0)throw Error(`--config is required (or pass --body with this field set).`);let d=c({config:s(l.config,`config`)}),f=await i(`Updating`,async()=>a.originTlsClientAuth.hostnames.update({...d,zone_id:u}));n(f,{successLabel:`Updated`})})},k={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 origin-tls-client-auth settings get
|
|
18
|
-
|
|
19
|
-
Get whether zone-level authenticated origin pulls is enabled or not. It is false by default.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Get Enablement Setting for Zone`,builder:A,handler:async o=>a({command:`origin-tls-client-auth settings get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originTlsClientAuth.settings.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 origin-tls-client-auth settings update
|
|
20
|
-
|
|
21
|
-
Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use.`).option(`enabled`,{type:`boolean`,description:`Indicates whether zone-level authenticated origin pulls is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update`,describe:`Set Enablement for Zone`,builder:M,handler:async s=>a({command:`origin-tls-client-auth settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({enabled:s.enabled}):o(s.body)});return}let a=await e(s),l=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...e,zone_id:l}));n(t,{successLabel:`Updated`});return}if(s.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=c({enabled:s.enabled}),d=await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...u,zone_id:l}));n(d,{successLabel:`Updated`})})},P={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 origin-tls-client-auth zone-certificates create
|
|
22
|
-
|
|
23
|
-
Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use.`).option(`certificate`,{type:`string`,description:`The zone's leaf certificate.`}).option(`private-key`,{type:`string`,description:`The zone's private key.`}).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 I={command:`create`,describe:`Upload Certificate`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body),sensitiveBodyPaths:[[`private_key`]]});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function L(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
|
|
24
|
-
|
|
25
|
-
Removes a client certificate used for zone-level authenticated origin pulls.`).positional(`certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const R={command:`delete <certificate-id>`,describe:`Delete Certificate`,builder:L,handler:async o=>a({command:`origin-tls-client-auth zone-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
|
|
26
|
-
`);return}let c=await i(`Deleting`,async()=>a.originTlsClientAuth.zoneCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 origin-tls-client-auth zone-certificates get <certificate-id>
|
|
27
|
-
|
|
28
|
-
Retrieves details for a specific client certificate used in zone-level authenticated origin pulls.`).positional(`certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <certificate-id>`,describe:`Get Certificate Details`,builder:z,handler:async o=>a({command:`origin-tls-client-auth zone-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originTlsClientAuth.zoneCertificates.get({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 origin-tls-client-auth zone-certificates list
|
|
29
|
-
|
|
30
|
-
Lists all client certificates configured for zone-level authenticated origin pulls.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List Certificates`,builder:V,handler:async o=>a({command:`origin-tls-client-auth zone-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originTlsClientAuth.zoneCertificates.list({zone_id:s}));n(c,{successLabel:`Loaded`})})},U={command:`zone-certificates`,describe:`Operations for zone-certificates`,builder:e=>e.command(I).command(R).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`origin-tls-client-auth`,describe:`origin-tls-client-auth`,builder:e=>e.command(h).command(w).command(k).command(P).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{W as default};
|
package/dist/output-BOe-3AQG.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e,t}from"./theme-CQ_TYifs.mjs";import{n}from"./interactive-BW9T1D1q.mjs";import{t as r}from"./Page-BShsqCXr.mjs";function i(e){return e instanceof r?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function a(t,n={}){if(!n.quiet){if(t=i(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(o(t))}}function o(r){let i=JSON.stringify(r,null,2);return n()||!t()||i.length>5e4?i:i.replace(/"((?:[^"\\]|\\.)*)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "((?:[^"\\]|\\.)*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{a as t};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-C8FyienX.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 page-rules create
|
|
3
|
-
|
|
4
|
-
Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
5
|
-
request. Actions can redirect to another URL or override settings, but
|
|
6
|
-
not both.
|
|
7
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
|
|
8
|
-
over another. A higher number indicates a higher priority. For example,
|
|
9
|
-
if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
|
|
10
|
-
specific Page Rule to take precedence (rule B: \`/images/special/*\`),
|
|
11
|
-
specify a higher priority for rule B so it overrides rule A.
|
|
12
|
-
`,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).coerce(`status`,e=>l(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create a Page Rule`,builder:f,handler:async l=>a({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Creating`,async()=>a.pageRules.create({...e,zone_id:u}));n(t,{successLabel:`Created`});return}if(l.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(l.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}),f=await i(`Creating`,async()=>a.pageRules.create({...d,zone_id:u}));n(f,{successLabel:`Created`})})};function m(e){return e.usage(`$0 page-rules delete <pagerule-id>
|
|
13
|
-
|
|
14
|
-
Deletes an existing Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`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 h={command:`delete <pagerule-id>`,describe:`Delete a Page Rule`,builder:m,handler:async o=>a({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
15
|
-
`);return}let c=await i(`Deleting`,async()=>a.pageRules.delete({zone_id:s,pagerule_id:o[`pagerule-id`]}));n(c,{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 page-rules edit <pagerule-id>
|
|
16
|
-
|
|
17
|
-
Updates one or more fields of an existing Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
18
|
-
request. Actions can redirect to another URL or override settings, but
|
|
19
|
-
not both.
|
|
20
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
|
|
21
|
-
over another. A higher number indicates a higher priority. For example,
|
|
22
|
-
if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
|
|
23
|
-
specific Page Rule to take precedence (rule B: \`/images/special/*\`),
|
|
24
|
-
specify a higher priority for rule B so it overrides rule A.
|
|
25
|
-
`}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`edit <pagerule-id>`,describe:`Edit a Page Rule`,builder:g,handler:async l=>a({command:`page-rules edit`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf page-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/pagerules/${l[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(l[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(l[`pagerule-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.pageRules.edit({...e,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(t,{successLabel:`Updated`});return}let d=c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}),f=await i(`Updating`,async()=>a.pageRules.edit({...d,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(f,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 page-rules get <pagerule-id>
|
|
26
|
-
|
|
27
|
-
Fetches the details of a Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <pagerule-id>`,describe:`Get a Page Rule`,builder:v,handler:async o=>a({command:`page-rules get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf page-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.pageRules.get({zone_id:s,pagerule_id:o[`pagerule-id`]}));n(c,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 page-rules list
|
|
28
|
-
|
|
29
|
-
Fetches Page Rules in a zone.`).option(`order`,{type:`string`,description:`The field used to sort returned Page Rules.`,choices:[`status`,`priority`]}).option(`direction`,{type:`string`,description:`The direction used to sort returned Page Rules.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:"When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Page Rules`,builder:d(b),handler:async o=>a({command:`page-rules list`,classification:{safeFlags:[`order`,`direction`,`match`,`status`,`dry-run`]}},o,async()=>{let a={order:o.order,direction:o.direction,match:o.match,status:o.status};if(o.dryRun){r({command:`cf page-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.pageRules.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 page-rules update <pagerule-id>
|
|
30
|
-
|
|
31
|
-
Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
32
|
-
request. Actions can redirect to another URL or override settings, but
|
|
33
|
-
not both.
|
|
34
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
|
|
35
|
-
over another. A higher number indicates a higher priority. For example,
|
|
36
|
-
if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
|
|
37
|
-
specific Page Rule to take precedence (rule B: \`/images/special/*\`),
|
|
38
|
-
specify a higher priority for rule B so it overrides rule A.
|
|
39
|
-
`}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <pagerule-id>`,describe:`Update a Page Rule`,builder:S,handler:async l=>a({command:`page-rules update`,classification:{safeFlags:[`status`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf page-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/pagerules/${l[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(l[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(l[`pagerule-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.pageRules.update({...e,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(t,{successLabel:`Updated`});return}if(l.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(l.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=c({actions:s(l.actions,`actions`),priority:l.priority,status:l.status,targets:s(l.targets,`targets`)}),f=await i(`Updating`,async()=>a.pageRules.update({...d,zone_id:u,pagerule_id:l[`pagerule-id`]}));n(f,{successLabel:`Updated`})})},w={command:`page-rules`,describe:`page-rules`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./prompt-C8FyienX.mjs";import{t as p}from"./cli-types-9oYmRTHJ.mjs";function m(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
|
-
|
|
4
|
-
Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const h={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:m,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.payPerCrawl.config.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Creating`,async()=>n.payPerCrawl.config.create({...c,zone_id:i}));a(u,{successLabel:`Created`})})};function g(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
|
-
|
|
6
|
-
Changes the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const _={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:g,handler:async e=>c({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:c,zone_id:i}));a(u,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 pay-per-crawl config get
|
|
7
|
-
|
|
8
|
-
Gets the pay-per-crawl config for a zone including the bot configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get the pay-per-crawl config`,builder:v,handler:async e=>c({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.config.get({zone_id:i}));a(c,{successLabel:`Loaded`})})},b={command:`config`,describe:`Operations for config`,builder:e=>e.command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 pay-per-crawl crawler stripe create
|
|
9
|
-
|
|
10
|
-
Creates the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create`,describe:`Creates the stripe config for a crawler`,builder:x,handler:async r=>c({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.crawler.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function C(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
|
|
11
|
-
|
|
12
|
-
Deletes the stripe config for a crawler.`).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 w={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:C,handler:async r=>c({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
13
|
-
`);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.crawler.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 pay-per-crawl crawler stripe get
|
|
14
|
-
|
|
15
|
-
Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get`,describe:`Gets the stripe config for a crawler`,builder:T,handler:async r=>c({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawler.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},D={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 pay-per-crawl crawlers list
|
|
16
|
-
|
|
17
|
-
Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List pay-per-crawl crawlers`,builder:k,handler:async r=>c({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawlers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawlers`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawlers.list({account_id:l}));a(u,{successLabel:`Loaded`})})},j={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 pay-per-crawl publisher stripe create
|
|
18
|
-
|
|
19
|
-
Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`create`,describe:`Creates the stripe config for a publisher`,builder:M,handler:async r=>c({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.publisher.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function P(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
|
|
20
|
-
|
|
21
|
-
Deletes the stripe config for a publisher.`).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 F={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:P,handler:async r=>c({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
22
|
-
`);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.publisher.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function ee(e){return e.usage(`$0 pay-per-crawl publisher stripe get
|
|
23
|
-
|
|
24
|
-
Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Gets the stripe config for a publisher`,builder:ee,handler:async r=>c({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.publisher.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},L={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(N).command(F).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
|
|
25
|
-
|
|
26
|
-
Gets a download link for the account's signed pay-per-crawl terms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:z,handler:async r=>c({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get-signature-link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/signature_link`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.getSignatureLink({account_id:l}));a(u,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 pay-per-crawl terms get-signature
|
|
27
|
-
|
|
28
|
-
Gets the account's pay-per-crawl terms signature status.`).option(`remote`,{type:`boolean`,description:`Refresh the signature status from Ironclad.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:V,handler:async r=>c({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`remote`,`dry-run`]}},r,async()=>{let c={remote:r.remote};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get-signature`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.payPerCrawl.terms.getSignature({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 pay-per-crawl terms get
|
|
29
|
-
|
|
30
|
-
Gets the pay-per-crawl terms and conditions contract.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:`Get pay-per-crawl terms`,builder:U,handler:async r=>c({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 pay-per-crawl terms send-signature-event
|
|
31
|
-
|
|
32
|
-
Records that an account displayed or agreed to the pay-per-crawl terms.`).option(`event-type`,{type:`string`,description:`The terms activity to record.`,choices:[`agreed`,`displayed`],demandOption:!0}).option(`vid`,{type:`string`,description:`Ironclad contract version ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:p(G),handler:async r=>c({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},r,async()=>{let c={event_type:r[`event-type`],vid:r.vid};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms send-signature-event`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Creating`,async()=>l.payPerCrawl.terms.sendSignatureEvent({account_id:u,...c}));a(d,{successLabel:`Created`})})},q={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(W).command(H).command(B).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 pay-per-crawl zones get-can-be-enabled
|
|
33
|
-
|
|
34
|
-
Gets whether pay-per-crawl can be enabled for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:J,handler:async e=>c({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.zones.getCanBeEnabled({zone_id:i}));a(c,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 pay-per-crawl zones query-can-be-enabled
|
|
35
|
-
|
|
36
|
-
Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not.`).option(`zones`,{type:`string`,array:!0,description:`The zones field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Zone IDs to check for pay-per-crawl eligibility`})}const Z={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:X,handler:async r=>c({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:r.zones}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...e,account_id:u}));a(t,{successLabel:`Created`});return}let f=d({zones:r.zones}),p=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...f,account_id:u}));a(p,{successLabel:`Created`})})};function Q(e){return e.usage(`$0 pay-per-crawl zones set-can-be-enabled
|
|
37
|
-
|
|
38
|
-
Allows an account admin to set the can_be_enabled setting on a list of zones. An omitted can_be_enabled value leaves that zone unchanged.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const $={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:Q,handler:async r=>c({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:u(r.zones,`zones`)}):l(r.body)});return}let c=await t(r),f=r.local?e:await i();if(r.accountId=f,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...e,account_id:f}));a(t,{successLabel:`Updated`});return}if(r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(r.zones,`zones`)}),m=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...p,account_id:f}));a(m,{successLabel:`Updated`})})},te={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(Y).command(Z).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ne={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(b).command(O).command(j).command(R).command(q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ne as default};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C8FyienX.mjs";function v(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
3
|
-
|
|
4
|
-
Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List enabled Pay Per Use domains`,builder:v,handler:async t=>l({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},b={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
|
|
5
|
-
|
|
6
|
-
Gets the pay-per-use operator configuration for an account, including its read-only non-billable classification timestamp.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get-configuration`,describe:`Get pay-per-use operator configuration`,builder:x,handler:async t=>l({command:`pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.payPerUse.operator.getConfiguration({account_id:l}));o(u,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 pay-per-use operator set-configuration
|
|
7
|
-
|
|
8
|
-
Creates or updates the pay-per-use operator configuration for an account. Creating an enabled configuration or re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration`})}const w={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:C,handler:async t=>l({command:`pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator set-configuration`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.operator.setConfiguration({body:e,account_id:l}));o(n,{successLabel:`Updated`});return}if(t[`default-price-usd-microcents`]===void 0)throw Error(`--default-price-usd-microcents is required (or pass --body with this field set).`);if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`The name field`));let d=f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.payPerUse.operator.setConfiguration({body:d,account_id:l}));o(m,{successLabel:`Updated`})})};function T(e){return e.usage(`$0 pay-per-use operator update-configuration
|
|
9
|
-
|
|
10
|
-
Updates one or more fields of an existing pay-per-use operator configuration. Re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration update`})}const E={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:T,handler:async t=>l({command:`pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.operator.updateConfiguration({...e,account_id:l}));o(n,{successLabel:`Updated`});return}let d=f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.payPerUse.operator.updateConfiguration({...d,account_id:l}));o(m,{successLabel:`Updated`})})},D={command:`operator`,describe:`Operations for operator`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 pay-per-use pricing list-operators
|
|
11
|
-
|
|
12
|
-
Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list-operators`,describe:`List pay-per-use operators`,builder:O,handler:async e=>l({command:`pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){s({command:`cf pay-per-use pricing list-operators`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.payPerUse.pricing.listOperators({zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 pay-per-use pricing opt-out-operator-price <operator-id>
|
|
13
|
-
|
|
14
|
-
Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator 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 j={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:A,handler:async e=>l({command:`pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use pricing opt-out-operator-price`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
15
|
-
`);return}let a=await c(`Deleting`,async()=>t.payPerUse.pricing.optOutOperatorPrice({zone_id:r,operator_id:e[`operator-id`]}));o(a,{successLabel:`Deleted`})})};function M(e){return e.usage(`$0 pay-per-use pricing set-operator-price <operator-id>
|
|
16
|
-
|
|
17
|
-
Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).coerce(`action`,e=>p(e,`action`,`text`)).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const ee={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:M,handler:async e=>l({command:`pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use pricing set-operator-price`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.payPerUse.pricing.setOperatorPrice({body:n,zone_id:r,operator_id:e[`operator-id`]}));o(i,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`action`,`The action field`,[`propose`,`withdraw`,`accept_default`,`resume`])),e.action===`propose`&&e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let a=f({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}),l=await c(`Creating`,async()=>t.payPerUse.pricing.setOperatorPrice({body:a,zone_id:r,operator_id:e[`operator-id`]}));o(l,{successLabel:`Created`})})},N={command:`pricing`,describe:`Operations for pricing`,builder:e=>e.command(k).command(j).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 pay-per-use proposals decide
|
|
18
|
-
|
|
19
|
-
Accepts or rejects the pending pay-per-use price proposal identified by price_id in the request body. Acceptance requires an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications; rejection remains available for cleanup.`).option(`action`,{type:`string`,description:`The action field`,choices:[`accept`,`reject`]}).coerce(`action`,e=>p(e,`action`,`text`)).option(`price-id`,{type:`number`,description:`Pending pay-per-use price id returned in the operator proposal queue.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator proposal decision`})}const F={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:P,handler:async t=>l({command:`pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use proposals decide`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({action:t.action,price_id:t[`price-id`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.payPerUse.proposals.decide({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.action===void 0&&(t.action=await g(`action`,`The action field`,[`accept`,`reject`])),t[`price-id`]===void 0)throw Error(`--price-id is required (or pass --body with this field set).`);let d=f({action:t.action,price_id:t[`price-id`]}),p=await c(`Creating`,async()=>i.payPerUse.proposals.decide({...d,account_id:l}));o(p,{successLabel:`Created`})})};function I(e){return e.usage(`$0 pay-per-use proposals list
|
|
20
|
-
|
|
21
|
-
Lists a paginated set of outstanding pay-per-use publisher price proposals for an operator. Listing remains available while the operator is disabled or its name is unverified so proposals can be rejected.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List pay-per-use price proposals`,builder:I,handler:async t=>l({command:`pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf pay-per-use proposals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.payPerUse.proposals.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},R={command:`proposals`,describe:`Operations for proposals`,builder:e=>e.command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 pay-per-use usage-reports submit
|
|
22
|
-
|
|
23
|
-
Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const B={command:`submit`,describe:`Submit a participant usage report`,builder:z,handler:async i=>l({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:i.body});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file){let e=m(i.file),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));o(n,{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));o(n,{successLabel:`Created`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},V={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 pay-per-use usage-stats get-account
|
|
24
|
-
|
|
25
|
-
Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:H,handler:async t=>l({command:`pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let l={since:t.since,until:t.until,page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(t),d=t.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:t.zone},u,{quiet:t.quiet}):t.local?e:await a();d===`zones`?t.zoneId=f:t.accountId=f;let p=await c(`Loading`,async()=>u.payPerUse.usageStats.getAccount({account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},W={command:`usage-stats`,describe:`Operations for usage-stats`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 pay-per-use zones get-can-be-enabled
|
|
26
|
-
|
|
27
|
-
Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:G,handler:async e=>l({command:`pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.payPerUse.zones.getCanBeEnabled({zone_id:r}));o(a,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 pay-per-use zones get-configuration
|
|
28
|
-
|
|
29
|
-
Gets the pay-per-use configuration, zone-level grace period, and read-only non-billable classification timestamp for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:q,handler:async e=>l({command:`pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use zones get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.payPerUse.zones.getConfiguration({zone_id:r}));o(a,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 pay-per-use zones set-can-be-enabled
|
|
30
|
-
|
|
31
|
-
Sets pay-per-use eligibility for a list of account zones. An omitted can_be_enabled value leaves that zone unchanged. Revoking eligibility disables the zone immediately while existing accepted licenses remain active until the start of the next UTC month.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone eligibility updates`})}const X={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:Y,handler:async t=>l({command:`pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({zones:d(t.zones,`zones`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.zones.setCanBeEnabled({...e,account_id:l}));o(n,{successLabel:`Updated`});return}if(t.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=f({zones:d(t.zones,`zones`)}),m=await c(`Updating`,async()=>i.payPerUse.zones.setCanBeEnabled({...p,account_id:l}));o(m,{successLabel:`Updated`})})};function Z(e){return e.usage(`$0 pay-per-use zones update-configuration
|
|
32
|
-
|
|
33
|
-
Enables or disables an existing pay-per-use zone configuration. Omitting enabled leaves the zone unchanged. Enabling a disabled billable zone requires completed publisher Stripe onboarding, while non-billable zones do not; an already-enabled zone is not affected by later Stripe status changes. Disabling starts a disabled period immediately while existing accepted licenses remain active until the start of the next UTC month; re-enabling before expiry clears the schedule and restores those licenses.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone configuration update`})}const Q={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:Z,handler:async e=>l({command:`pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-use zones update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({enabled:e.enabled}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.payPerUse.zones.updateConfiguration({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=f({enabled:e.enabled}),l=await c(`Updating`,async()=>t.payPerUse.zones.updateConfiguration({...a,zone_id:r}));o(l,{successLabel:`Updated`})})},$={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},te={command:`pay-per-use`,describe:`pay-per-use`,builder:e=>e.command(b).command(D).command(N).command(R).command(V).command(W).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{te as default};
|