cf 1.0.0-beta.21 → 1.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +5080 -4931
- package/dist/_meta/schemas.json +3051 -3055
- package/dist/{abuse-reports-CbUAnJxd.mjs → abuse-reports-GF9V-_qH.mjs} +1 -1
- package/dist/{access-C-78DlxL.mjs → access-dWdATy_5.mjs} +1 -1
- package/dist/{accounts-DEqQPxCz.mjs → accounts-CNpiDgQ-.mjs} +50 -52
- package/dist/{acm-jmhCq3Yh.mjs → acm-BXOuZNqO.mjs} +1 -1
- package/dist/{addressing-BeYFpQvC.mjs → addressing-BE4KpVHp.mjs} +1 -1
- package/dist/agent-context-Dtyy4aKL.mjs +2 -0
- package/dist/{agent-memory-Chlovb7j.mjs → agent-memory-WOFBlqfc.mjs} +1 -1
- package/dist/{ai-BndH3HYN.mjs → ai-2syYes5a.mjs} +1 -1
- package/dist/{ai-audit-BUJ-70O_.mjs → ai-audit-DBZnZtSH.mjs} +1 -1
- package/dist/{ai-gateway-CCk7VKhL.mjs → ai-gateway-BL8uRjav.mjs} +1 -1
- package/dist/{ai-search-BexET_wp.mjs → ai-search-xKyrECHJ.mjs} +1 -1
- package/dist/{ai-security-D4MxRlxX.mjs → ai-security-D-o76TBI.mjs} +1 -1
- package/dist/{alerting-rw8Oi3x7.mjs → alerting-D0Hh3IxQ.mjs} +1 -1
- package/dist/{analytics-q-guNEOK.mjs → analytics-BS_HDYYE.mjs} +1 -1
- package/dist/{analytics-engine-Bk7dQLcm.mjs → analytics-engine-B8J0AASh.mjs} +1 -1
- package/dist/api-X3wKppsT.mjs +3 -0
- package/dist/{api-security-BDc6gkf1.mjs → api-security-Dm-_J64v.mjs} +1 -1
- package/dist/{argo-CnLIqm0i.mjs → argo-DLLQUUEp.mjs} +1 -1
- package/dist/{artifacts-Cil33dzV.mjs → artifacts-B-ILiKwb.mjs} +1 -1
- package/dist/{audit-logs--E2Eclb7.mjs → audit-logs-B6f7Yyqb.mjs} +1 -1
- package/dist/{auth-BcNLQji1.mjs → auth-BlWCu-YH.mjs} +1 -1
- package/dist/auth-C0-WtqBw.mjs +2 -0
- package/dist/{auth-BtZmY6sE.mjs → auth-CENmPoCB.mjs} +1 -1
- package/dist/{auth-token-aF5AVLlH.mjs → auth-token-7Gn0n5N_.mjs} +1 -1
- package/dist/{autoconfig-Dbp6J25P.mjs → autoconfig-Bjb97Onj.mjs} +1 -1
- package/dist/{basin-catalog-dnVyzopm.mjs → basin-catalog-C61jbxPf.mjs} +1 -1
- package/dist/{billing-Fqp3jB2V.mjs → billing-CpbtioM3.mjs} +1 -1
- package/dist/blocks-DDNRRYxu.mjs +5 -0
- package/dist/{bot-management-SEDgo1Xg.mjs → bot-management-iYrqBG7K.mjs} +1 -1
- package/dist/{botnet-feed-DPqR4M0Y.mjs → botnet-feed-CiCwJ6Oe.mjs} +1 -1
- package/dist/{brand-protection-B8vwKfM9.mjs → brand-protection-D25yQ6cQ.mjs} +1 -1
- package/dist/{browser-run-BybYDq3I.mjs → browser-run-CC3fAKEB.mjs} +1 -1
- package/dist/build-CovoviZW.mjs +2 -0
- package/dist/{build-CWlpWVBf.mjs → build-DKFvtSB_.mjs} +1 -1
- package/dist/{builds-CvtOG-Gk.mjs → builds-AFdd5qia.mjs} +1 -1
- package/dist/{cache-Bme_d2Wx.mjs → cache-BI3Oyz-Z.mjs} +1 -1
- package/dist/{cli-CIKDqm-u.mjs → cli-Dji5-s1V.mjs} +1 -1
- package/dist/{client-side-security-ZQeRoo1t.mjs → client-side-security-rknn53xw.mjs} +1 -1
- package/dist/{cloud-connector-BeunZlNV.mjs → cloud-connector-BTc3qgHz.mjs} +1 -1
- package/dist/cloudforce-one-BoFYTYsT.mjs +316 -0
- package/dist/{command-CkZkTjIj.mjs → command-6vX_Ie2o.mjs} +1 -1
- package/dist/{command-DWWuXQV8.mjs → command-BDFf54JB.mjs} +1 -1
- package/dist/{command-C9CNvZi_.mjs → command-B_C1I0aq.mjs} +1 -1
- package/dist/{command-CzWWQv8j.mjs → command-BpmbvQqK.mjs} +1 -1
- package/dist/{command-BGRucANI.mjs → command-CKEmPXtc.mjs} +1 -1
- package/dist/{command-CQ5qHE7n.mjs → command-CiBygnsK.mjs} +1 -1
- package/dist/{command-B3uWlw57.mjs → command-KuJJ2WEe.mjs} +1 -1
- package/dist/{command-prWMAJbg.mjs → command-WlIhTGN6.mjs} +1 -1
- package/dist/{command-DkwmylF2.mjs → command-leDr72L4.mjs} +1 -1
- package/dist/{command-CtlD6MEi.mjs → command-ukMoR-tT.mjs} +1 -1
- package/dist/{completions-2Otv0HMd.mjs → completions-DGe2alry.mjs} +1 -1
- package/dist/{connector-interrupts-Dfhxupmg.mjs → connector-interrupts-DZyCZta-.mjs} +1 -1
- package/dist/{connector-telemetry-events-CLVpDTIa.mjs → connector-telemetry-events-BP5GTJuQ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-E_1tmNmQ.mjs → connector-telemetry-snapshots-Q9y68rU7.mjs} +1 -1
- package/dist/{connectors-ChJpQFSl.mjs → connectors-C6wEHhyM.mjs} +1 -1
- package/dist/{containers-Cj5-9nUg.mjs → containers-DcR44W-a.mjs} +2 -2
- package/dist/{containers-CzAZfmnj.mjs → containers-f3DbMCIO.mjs} +1 -1
- package/dist/{content-scan-CIA_9PV8.mjs → content-scan-cQbQH1Ko.mjs} +1 -1
- package/dist/{context-DVh8Wyfs.mjs → context-CSjTAJ8s.mjs} +1 -1
- package/dist/{cps-hJkqdsHx.mjs → cps-aDZte41c.mjs} +1 -1
- package/dist/create-BtmuVqVL.mjs +2 -0
- package/dist/{csam-scanner-cCVO3lNF.mjs → csam-scanner-cRaGDmR_.mjs} +1 -1
- package/dist/{custom-csrs-BrTWUZ0c.mjs → custom-csrs-DoAFlLRn.mjs} +1 -1
- package/dist/{custom-hostnames-C4ft77oC.mjs → custom-hostnames-5vHNAJo7.mjs} +1 -1
- package/dist/{custom-nameservers-BWfrZhD1.mjs → custom-nameservers-B7dTZfCW.mjs} +1 -1
- package/dist/{custom-pages-DqTMKtRc.mjs → custom-pages-DsXlaGqQ.mjs} +1 -1
- package/dist/{d1-B58AA9PA.mjs → d1-DZ2JyfdZ.mjs} +3 -3
- package/dist/{delegate-D7yYckA4.mjs → delegate-DzeuzE99.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CEROLAdh.mjs → deploy-CPFnQQOk.mjs} +1 -1
- package/dist/{deploy-context-Do89WayB.mjs → deploy-context-C_YUdUN-.mjs} +1 -1
- package/dist/{deploy-input-DyMuMsi5.mjs → deploy-input-CKQOolPd.mjs} +1 -1
- package/dist/{dev-BaFS7kOM.mjs → dev-rRWAGDV_.mjs} +1 -1
- package/dist/{diagnostics-4gfYj7Pf.mjs → diagnostics-BIuJQRjU.mjs} +1 -1
- package/dist/{dls-ClWVxTBg.mjs → dls-BurMhzEE.mjs} +1 -1
- package/dist/{dns-CML-wxIt.mjs → dns-Dl1VSmFf.mjs} +1 -1
- package/dist/{dns-firewall-CL0b3dJ1.mjs → dns-firewall-BykvgGT1.mjs} +1 -1
- package/dist/{docs-BeYBHwUN.mjs → docs-FllOac9a.mjs} +1 -1
- package/dist/{durable-objects-uZECeq_f.mjs → durable-objects-BNCJA3NE.mjs} +1 -1
- package/dist/{email-auth-CCNW798I.mjs → email-auth-BYvR29qP.mjs} +1 -1
- package/dist/{email-domains-1rD1d84O.mjs → email-domains-C3jG7o39.mjs} +1 -1
- package/dist/{email-routing-CYv-LrbV.mjs → email-routing-BQ7b2KAy.mjs} +1 -1
- package/dist/{email-security-CWEUYPYo.mjs → email-security-CsoNcUfp.mjs} +1 -1
- package/dist/{email-sending-DHSzCfJx.mjs → email-sending-d_b9vyge.mjs} +3 -3
- package/dist/{error-sanitization-DWJ5ka7h.mjs → error-sanitization-ahuAGEjT.mjs} +1 -1
- package/dist/error-sanitization-rodO1WCL.mjs +2 -0
- package/dist/{errors-ol9sMqSe.mjs → errors-DFSWbpd6.mjs} +5 -5
- package/dist/{field-extractors-CuBM_uO4.mjs → field-extractors-Be4UTSz-.mjs} +1 -1
- package/dist/{firewall-SMIUSypF.mjs → firewall-DYGPUErP.mjs} +1 -1
- package/dist/{flagship-D3v6iDdw.mjs → flagship-HIikhoYo.mjs} +1 -1
- package/dist/{fraud-B2f7O15X.mjs → fraud-DNAOkNU5.mjs} +1 -1
- package/dist/get-Be821dio.mjs +2 -0
- package/dist/{google-tag-gateway-BwOc62Gy.mjs → google-tag-gateway-DHvhuTYu.mjs} +1 -1
- package/dist/{healthchecks-BQXHnihB.mjs → healthchecks-BKtoWgF2.mjs} +1 -1
- package/dist/{hyperdrive-Bd6Yfje3.mjs → hyperdrive-DQrmkuSh.mjs} +1 -1
- package/dist/{iam-qJPI1_aZ.mjs → iam-BEs1Geob.mjs} +1 -1
- package/dist/{images-goHZJOxy.mjs → images-D55kUS0m.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-CVx0Ya1E.mjs → init-BTXSeUaj.mjs} +1 -1
- package/dist/{intel-CwiqwJI9.mjs → intel-BDbanlya.mjs} +1 -1
- package/dist/{internal-5cnlw9mH.mjs → internal-Cj_Wo6sr.mjs} +1 -1
- package/dist/{ips-KBxmXhvO.mjs → ips-CHrG3mwW.mjs} +1 -1
- package/dist/{k2-KhIP5NFT.mjs → k2-CJzI3dVt.mjs} +1 -1
- package/dist/{kv-CCem2sEY.mjs → kv-BjfDMxOg.mjs} +1 -1
- package/dist/{lazy-command-BMhD5ffF.mjs → lazy-command-DkI_21Dt.mjs} +1 -1
- package/dist/{leaked-credential-checks-BkPZiwE2.mjs → leaked-credential-checks-BHe-erAg.mjs} +1 -1
- package/dist/{live-BhHzxFna.mjs → live-DSwOLngp.mjs} +1 -1
- package/dist/{load-balancers-17GBXdju.mjs → load-balancers-CWNEVfum.mjs} +1 -1
- package/dist/{login-Buhvx6Fi.mjs → login-CJYJE6Ae.mjs} +1 -1
- package/dist/login-D2Bf_HMY.mjs +2 -0
- package/dist/{logpush-BCCUxa4J.mjs → logpush-BQhzhkBY.mjs} +1 -1
- package/dist/{logs-4CwupKRG.mjs → logs-DndNcbrR.mjs} +1 -1
- package/dist/{magic-cloud-networking-Xy6SC-V-.mjs → magic-cloud-networking-XmIKU6F1.mjs} +1 -1
- package/dist/{magic-network-monitoring-B8pRZp2g.mjs → magic-network-monitoring-BgPLcQzT.mjs} +1 -1
- package/dist/{magic-transit-CwfO3OOX.mjs → magic-transit-C2kLj1Hd.mjs} +1 -1
- package/dist/{managed-defense-CtFLuvuB.mjs → managed-defense-Bq63Exyv.mjs} +1 -1
- package/dist/{managed-transforms-Hto8OCBS.mjs → managed-transforms-Bz3Q6vSk.mjs} +1 -1
- package/dist/{mcp-SQ0MAVUJ.mjs → mcp-IiegTI5c.mjs} +1 -1
- package/dist/{mesh-C8A6tVqA.mjs → mesh-C7sj3FL4.mjs} +1 -1
- package/dist/{migrate-Dufxsb_F.mjs → migrate-D7pH9_Y8.mjs} +1 -1
- package/dist/{monetization-CYVaCAe9.mjs → monetization-DvfqZhGk.mjs} +1 -1
- package/dist/{network-CJBTdEM3.mjs → network-CnqNYoOf.mjs} +1 -1
- package/dist/{network-interconnects-CKlNFj3i.mjs → network-interconnects-BXftLikd.mjs} +1 -1
- package/dist/{o11y-5x2Q8CWm.mjs → o11y-1Qku543b.mjs} +1 -1
- package/dist/{oauth-BN6_FpYp.mjs → oauth-B-SYl8nR.mjs} +1 -1
- package/dist/{oauth-D_A8AcIS.mjs → oauth-C6uYSFM5.mjs} +1 -1
- package/dist/{oauth-clients-qKXg8ZH3.mjs → oauth-clients-DXNO-K_e.mjs} +1 -1
- package/dist/{oauth-scopes-Ct1jDyC5.mjs → oauth-scopes-WxoyDblU.mjs} +1 -1
- package/dist/{organization-lBQSeqS1.mjs → organization-HBQnzh8z.mjs} +1 -1
- package/dist/{organizations-DEX8Er3g.mjs → organizations-DvS-ENN2.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DUsxVGCs.mjs → origin-post-quantum-encryption-BnjX0dCp.mjs} +1 -1
- package/dist/package-DAB8HAGn.mjs +2 -0
- package/dist/{page-rules-BMt6nt03.mjs → page-rules-CypVq1Wb.mjs} +1 -1
- package/dist/{pages-Jxa92ECz.mjs → pages-BxLbPYIf.mjs} +1 -1
- package/dist/{pay-per-crawl-Cv0044CZ.mjs → pay-per-crawl-KidGhWnn.mjs} +1 -1
- package/dist/{pay-per-use-DGEeG-dC.mjs → pay-per-use-DcsdwXr7.mjs} +1 -1
- package/dist/{pipelines-CEC78A3w.mjs → pipelines-CX7esgh3.mjs} +1 -1
- package/dist/{precursor-Ba0Ejhzt.mjs → precursor-BzDcAmUT.mjs} +1 -1
- package/dist/{previews-DnZbUTym.mjs → previews-B7MZKZK6.mjs} +1 -1
- package/dist/{progress-CtGsPOpV.mjs → progress-BcjUdm_B.mjs} +1 -1
- package/dist/{prompt-YrI7ltMa.mjs → prompt-BFRinxR0.mjs} +1 -1
- package/dist/{queues-Chq997uj.mjs → queues-mSjNdJNl.mjs} +1 -1
- package/dist/{r2-BFgZDs-F.mjs → r2-ClBc0jT0.mjs} +1 -1
- package/dist/{radar-DJdDzLJw.mjs → radar-C9GwykGn.mjs} +1 -1
- package/dist/{raw-fetch-BE3QgdTE.mjs → raw-fetch-BO0VqOVx.mjs} +1 -1
- package/dist/{ready-Cok0aqke.mjs → ready-DhdeN4ga.mjs} +1 -1
- package/dist/{realtime-BHWWCiKp.mjs → realtime-9V5zWcij.mjs} +73 -71
- package/dist/{registrar-9Y-1IQ0n.mjs → registrar-DsI2A62h.mjs} +1 -1
- package/dist/{registrar-sandbox-DTS1kRnb.mjs → registrar-sandbox-DcjFW26g.mjs} +1 -1
- package/dist/{reporting-D5RbKQJf.mjs → reporting-pAQ3jvEO.mjs} +1 -1
- package/dist/{request-headers-KhW_hy36.mjs → request-headers-DFPlTFRf.mjs} +1 -1
- package/dist/{request-tracers-wxWCjmHo.mjs → request-tracers-CQqdbHj8.mjs} +1 -1
- package/dist/{resource-sharing-BGoaVvJa.mjs → resource-sharing-BJraifhD.mjs} +1 -1
- package/dist/{rules-Cd3EjhdF.mjs → rules-B_Mopjel.mjs} +1 -1
- package/dist/{rulesets-Bnz3rSBT.mjs → rulesets-DRV0HtYz.mjs} +1 -1
- package/dist/{rum-CK9HEe3O.mjs → rum-D5dYq2Uy.mjs} +1 -1
- package/dist/{run-DnZGQbq_.mjs → run--9dxcon4.mjs} +1 -1
- package/dist/run-BUebYPOn.mjs +2 -0
- package/dist/{schema-flags-BrDlFwLv.mjs → schema-flags-blYVIAUK.mjs} +1 -1
- package/dist/{scim-UdqaWnOu.mjs → scim-C91WGj_g.mjs} +1 -1
- package/dist/{secrets-store-Bf5v96LC.mjs → secrets-store-D4Zr-fuz.mjs} +3 -3
- package/dist/{security-insights-BAGySlGu.mjs → security-insights-DJWdVax5.mjs} +1 -1
- package/dist/{security-txt-D0fMmjHs.mjs → security-txt-B0NLFJNk.mjs} +1 -1
- package/dist/{session-6xqrJWXy.mjs → session-Bafy81hj.mjs} +1 -1
- package/dist/{shared-DYRRG9A-.mjs → shared-rCcn7D66.mjs} +1 -1
- package/dist/{signed-url-Ce0muRem.mjs → signed-url-DBf_p7Wf.mjs} +1 -1
- package/dist/{smart-shield-CCy7_M3j.mjs → smart-shield-BufLvdU3.mjs} +1 -1
- package/dist/{snippets-Bc8m3HSV.mjs → snippets-DA2Gk50m.mjs} +1 -1
- package/dist/{spawn-BAEdy9kS.mjs → spawn-hrdbxnm1.mjs} +1 -1
- package/dist/{spectrum-DtNX8WBX.mjs → spectrum-DlI8qtVo.mjs} +1 -1
- package/dist/{speed-TbkeWV_x.mjs → speed-DNwm5gYl.mjs} +1 -1
- package/dist/{sql-DI319y25.mjs → sql-aBDdRWdd.mjs} +1 -1
- package/dist/{src-Dc6ojwUW.mjs → src-4-uZcDN_.mjs} +5 -5
- package/dist/{ssl-D0MIzFl2.mjs → ssl-DEDucWlo.mjs} +1 -1
- package/dist/{stream-4Mrb8HEo.mjs → stream-DGv9Bssl.mjs} +1 -1
- package/dist/{tags-BP25qydR.mjs → tags-CNBA4Pf1.mjs} +1 -1
- package/dist/telemetry-THz8wtoW.mjs +2 -0
- package/dist/{telemetry-DKSJSLtq.mjs → telemetry-klBrZrC7.mjs} +1 -1
- package/dist/{tenant-jmfZqEZ4.mjs → tenant-DVtqafWB.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BzVP85Tq.mjs → tenant-custom-nameservers-CtrqQc_i.mjs} +1 -1
- package/dist/{tunnels-BNswR1Dj.mjs → tunnels-Bc_r--ln.mjs} +2 -2
- package/dist/{turnstile-BgsTP2fz.mjs → turnstile-Cr2cTE0C.mjs} +1 -1
- package/dist/ui-DvC7Qa0H.mjs +2 -0
- package/dist/{update-check-BOF1hn_I.mjs → update-check-B5V9BBM7.mjs} +1 -1
- package/dist/{update-check-C7mfEeQ7.mjs → update-check-C5bJ4-Ef.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-Bqrs4-2F.mjs → url-normalization-D6r0sLRj.mjs} +1 -1
- package/dist/{url-scanner-Dm4Fps5T.mjs → url-scanner-D4u7jbzf.mjs} +1 -1
- package/dist/{user-u_LxzLM4.mjs → user-DhWPKWo0.mjs} +1 -1
- package/dist/{vectorize-DLGiOyd4.mjs → vectorize-CB9IjpC3.mjs} +1 -1
- package/dist/version-Dp7G_dM6.mjs +2 -0
- package/dist/{waiting-rooms-DmgJgJXb.mjs → waiting-rooms-BYlwhzgD.mjs} +1 -1
- package/dist/{web-assets-rNhZWP-6.mjs → web-assets-Nn2HArqh.mjs} +1 -1
- package/dist/{web3-BVBdFt8E.mjs → web3-DpJNkFNQ.mjs} +1 -1
- package/dist/{workers-CjUKJvH8.mjs → workers-BkNt1wSN.mjs} +2 -2
- package/dist/{workers-builds-D3Q97l7X.mjs → workers-builds-BL3dK2R3.mjs} +1 -1
- package/dist/{workers-for-platforms-C_fcw30y.mjs → workers-for-platforms-CAQLG6dE.mjs} +1 -1
- package/dist/{workers-vpc-CnRO3Stc.mjs → workers-vpc-WnRec8oo.mjs} +1 -1
- package/dist/{workflows-cpHFe5v6.mjs → workflows-DpXBMizW.mjs} +1 -1
- package/dist/{wrangler-migration-DQehjmoh.mjs → wrangler-migration-__jrVjrp.mjs} +1 -1
- package/dist/{zaraz-BRj0J7vK.mjs → zaraz-hWisKRaN.mjs} +1 -1
- package/dist/{zero-trust-CVZKDLCB.mjs → zero-trust-DiZhiSa4.mjs} +37 -37
- package/dist/{zone-N6ccK70C.mjs → zone-D7b949er.mjs} +1 -1
- package/dist/{zones-C4S_kpGz.mjs → zones-giCZ0LO8.mjs} +1 -1
- package/package.json +1 -1
- package/dist/agent-context-DFEgYjEQ.mjs +0 -2
- package/dist/api-eMuS5GI1.mjs +0 -3
- package/dist/auth-B0lEsD_1.mjs +0 -2
- package/dist/blocks-BOQH-Won.mjs +0 -5
- package/dist/build-BqGmiORA.mjs +0 -2
- package/dist/cloudforce-one-D20t9ojD.mjs +0 -370
- package/dist/create-OXylMu6m.mjs +0 -2
- package/dist/error-sanitization-Byb-_IS9.mjs +0 -2
- package/dist/get-iPUHxD1r.mjs +0 -2
- package/dist/login-BTiflOun.mjs +0 -2
- package/dist/package-BqSbnt6u.mjs +0 -2
- package/dist/run-Be6Js7D6.mjs +0 -2
- package/dist/telemetry-CvZean4s.mjs +0 -2
- package/dist/ui-Bo6DCvbS.mjs +0 -2
- package/dist/version-DmTuWNZ5.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r,s as i}from"./auth-BlWCu-YH.mjs";import{a,i as o,t as s}from"./context-CSjTAJ8s.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-BcjUdm_B.mjs";import{t as d}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as f,n as p,s as m,t as h}from"./body-parser-ChnyBsfm.mjs";import{n as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-BFRinxR0.mjs";import{n as ee,t as te}from"./raw-fetch-BO0VqOVx.mjs";var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/resource-library/applications`,body:`json`};function ne(e){return e.usage(`$0 accounts applications create
|
|
3
3
|
|
|
4
4
|
Create a custom application for an account from a name, category, and optional network matchers.`).option(`category-id`,{type:`number`,description:`Numeric identifier for an application category.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Human-readable identifier for the application.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`name`,{type:`string`,description:`Application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:"Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535."}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Defines a custom application. At least one hostname or IP subnet is required. Support domains and port/protocol pairs do not satisfy this requirement. A NUL character (U+0000) in any string value returns `400`. "})}const re={command:`create`,describe:`Create application`,builder:ne,handler:async e=>d({command:`accounts applications create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({category_id:e[`category-id`],hostnames:e.hostnames,human_id:g(e[`human-id`],`human-id`,`text`),ip_subnets:e[`ip-subnets`],name:g(e.name,`name`,`text`),port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(b,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}if(e[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);e[`human-id`]===void 0&&(e[`human-id`]=await _(`human-id`,`Human-readable identifier for the application.`)),e.name===void 0&&(e.name=await _(`name`,`Application name.`));let o=h({category_id:e[`category-id`],hostnames:e.hostnames,human_id:g(e[`human-id`],`human-id`,`text`),ip_subnets:e[`ip-subnets`],name:g(e.name,`name`,`text`),port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}),d=await u(`Creating`,async()=>n.send(b,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/resource-library/applications/${t.id}`,errors:{409:`ConflictError`,502:`BadGatewayError`}};function ae(e){return e.usage(`$0 accounts applications delete <id>
|
|
5
5
|
|
|
@@ -21,109 +21,107 @@ whitespace is trimmed before the length is checked. Control characters other
|
|
|
21
21
|
than tab and line breaks return \`400\`.
|
|
22
22
|
`}).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 me={command:`lookup`,describe:`Look up applications in a rule sentence`,builder:pe,handler:async e=>d({command:`accounts applications lookup`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={filter:e.filter,limit:e.limit,fields:e.fields};if(e.dryRun){let t=await a();l({command:`cf accounts applications lookup`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/resource-library/applications/lookup`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({lookup:g(e.lookup,`lookup`,`text`)}):p(e.body)});return}let i=await r(e),o=e.local?t:await s();if(e.accountId=o,e.body){let t=p(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await u(`Creating`,async()=>i.send(x,{body:t,account_id:o,...n}));c(r,{successLabel:`Created`});return}e.lookup===void 0&&(e.lookup=await _(`lookup`,"Rule sentence to search for complete application names. Leading and trailing whitespace is trimmed before the length is checked. Control characters other than tab and line breaks return `400`. "));let d=h({lookup:g(e.lookup,`lookup`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let f=await u(`Creating`,async()=>i.send(x,{body:d,account_id:o,...n}));c(f,{successLabel:`Created`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/resource-library/applications/${t.id}`,body:`json`};function he(e){return e.usage(`$0 accounts applications update <id>
|
|
23
23
|
|
|
24
|
-
Replace the supplied network matchers for a custom application and create a new version. Omitted matcher lists remain unchanged; send an empty list to clear a matcher type.`).positional(`id`,{type:`string`,description:`Application ID.`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`port-protocols`,{type:`string`,array:!0,description:"Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535."}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Update the network matchers for the application. The service preserves omitted matcher lists; send an empty array to clear a list. The resulting application must contain at least one hostname or IP subnet. Support domains and port/protocol pairs do not satisfy this requirement. A NUL character (U+0000) in any string value returns `400`. "})}const ge={command:`update <id>`,describe:`Update application`,builder:he,handler:async e=>d({command:`accounts applications update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts applications update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/resource-library/applications/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?h({hostnames:e.hostnames,ip_subnets:e[`ip-subnets`],port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(S,{body:t,account_id:i,id:e.id}));c(r,{successLabel:`Updated`});return}let o=h({hostnames:e.hostnames,ip_subnets:e[`ip-subnets`],port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}),d=await u(`Updating`,async()=>n.send(S,{body:o,account_id:i,id:e.id}));c(d,{successLabel:`Updated`})})},_e={command:`applications`,describe:`List Cloudflare-curated and custom applications, and manage custom applications`,builder:e=>e.command(re).command(oe).command(le).command(fe).command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
24
|
+
Replace the supplied network matchers for a custom application and create a new version. Omitted matcher lists remain unchanged; send an empty list to clear a matcher type.`).positional(`id`,{type:`string`,description:`Application ID.`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`port-protocols`,{type:`string`,array:!0,description:"Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535."}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Update the network matchers for the application. The service preserves omitted matcher lists; send an empty array to clear a list. The resulting application must contain at least one hostname or IP subnet. Support domains and port/protocol pairs do not satisfy this requirement. A NUL character (U+0000) in any string value returns `400`. "})}const ge={command:`update <id>`,describe:`Update application`,builder:he,handler:async e=>d({command:`accounts applications update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts applications update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/resource-library/applications/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?h({hostnames:e.hostnames,ip_subnets:e[`ip-subnets`],port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(S,{body:t,account_id:i,id:e.id}));c(r,{successLabel:`Updated`});return}let o=h({hostnames:e.hostnames,ip_subnets:e[`ip-subnets`],port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}),d=await u(`Updating`,async()=>n.send(S,{body:o,account_id:i,id:e.id}));c(d,{successLabel:`Updated`})})},_e={command:`applications`,describe:`List Cloudflare-curated and custom applications, and manage custom applications`,builder:e=>e.command(re).command(oe).command(le).command(fe).command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/client-secret`};function w(e){return e.usage(`$0 accounts billing create-setup-intent
|
|
25
25
|
|
|
26
|
-
Creates a Stripe setup intent for adding a payment method to an account. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
26
|
+
Creates a Stripe setup intent for adding a payment method to an account. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`create-setup-intent`,describe:`Create Setup Intent`,builder:w,handler:async e=>d({command:`accounts billing create-setup-intent`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts billing create-setup-intent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/client-secret`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Creating`,async()=>n.send(C,{account_id:i}));c(o,{successLabel:`Created`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/bad-debt`};function D(e){return e.usage(`$0 accounts billing get-bad-debt
|
|
27
27
|
|
|
28
|
-
Gets bad debt information for an account, including outstanding invoices and total debt amount.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
28
|
+
Gets bad debt information for an account, including outstanding invoices and total debt amount.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get-bad-debt`,describe:`Get Account Bad Debt`,builder:D,handler:async e=>d({command:`accounts billing get-bad-debt`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts billing get-bad-debt`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/bad-debt`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(E,{account_id:i}));c(o,{successLabel:`Loaded`})})};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/credits`};function A(e){return e.usage(`$0 accounts billing get-credits
|
|
29
29
|
|
|
30
|
-
Gets the credit balance and eligibility for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
30
|
+
Gets the credit balance and eligibility for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get-credits`,describe:`Get Account Credits`,builder:A,handler:async e=>d({command:`accounts billing get-credits`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts billing get-credits`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/credits`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(k,{account_id:i}));c(o,{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 accounts billing get-receipt-pdf <receipt-id>
|
|
31
31
|
|
|
32
|
-
Downloads a receipt as a PDF document.`).positional(`receipt-id`,{type:`string`,description:`Receipt identifier.`,demandOption:!0}).option(`doctype`,{type:`string`,description:`The document type to generate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const
|
|
32
|
+
Downloads a receipt as a PDF document.`).positional(`receipt-id`,{type:`string`,description:`Receipt identifier.`,demandOption:!0}).option(`doctype`,{type:`string`,description:`The document type to generate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const N={command:`get-receipt-pdf <receipt-id>`,describe:`Get Receipt PDF`,builder:M,handler:async e=>d({command:`accounts billing get-receipt-pdf`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{let n={doctype:e.doctype};if(e.dryRun){let t=await a();l({command:`cf accounts billing get-receipt-pdf`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/receipts/${e[`receipt-id`]==null?`<receipt-id>`:encodeURIComponent(String(e[`receipt-id`]))}/pdf`,pathParams:{"receipt-id":String(e[`receipt-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let i=e.local?t:await s();e.accountId=i;let o=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),c=await u(`Loading`,async()=>te(`/accounts/${i}/receipts/${encodeURIComponent(String(e[`receipt-id`]))}/pdf${o?`?`+o:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));ee(e.text===!0?c.toString(`utf-8`):c)})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/unpaid-invoice`};function F(e){return e.usage(`$0 accounts billing get-unpaid-invoices
|
|
33
33
|
|
|
34
|
-
Gets unpaid invoice information for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
34
|
+
Gets unpaid invoice information for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get-unpaid-invoices`,describe:`Get Unpaid Invoices`,builder:F,handler:async e=>d({command:`accounts billing get-unpaid-invoices`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts billing get-unpaid-invoices`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/unpaid-invoice`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(P,{account_id:i}));c(o,{successLabel:`Loaded`})})};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/history`,query:[`page`,`per_page`,`status`]};function ye(e){return e.usage(`$0 accounts billing history list
|
|
35
35
|
|
|
36
|
-
Gets the billing history for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`status`,{type:`string`,description:`Filter billing history by status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
36
|
+
Gets the billing history for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`status`,{type:`string`,description:`Filter billing history by status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`list`,describe:`Get Account Billing History`,builder:ye,handler:async e=>d({command:`accounts billing history list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){let e=await a();l({command:`cf accounts billing history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/history`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(ve,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})},xe={command:`history`,describe:`Operations for billing.history`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-invoice`,body:`json`};function Se(e){return e.usage(`$0 accounts billing pay-invoice
|
|
37
37
|
|
|
38
|
-
Pays outstanding
|
|
38
|
+
Pays an outstanding invoice for an account. Returns a Stripe client secret when Strong Customer Authentication (SCA) is required to complete the payment.`).option(`invoice-id`,{type:`string`,description:`The identifier of the invoice to pay.`}).option(`payment-method-id`,{type:`string`,description:`The payment method to use. If omitted, the default payment method is used.`}).option(`validate-payment-method`,{type:`boolean`,description:`Whether to validate the payment method before processing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`pay-invoice`,describe:`Pay Invoice`,builder:Se,handler:async e=>d({command:`accounts billing pay-invoice`,classification:{safeFlags:[`validate-payment-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing pay-invoice`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-invoice`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({invoice_id:g(e[`invoice-id`],`invoice-id`,`text`),payment_method_id:g(e[`payment-method-id`],`payment-method-id`,`text`),validate_payment_method:e[`validate-payment-method`]}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(L,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}let o=h({invoice_id:g(e[`invoice-id`],`invoice-id`,`text`),payment_method_id:g(e[`payment-method-id`],`payment-method-id`,`text`),validate_payment_method:e[`validate-payment-method`]}),d=await u(`Creating`,async()=>n.send(L,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/payment-methods`,body:`json`};function we(e){return e.usage(`$0 accounts billing payment-methods create
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Creates a new payment method for an account.`).option(`address`,{type:`string`,description:`Billing address line 1.`}).option(`address2`,{type:`string`,description:`Billing address line 2.`}).option(`bank-account-type`,{type:`string`,description:`Bank account type.`}).option(`bank-code`,{type:`string`,description:`Bank code.`}).option(`bank-country`,{type:`string`,description:`Bank country.`}).option(`bank-name`,{type:`string`,description:`Bank name for bank-based payment methods.`}).option(`bank-routing-number`,{type:`string`,description:`Bank routing number.`}).option(`cashapp-cash-tag`,{type:`string`,description:`Cash App cash tag.`}).option(`city`,{type:`string`,description:`Billing city.`}).option(`country`,{type:`string`,description:`Billing country.`}).option(`default`,{type:`boolean`,description:`Whether this is the default payment method.`}).option(`device-data`,{type:`string`,description:`Device data for fraud prevention.`}).option(`first-name`,{type:`string`,description:`Billing first name.`}).option(`last-name`,{type:`string`,description:`Billing last name.`}).option(`nick-name`,{type:`string`,description:`A nickname for the payment method.`}).option(`payment-account-email`,{type:`string`,description:`Email associated with the payment account.`}).option(`payment-email`,{type:`string`,description:`Payment email address.`}).option(`payment-gateway`,{type:`string`,description:`The payment gateway used.`}).option(`payment-nonce`,{type:`string`,description:`Payment nonce for tokenized payments.`}).option(`state`,{type:`string`,description:`Billing state.`}).option(`type`,{type:`string`,description:`The payment method type.`,choices:[`CREDIT_CARD`,`PAYPAL`,`CASHAPP`,`SEPA_DEBIT`,`LINK`,`ACH_DIRECT_DEBIT`]}).coerce(`type`,e=>g(e,`type`,`text`)).option(`zipcode`,{type:`string`,description:`Billing zip code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`create`,describe:`Create Payment Method`,builder:we,handler:async e=>d({command:`accounts billing payment-methods create`,classification:{safeFlags:[`default`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing payment-methods create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/payment-methods`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({address:g(e.address,`address`,`text`),address2:g(e.address2,`address2`,`text`),bank_account_type:g(e[`bank-account-type`],`bank-account-type`,`text`),bank_code:g(e[`bank-code`],`bank-code`,`text`),bank_country:g(e[`bank-country`],`bank-country`,`text`),bank_name:g(e[`bank-name`],`bank-name`,`text`),bank_routing_number:g(e[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:g(e[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:g(e.city,`city`,`text`),country:g(e.country,`country`,`text`),default:e.default,device_data:g(e[`device-data`],`device-data`,`text`),first_name:g(e[`first-name`],`first-name`,`text`),last_name:g(e[`last-name`],`last-name`,`text`),nick_name:g(e[`nick-name`],`nick-name`,`text`),payment_account_email:g(e[`payment-account-email`],`payment-account-email`,`text`),payment_email:g(e[`payment-email`],`payment-email`,`text`),payment_gateway:g(e[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:g(e[`payment-nonce`],`payment-nonce`,`text`),state:g(e.state,`state`,`text`),type:e.type,zipcode:g(e.zipcode,`zipcode`,`text`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(R,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}let o=h({address:g(e.address,`address`,`text`),address2:g(e.address2,`address2`,`text`),bank_account_type:g(e[`bank-account-type`],`bank-account-type`,`text`),bank_code:g(e[`bank-code`],`bank-code`,`text`),bank_country:g(e[`bank-country`],`bank-country`,`text`),bank_name:g(e[`bank-name`],`bank-name`,`text`),bank_routing_number:g(e[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:g(e[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:g(e.city,`city`,`text`),country:g(e.country,`country`,`text`),default:e.default,device_data:g(e[`device-data`],`device-data`,`text`),first_name:g(e[`first-name`],`first-name`,`text`),last_name:g(e[`last-name`],`last-name`,`text`),nick_name:g(e[`nick-name`],`nick-name`,`text`),payment_account_email:g(e[`payment-account-email`],`payment-account-email`,`text`),payment_email:g(e[`payment-email`],`payment-email`,`text`),payment_gateway:g(e[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:g(e[`payment-nonce`],`payment-nonce`,`text`),state:g(e.state,`state`,`text`),type:e.type,zipcode:g(e.zipcode,`zipcode`,`text`)}),d=await u(`Creating`,async()=>n.send(R,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var Ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/payment-methods/${t.payment_method_id}`};function De(e){return e.usage(`$0 accounts billing payment-methods delete <payment-method-id>
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Deletes a payment method from an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Oe={command:`delete <payment-method-id>`,describe:`Delete Payment Method`,builder:De,handler:async e=>d({command:`accounts billing payment-methods delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing payment-methods delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/payment-methods/${e[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(e[`payment-method-id`]))}`,pathParams:{"payment-method-id":String(e[`payment-method-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,!await y({force:!!e.force}))return;let o=await u(`Deleting`,async()=>n.send(Ee,{account_id:i,payment_method_id:e[`payment-method-id`]}));c(o,{successLabel:`Deleted`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/payment-methods/${t.payment_method_id}`};function Ae(e){return e.usage(`$0 accounts billing payment-methods get <payment-method-id>
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Gets a specific payment method for an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get <payment-method-id>`,describe:`Get Payment Method`,builder:Ae,handler:async e=>d({command:`accounts billing payment-methods get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing payment-methods get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/payment-methods/${e[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(e[`payment-method-id`]))}`,pathParams:{"payment-method-id":String(e[`payment-method-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(ke,{account_id:i,payment_method_id:e[`payment-method-id`]}));c(o,{successLabel:`Loaded`})})};var Me={method:`GET`,path:t=>e`/accounts/${t.account_id}/payment-methods`,query:[`page`,`per_page`]};function Ne(e){return e.usage(`$0 accounts billing payment-methods list
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Lists all payment methods for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`list`,describe:`List Payment Methods`,builder:Ne,handler:async e=>d({command:`accounts billing payment-methods list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await a();l({command:`cf accounts billing payment-methods list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/payment-methods`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(Me,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})};var Fe={method:`POST`,path:t=>e`/accounts/${t.account_id}/payment-methods/${t.payment_method_id}/set-as-default`};function Ie(e){return e.usage(`$0 accounts billing payment-methods set-default <payment-method-id>
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Sets a payment method as the default for an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`set-default <payment-method-id>`,describe:`Set Default Payment Method`,builder:Ie,handler:async e=>d({command:`accounts billing payment-methods set-default`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing payment-methods set-default`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/payment-methods/${e[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(e[`payment-method-id`]))}/set-as-default`,pathParams:{"payment-method-id":String(e[`payment-method-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Creating`,async()=>n.send(Fe,{account_id:i,payment_method_id:e[`payment-method-id`]}));c(o,{successLabel:`Created`})})};var z={method:`PUT`,path:t=>e`/accounts/${t.account_id}/payment-methods/${t.payment_method_id}`,body:`json`};function Re(e){return e.usage(`$0 accounts billing payment-methods update <payment-method-id>
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Updates a payment method for an account.`).positional(`payment-method-id`,{type:`string`,description:`Payment method identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`Billing address line 1.`}).option(`address2`,{type:`string`,description:`Billing address line 2.`}).option(`bank-account-type`,{type:`string`,description:`Bank account type.`}).option(`bank-code`,{type:`string`,description:`Bank code.`}).option(`bank-country`,{type:`string`,description:`Bank country.`}).option(`bank-name`,{type:`string`,description:`Bank name for bank-based payment methods.`}).option(`bank-routing-number`,{type:`string`,description:`Bank routing number.`}).option(`cashapp-cash-tag`,{type:`string`,description:`Cash App cash tag.`}).option(`city`,{type:`string`,description:`Billing city.`}).option(`country`,{type:`string`,description:`Billing country.`}).option(`default`,{type:`boolean`,description:`Whether this is the default payment method.`}).option(`device-data`,{type:`string`,description:`Device data for fraud prevention.`}).option(`first-name`,{type:`string`,description:`Billing first name.`}).option(`last-name`,{type:`string`,description:`Billing last name.`}).option(`nick-name`,{type:`string`,description:`A nickname for the payment method.`}).option(`payment-account-email`,{type:`string`,description:`Email associated with the payment account.`}).option(`payment-email`,{type:`string`,description:`Payment email address.`}).option(`payment-gateway`,{type:`string`,description:`The payment gateway used.`}).option(`payment-nonce`,{type:`string`,description:`Payment nonce for tokenized payments.`}).option(`state`,{type:`string`,description:`Billing state.`}).option(`type`,{type:`string`,description:`The payment method type.`,choices:[`CREDIT_CARD`,`PAYPAL`,`CASHAPP`,`SEPA_DEBIT`,`LINK`,`ACH_DIRECT_DEBIT`]}).coerce(`type`,e=>g(e,`type`,`text`)).option(`zipcode`,{type:`string`,description:`Billing zip code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`update <payment-method-id>`,describe:`Update Payment Method`,builder:Re,handler:async e=>d({command:`accounts billing payment-methods update`,classification:{safeFlags:[`default`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing payment-methods update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/payment-methods/${e[`payment-method-id`]==null?`<payment-method-id>`:encodeURIComponent(String(e[`payment-method-id`]))}`,pathParams:{"payment-method-id":String(e[`payment-method-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({address:g(e.address,`address`,`text`),address2:g(e.address2,`address2`,`text`),bank_account_type:g(e[`bank-account-type`],`bank-account-type`,`text`),bank_code:g(e[`bank-code`],`bank-code`,`text`),bank_country:g(e[`bank-country`],`bank-country`,`text`),bank_name:g(e[`bank-name`],`bank-name`,`text`),bank_routing_number:g(e[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:g(e[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:g(e.city,`city`,`text`),country:g(e.country,`country`,`text`),default:e.default,device_data:g(e[`device-data`],`device-data`,`text`),first_name:g(e[`first-name`],`first-name`,`text`),last_name:g(e[`last-name`],`last-name`,`text`),nick_name:g(e[`nick-name`],`nick-name`,`text`),payment_account_email:g(e[`payment-account-email`],`payment-account-email`,`text`),payment_email:g(e[`payment-email`],`payment-email`,`text`),payment_gateway:g(e[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:g(e[`payment-nonce`],`payment-nonce`,`text`),state:g(e.state,`state`,`text`),type:e.type,zipcode:g(e.zipcode,`zipcode`,`text`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(z,{body:t,account_id:i,payment_method_id:e[`payment-method-id`]}));c(r,{successLabel:`Updated`});return}let o=h({address:g(e.address,`address`,`text`),address2:g(e.address2,`address2`,`text`),bank_account_type:g(e[`bank-account-type`],`bank-account-type`,`text`),bank_code:g(e[`bank-code`],`bank-code`,`text`),bank_country:g(e[`bank-country`],`bank-country`,`text`),bank_name:g(e[`bank-name`],`bank-name`,`text`),bank_routing_number:g(e[`bank-routing-number`],`bank-routing-number`,`text`),cashapp_cash_tag:g(e[`cashapp-cash-tag`],`cashapp-cash-tag`,`text`),city:g(e.city,`city`,`text`),country:g(e.country,`country`,`text`),default:e.default,device_data:g(e[`device-data`],`device-data`,`text`),first_name:g(e[`first-name`],`first-name`,`text`),last_name:g(e[`last-name`],`last-name`,`text`),nick_name:g(e[`nick-name`],`nick-name`,`text`),payment_account_email:g(e[`payment-account-email`],`payment-account-email`,`text`),payment_email:g(e[`payment-email`],`payment-email`,`text`),payment_gateway:g(e[`payment-gateway`],`payment-gateway`,`text`),payment_nonce:g(e[`payment-nonce`],`payment-nonce`,`text`),state:g(e.state,`state`,`text`),type:e.type,zipcode:g(e.zipcode,`zipcode`,`text`)}),d=await u(`Updating`,async()=>n.send(z,{body:o,account_id:i,payment_method_id:e[`payment-method-id`]}));c(d,{successLabel:`Updated`})})},Be={command:`payment-methods`,describe:`Operations for billing.payment-methods`,builder:e=>e.command(Te).command(Oe).command(je).command(Pe).command(Le).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/invoices`,body:`json`};function Ve(e){return e.usage(`$0 accounts billing toggle-pdf-invoices
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Toggles PDF invoice generation for an account.`).option(`toggle`,{type:`boolean`,description:`Whether to enable or disable PDF invoice generation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const He={command:`toggle-pdf-invoices`,describe:`Toggle PDF Invoices`,builder:Ve,handler:async e=>d({command:`accounts billing toggle-pdf-invoices`,classification:{safeFlags:[`toggle`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts billing toggle-pdf-invoices`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/invoices`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({toggle:e.toggle}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(B,{body:t,account_id:i}));c(r,{successLabel:`Updated`});return}let o=h({toggle:e.toggle}),d=await u(`Updating`,async()=>n.send(B,{body:o,account_id:i}));c(d,{successLabel:`Updated`})})},Ue={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(T).command(O).command(j).command(N).command(I).command(Ce).command(He).command(xe).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var We={method:`GET`,path:t=>e`/accounts/${t.account_id}/resource-library/categories/${t.id}`};function Ge(e){return e.usage(`$0 accounts categories get <id>
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Retrieve an application category by its numeric ID.`).positional(`id`,{type:`string`,description:`Application category ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get <id>`,describe:`Get application category`,builder:Ge,handler:async e=>d({command:`accounts categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/resource-library/categories/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(We,{account_id:i,id:e.id}));c(o,{successLabel:`Loaded`})})};var qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/resource-library/categories`,query:[`limit`,`offset`,`cursor`],errors:{503:`ServiceUnavailableError`}};function Je(e){return e.usage("$0 accounts categories list\n\nList the categories available for classifying applications, ordered by name. Results are paginated by `offset` or `cursor`.").option(`limit`,{type:`number`,description:`Number of results to return. Defaults to 25; values are clamped to 1–250.`}).option(`offset`,{type:`number`,description:"Number of results to skip. Defaults to 0; negative values are clamped to 0. Ignored when `cursor` is provided."}).option(`cursor`,{type:`string`,description:"Opaque value from `result_info.cursor` of the previous response. Returns the\ncategories that follow it. `limit` may change between requests. An empty value\nis the same as no cursor. A modified cursor, or one returned by a different list,\nreturns `400`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`list`,describe:`List application categories`,builder:Je,handler:async e=>d({command:`accounts categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset,cursor:e.cursor};if(e.dryRun){let e=await a();l({command:`cf accounts categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/resource-library/categories`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(qe,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})},Xe={command:`categories`,describe:`Browse the categories used to classify applications`,builder:e=>e.command(Ke).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ze(e){return e.usage("$0 accounts create\n\nCreate an Account. To create the Account within an Organization, provide `unit.id` and omit `standalone`. To create a standalone Free Account, provide `standalone: true` and omit `unit`. Providing both fields is invalid. If you omit both fields, Cloudflare can determine the destination only when the User is an administrator of exactly one Organization. Cloudflare creates the Account in that Organization; otherwise, the request returns an error.").option(`idempotency-key`,{type:`string`,description:`Optional key that identifies an Account-creation request. Free Account creation can require exactly one valid key, so API clients should send a key with every Account-creation request. Reuse the same key when retrying the same request.`}).option(`name`,{type:`string`,description:`Account name`}).option(`standalone`,{type:`boolean`,description:"Set to `true` and omit `unit` to create a standalone Free Account. If provided, this field must be `true`."}).option(`type`,{type:`string`,description:`The type field`,choices:[`standard`,`enterprise`]}).coerce(`type`,e=>g(e,`type`,`text`)).option(`unit-id`,{type:`string`,description:`Tenant unit ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Parameters for account creation`})}const Qe={command:`create`,describe:`Create an Account`,builder:Ze,handler:async e=>d({command:`accounts create`,classification:{safeFlags:[`standalone`,`type`,`dry-run`]}},e,async()=>{let t={};if(e[`idempotency-key`]!==void 0&&(t[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){l({command:`cf accounts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({name:g(e.name,`name`,`text`),standalone:e.standalone,type:e.type,unit:{id:g(e[`unit-id`],`unit-id`,`text`)}}):p(e.body)});return}let i=await r(e);if(e.body){let r=p(e.body),a=await u(`Creating`,async()=>n(i,`POST`,`/accounts`,{body:r,headers:Object.keys(t).length>0?t:void 0}));c(a,{successLabel:`Created`});return}e.name===void 0&&(e.name=await _(`name`,`Account name`));let a={};e.name!==void 0&&m(a,[`name`],g(e.name,`name`,`text`)),e.standalone!==void 0&&m(a,[`standalone`],e.standalone),e.type!==void 0&&m(a,[`type`],e.type),e[`unit-id`]!==void 0&&m(a,[`unit`,`id`],g(e[`unit-id`],`unit-id`,`text`));let o=await u(`Creating`,async()=>n(i,`POST`,`/accounts`,{body:a,headers:Object.keys(t).length>0?t:void 0}));c(o,{successLabel:`Created`})})};var $e={method:`DELETE`,path:t=>e`/accounts/${t.account_id}`};function et(e){return e.usage(`$0 accounts delete
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const tt={command:`delete`,describe:`Delete a specific account`,builder:et,handler:async e=>d({command:`accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,!await y({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let o=await u(`Deleting`,async()=>n.send($e,{account_id:i}));c(o,{successLabel:`Deleted`})})};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}`};function rt(e){return e.usage(`$0 accounts get
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Get information about a specific account that you are a member of.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Account Details`,builder:rt,handler:async e=>d({command:`accounts get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(nt,{account_id:i}));c(o,{successLabel:`Loaded`})})};function at(e){return e.usage(`$0 accounts list
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
List all accounts you have ownership or verified access to.`).option(`name`,{type:`string`,description:`Name of the account.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`list`,describe:`List Accounts`,builder:at,handler:async e=>d({command:`accounts list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let t={name:e.name,page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){l({command:`cf accounts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts`,pathParams:{},query:t,bodyKind:`none`});return}let n=await r(e),a=await u(`Loading`,async()=>n.send(i,t));c(a,{successLabel:`Loaded`})})};var st={method:`GET`,path:t=>e`/accounts/${t.account_id}/logs/audit/${t.id}/history`,query:[`action_time`,`since`,`before`,`direction`,`limit`,`cursor`],errors:{404:`NotFoundError`}};function ct(e){return e.usage("$0 accounts logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`history <id>`,describe:`Get resource change history from an account audit log entry (Version 2)`,builder:ct,handler:async e=>d({command:`accounts logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let n={action_time:e[`action-time`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){let t=await a();l({command:`cf accounts logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logs/audit/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/history`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(st,{account_id:o,id:e.id,...n}));c(d,{successLabel:`Loaded`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/logs/audit`,query:/* @__PURE__ */ `account_name,action_result,action_type,actor_context,actor_email,actor_id,actor_ip_address,actor_token_id,actor_token_name,actor_type,audit_log_id,id,raw_cf_ray_id,raw_method,raw_status_code,raw_uri,resource_id,resource_product,resource_type,resource_scope,product_category,zone_id,zone_name,account_name.not,action_result.not,action_type.not,actor_context.not,actor_email.not,actor_id.not,actor_ip_address.not,actor_token_id.not,actor_token_name.not,actor_type.not,audit_log_id.not,id.not,raw_cf_ray_id.not,raw_method.not,raw_status_code.not,raw_uri.not,resource_id.not,resource_product.not,resource_type.not,resource_scope.not,zone_id.not,zone_name.not,since,before,direction,limit,cursor`.split(`,`)};function dt(e){return e.usage(`$0 accounts logs audit list
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Gets a list of audit logs for an account.`).option(`account-name`,{type:`string`,description:`Filters by the account name.`}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`audit-log-id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.`}).option(`product-category`,{type:`string`,description:`Filters audit logs by one or more predefined product categories. Each product category expands into a curated set of resource_product values and is unioned with any explicit resource_product filter. Matched case-insensitively; unknown product categories return 400. Repeatable. Use the audit log product categories endpoint to discover the available values.`}).option(`zone-id`,{type:`string`,description:`Filters by the zone ID.`}).option(`zone-name`,{type:`string`,description:`Filters by the zone name associated with the change.`}).option(`account-name-not`,{type:`string`,description:`Filters out audit logs by the account name.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`audit-log-id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.`}).option(`zone-id-not`,{type:`string`,description:`Filters out audit logs by the zone ID.`}).option(`zone-name-not`,{type:`string`,description:`Filters out audit logs by the zone name associated with the change.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`list`,describe:`Get account audit logs (Version 2)`,builder:dt,handler:async e=>d({command:`accounts logs audit list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let n={account_name:e[`account-name`],action_result:e[`action-result`],action_type:e[`action-type`],actor_context:e[`actor-context`],actor_email:e[`actor-email`],actor_id:e[`actor-id`],actor_ip_address:e[`actor-ip-address`],actor_token_id:e[`actor-token-id`],actor_token_name:e[`actor-token-name`],actor_type:e[`actor-type`],audit_log_id:e[`audit-log-id`],id:e.id,raw_cf_ray_id:e[`raw-cf-ray-id`],raw_method:e[`raw-method`],raw_status_code:e[`raw-status-code`],raw_uri:e[`raw-uri`],resource_id:e[`resource-id`],resource_product:e[`resource-product`],resource_type:e[`resource-type`],resource_scope:e[`resource-scope`],product_category:e[`product-category`],zone_id:e[`zone-id`],zone_name:e[`zone-name`],"account_name.not":e[`account-name-not`],"action_result.not":e[`action-result-not`],"action_type.not":e[`action-type-not`],"actor_context.not":e[`actor-context-not`],"actor_email.not":e[`actor-email-not`],"actor_id.not":e[`actor-id-not`],"actor_ip_address.not":e[`actor-ip-address-not`],"actor_token_id.not":e[`actor-token-id-not`],"actor_token_name.not":e[`actor-token-name-not`],"actor_type.not":e[`actor-type-not`],"audit_log_id.not":e[`audit-log-id-not`],"id.not":e[`id-not`],"raw_cf_ray_id.not":e[`raw-cf-ray-id-not`],"raw_method.not":e[`raw-method-not`],"raw_status_code.not":e[`raw-status-code-not`],"raw_uri.not":e[`raw-uri-not`],"resource_id.not":e[`resource-id-not`],"resource_product.not":e[`resource-product-not`],"resource_type.not":e[`resource-type-not`],"resource_scope.not":e[`resource-scope-not`],"zone_id.not":e[`zone-id-not`],"zone_name.not":e[`zone-name-not`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await a();l({command:`cf accounts logs audit list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/audit`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(ut,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})};var pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/logs/audit/product_categories`};function mt(e){return e.usage(`$0 accounts logs audit product-categories
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Lists the available audit log product categories and the resource products each one expands to. Use these values with the product_category filter on the account audit logs endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`product-categories`,describe:`List account audit log product categories (Version 2)`,builder:_t,handler:async e=>d({command:`accounts logs audit product-categories`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts logs audit product-categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/audit/product_categories`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(gt,{account_id:i}));c(o,{successLabel:`Loaded`})})},yt={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(ft).command(ht).command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bt={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/members`,body:`json`};function xt(e){return e.usage(`$0 accounts members create
|
|
64
|
+
Lists the available audit log product categories and the resource products each one expands to. Use these values with the product_category filter on the account audit logs endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`product-categories`,describe:`List account audit log product categories (Version 2)`,builder:mt,handler:async e=>d({command:`accounts logs audit product-categories`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts logs audit product-categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/audit/product_categories`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(pt,{account_id:i}));c(o,{successLabel:`Loaded`})})},gt={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(lt).command(ft).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_t={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/members`,body:`json`};function vt(e){return e.usage(`$0 accounts members create
|
|
67
65
|
|
|
68
66
|
Add a user to the list of members for this account.`).option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`roles`,{type:`string`,array:!0,description:`Array of roles associated with this member.`}).option(`status`,{type:`string`,description:`Status of the member invitation. If not provided during creation, defaults to 'pending'.
|
|
69
67
|
Changing from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.
|
|
70
|
-
`,choices:[`accepted`,`pending`]}).coerce(`status`,e=>g(e,`status`,`text`)).option(`policies`,{type:`string`,description:`Array of policies associated with this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`roles`,[`policies`]).conflicts(`policies`,[`roles`])}const
|
|
68
|
+
`,choices:[`accepted`,`pending`]}).coerce(`status`,e=>g(e,`status`,`text`)).option(`policies`,{type:`string`,description:`Array of policies associated with this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`roles`,[`policies`]).conflicts(`policies`,[`roles`])}const yt={command:`create`,describe:`Add Member`,builder:vt,handler:async e=>d({command:`accounts members create`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/members`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({email:g(e.email,`email`,`text`),roles:e.roles,status:e.status,policies:f(e.policies,`policies`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(V,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}e.email===void 0&&(e.email=await _(`email`,`The contact email address of the user.`));let o=h({email:g(e.email,`email`,`text`),roles:e.roles,status:e.status,policies:f(e.policies,`policies`)}),d=await u(`Creating`,async()=>n.send(V,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var bt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/members/${t.member_id}`};function xt(e){return e.usage(`$0 accounts members delete <member-id>
|
|
71
69
|
|
|
72
|
-
Remove a member from an account.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
70
|
+
Remove a member from an account.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const St={command:`delete <member-id>`,describe:`Remove Member`,builder:xt,handler:async e=>d({command:`accounts members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,!await y({force:!!e.force,message:`Are you sure you want to remove this user from the account?`}))return;let o=await u(`Deleting`,async()=>n.send(bt,{account_id:i,member_id:e[`member-id`]}));c(o,{successLabel:`Deleted`})})};var Ct={method:`GET`,path:t=>e`/accounts/${t.account_id}/members/${t.member_id}`};function wt(e){return e.usage(`$0 accounts members get <member-id>
|
|
73
71
|
|
|
74
|
-
Get information about a specific member of an account.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
72
|
+
Get information about a specific member of an account.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tt={command:`get <member-id>`,describe:`Member Details`,builder:wt,handler:async e=>d({command:`accounts members get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(Ct,{account_id:i,member_id:e[`member-id`]}));c(o,{successLabel:`Loaded`})})};var Et={method:`GET`,path:t=>e`/accounts/${t.account_id}/members`,query:[`order`,`status`,`page`,`per_page`,`direction`]};function Dt(e){return e.usage(`$0 accounts members list
|
|
75
73
|
|
|
76
|
-
List all members of an account.`).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`user.first_name`,`user.last_name`,`user.email`,`status`]}).option(`status`,{type:`string`,description:`A member's status in the account.`,choices:[`accepted`,`pending`,`rejected`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
74
|
+
List all members of an account.`).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`user.first_name`,`user.last_name`,`user.email`,`status`]}).option(`status`,{type:`string`,description:`A member's status in the account.`,choices:[`accepted`,`pending`,`rejected`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ot={command:`list`,describe:`List Members`,builder:Dt,handler:async e=>d({command:`accounts members list`,classification:{safeFlags:[`order`,`status`,`direction`,`dry-run`]}},e,async()=>{let n={order:e.order,status:e.status,page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){let e=await a();l({command:`cf accounts members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/members`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(Et,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})};var H={method:`PUT`,path:t=>e`/accounts/${t.account_id}/members/${t.member_id}`,body:`json`};function kt(e){return e.usage(`$0 accounts members update <member-id>
|
|
77
75
|
|
|
78
|
-
Modify an account member.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`roles`,{type:`string`,description:`Roles assigned to this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`policies`,{type:`string`,description:`Array of policies associated with this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`roles`,[`policies`]).conflicts(`policies`,[`roles`])}const
|
|
76
|
+
Modify an account member.`).positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`roles`,{type:`string`,description:`Roles assigned to this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`policies`,{type:`string`,description:`Array of policies associated with this member. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`roles`,[`policies`]).conflicts(`policies`,[`roles`])}const At={command:`update <member-id>`,describe:`Update Member`,builder:kt,handler:async e=>d({command:`accounts members update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"member-id":String(e[`member-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({roles:f(e.roles,`roles`),policies:f(e.policies,`policies`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(H,{body:t,account_id:i,member_id:e[`member-id`]}));c(r,{successLabel:`Updated`});return}let o=h({roles:f(e.roles,`roles`),policies:f(e.policies,`policies`)}),d=await u(`Updating`,async()=>n.send(H,{body:o,account_id:i,member_id:e[`member-id`]}));c(d,{successLabel:`Updated`})})},jt={command:`members`,describe:`Operations for members`,builder:e=>e.command(yt).command(St).command(Tt).command(Ot).command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/move`,body:`json`};function Mt(e){return e.usage(`$0 accounts move
|
|
79
77
|
|
|
80
|
-
Move an account into a destination organization, either assigning a standalone account to an organization or moving it between organizations in the same hierarchy. Availability depends on the organization's capabilities.`).option(`destination-organization-id`,{type:`string`,description:`The ID of the organization to move the account into.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const
|
|
78
|
+
Move an account into a destination organization, either assigning a standalone account to an organization or moving it between organizations in the same hierarchy. Availability depends on the organization's capabilities.`).option(`destination-organization-id`,{type:`string`,description:`The ID of the organization to move the account into.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const Nt={command:`move`,describe:`Move account to organization`,builder:Mt,handler:async e=>d({command:`accounts move`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({destination_organization_id:g(e[`destination-organization-id`],`destination-organization-id`,`text`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(U,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await _(`destination-organization-id`,`The ID of the organization to move the account into.`));let o=h({destination_organization_id:g(e[`destination-organization-id`],`destination-organization-id`,`text`)}),d=await u(`Creating`,async()=>n.send(U,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var Pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/organizations`};function Ft(e){return e.usage(`$0 accounts organization list
|
|
81
79
|
|
|
82
|
-
Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
80
|
+
Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const It={command:`list`,describe:`List account organizations`,builder:Ft,handler:async e=>d({command:`accounts organization list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(Pt,{account_id:i}));c(o,{successLabel:`Loaded`})})},Lt={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(It).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rt={method:`GET`,path:t=>e`/accounts/${t.account_id}/profile`};function zt(e){return e.usage(`$0 accounts profile get
|
|
83
81
|
|
|
84
|
-
Retrieves the business profile (name, email, phone, address, and external metadata) associated with this account's parent organization customer record. Profiles can be shared across accounts and organizations. Only available to members of an organization that contains the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
82
|
+
Retrieves the business profile (name, email, phone, address, and external metadata) associated with this account's parent organization customer record. Profiles can be shared across accounts and organizations. Only available to members of an organization that contains the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`get`,describe:`Get account profile`,builder:zt,handler:async e=>d({command:`accounts profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(Rt,{account_id:i}));c(o,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/profile`,body:`json`,response:!1};function Vt(e){return e.usage(`$0 accounts profile update
|
|
85
83
|
|
|
86
|
-
Updates the business profile (name, email, phone, address, and external metadata) associated with this account's parent organization customer record. Changes apply to every account and organization sharing that profile. Omitted or empty fields are left unchanged. Only available to members of an organization that contains the account.`).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
|
|
84
|
+
Updates the business profile (name, email, phone, address, and external metadata) associated with this account's parent organization customer record. Changes apply to every account and organization sharing that profile. Omitted or empty fields are left unchanged. Only available to members of an organization that contains the account.`).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 Ht={command:`update`,describe:`Update account profile`,builder:Vt,handler:async e=>d({command:`accounts profile update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({business_address:g(e[`business-address`],`business-address`,`text`),business_email:g(e[`business-email`],`business-email`,`text`),business_name:g(e[`business-name`],`business-name`,`text`),business_phone:g(e[`business-phone`],`business-phone`,`text`),external_metadata:g(e[`external-metadata`],`external-metadata`,`text`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(W,{body:t,account_id:i}));c(r,{successLabel:`Updated`});return}e[`business-address`]===void 0&&(e[`business-address`]=await _(`business-address`,`The business_address field`)),e[`business-email`]===void 0&&(e[`business-email`]=await _(`business-email`,`The business_email field`)),e[`business-name`]===void 0&&(e[`business-name`]=await _(`business-name`,`The business_name field`)),e[`business-phone`]===void 0&&(e[`business-phone`]=await _(`business-phone`,`The business_phone field`)),e[`external-metadata`]===void 0&&(e[`external-metadata`]=await _(`external-metadata`,`The external_metadata field`));let o=h({business_address:g(e[`business-address`],`business-address`,`text`),business_email:g(e[`business-email`],`business-email`,`text`),business_name:g(e[`business-name`],`business-name`,`text`),business_phone:g(e[`business-phone`],`business-phone`,`text`),external_metadata:g(e[`external-metadata`],`external-metadata`,`text`)}),d=await u(`Updating`,async()=>n.send(W,{body:o,account_id:i}));c(d,{successLabel:`Updated`})})},Ut={command:`profile`,describe:`View and manage the profile for a Cloudflare account`,builder:e=>e.command(Bt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/subscriptions/cancel-downgrade`,body:`json`};function Wt(e){return e.usage(`$0 accounts subscriptions cancel-delayed-downgrade
|
|
87
85
|
|
|
88
|
-
Cancels pending delayed downgrades for the specified subscriptions.`).option(`subscription-ids`,{type:`string`,array:!0,description:`List of subscription identifiers to cancel downgrades for.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
86
|
+
Cancels pending delayed downgrades for the specified subscriptions.`).option(`subscription-ids`,{type:`string`,array:!0,description:`List of subscription identifiers to cancel downgrades for.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Gt={command:`cancel-delayed-downgrade`,describe:`Cancel Delayed Downgrade`,builder:Wt,handler:async e=>d({command:`accounts subscriptions cancel-delayed-downgrade`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts subscriptions cancel-delayed-downgrade`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/subscriptions/cancel-downgrade`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({subscription_ids:e[`subscription-ids`]}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(G,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}let o=h({subscription_ids:e[`subscription-ids`]}),d=await u(`Creating`,async()=>n.send(G,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}/cancel-reason`,body:`json`};function Kt(e){return e.usage(`$0 accounts subscriptions create-cancel-reason <subscription-identifier>
|
|
89
87
|
|
|
90
|
-
Records a cancellation reason for an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`other`,{type:`string`,description:`Additional cancellation details.`}).option(`reason-code`,{type:`string`,array:!0,description:`The cancellation reason codes.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
88
|
+
Records a cancellation reason for an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`other`,{type:`string`,description:`Additional cancellation details.`}).option(`reason-code`,{type:`string`,array:!0,description:`The cancellation reason codes.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const qt={command:`create-cancel-reason <subscription-identifier>`,describe:`Create Cancel Reason`,builder:Kt,handler:async e=>d({command:`accounts subscriptions create-cancel-reason`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts subscriptions create-cancel-reason`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/subscriptions/${e[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(e[`subscription-identifier`]))}/cancel-reason`,pathParams:{"subscription-identifier":String(e[`subscription-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?h({other:g(e.other,`other`,`text`),reason_code:e[`reason-code`]}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(K,{body:t,account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(r,{successLabel:`Created`});return}let o=h({other:g(e.other,`other`,`text`),reason_code:e[`reason-code`]}),d=await u(`Creating`,async()=>n.send(K,{body:o,account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(d,{successLabel:`Created`})})};var q={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/subscriptions`,body:`json`};function Jt(e){return e.usage(`$0 accounts subscriptions create
|
|
91
89
|
|
|
92
|
-
Creates an account or zone subscription.`).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).coerce(`frequency`,e=>g(e,`frequency`,`text`)).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
90
|
+
Creates an account or zone subscription.`).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).coerce(`frequency`,e=>g(e,`frequency`,`text`)).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Yt={command:`create`,describe:`Create Subscription`,builder:Jt,handler:async e=>d({command:`accounts subscriptions create`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;l({command:`cf accounts subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/subscriptions`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?h({app:{install_id:g(e[`app-install-id`],`app-install-id`,`text`)},component_values:f(e[`component-values`],`component-values`),frequency:e.frequency,rate_plan:{currency:g(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:g(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:g(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:g(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}):p(e.body)});return}let n=await r(e),i=e.zone===void 0?`accounts`:`zones`,d=i===`zones`?await o({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await s();if(i===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(q,{body:t,account_or_zone:i,account_or_zone_id:d}));c(r,{successLabel:`Created`});return}let m=h({app:{install_id:g(e[`app-install-id`],`app-install-id`,`text`)},component_values:f(e[`component-values`],`component-values`),frequency:e.frequency,rate_plan:{currency:g(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:g(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:g(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:g(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}),_=await u(`Creating`,async()=>n.send(q,{body:m,account_or_zone:i,account_or_zone_id:d}));c(_,{successLabel:`Created`})})};var Xt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}`};function Zt(e){return e.usage(`$0 accounts subscriptions delete <subscription-identifier>
|
|
93
91
|
|
|
94
|
-
Deletes an account's subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
92
|
+
Deletes an account's subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Qt={command:`delete <subscription-identifier>`,describe:`Delete Subscription`,builder:Zt,handler:async e=>d({command:`accounts subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/subscriptions/${e[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(e[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(e[`subscription-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,!await y({force:!!e.force}))return;let o=await u(`Deleting`,async()=>n.send(Xt,{account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(o,{successLabel:`Deleted`})})};var $t={method:`GET`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}`,errors:{404:`NotFoundError`}};function en(e){return e.usage(`$0 accounts subscriptions get-by-identifier <subscription-identifier>
|
|
95
93
|
|
|
96
|
-
Gets an account subscription by identifier.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
94
|
+
Gets an account subscription by identifier.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tn={command:`get-by-identifier <subscription-identifier>`,describe:`Get Subscription`,builder:en,handler:async e=>d({command:`accounts subscriptions get-by-identifier`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts subscriptions get-by-identifier`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/subscriptions/${e[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(e[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(e[`subscription-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send($t,{account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(o,{successLabel:`Loaded`})})};var nn={method:`GET`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}/cancel-reason`};function rn(e){return e.usage(`$0 accounts subscriptions get-cancel-reason <subscription-identifier>
|
|
97
95
|
|
|
98
|
-
Gets the cancellation reason for an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
96
|
+
Gets the cancellation reason for an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const an={command:`get-cancel-reason <subscription-identifier>`,describe:`Get Cancel Reason`,builder:rn,handler:async e=>d({command:`accounts subscriptions get-cancel-reason`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts subscriptions get-cancel-reason`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/subscriptions/${e[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(e[`subscription-identifier`]))}/cancel-reason`,pathParams:{"subscription-identifier":String(e[`subscription-identifier`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(nn,{account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(o,{successLabel:`Loaded`})})};var on={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/subscriptions`};function sn(e){return e.usage(`$0 accounts subscriptions get
|
|
99
97
|
|
|
100
|
-
Lists all of an account or zone's subscriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
98
|
+
Lists all of an account or zone's subscriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cn={command:`get`,describe:`List Subscriptions`,builder:sn,handler:async e=>d({command:`accounts subscriptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await a():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;l({command:`cf accounts subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/subscriptions`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),i=e.zone===void 0?`accounts`:`zones`,d=i===`zones`?await o({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await s();i===`zones`?e.zoneId=d:e.accountId=d;let f=await u(`Loading`,async()=>n.send(on,{account_or_zone:i,account_or_zone_id:d}));c(f,{successLabel:`Loaded`})})};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}`,body:`json`};function ln(e){return e.usage(`$0 accounts subscriptions update <subscription-identifier>
|
|
101
99
|
|
|
102
|
-
Updates an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).coerce(`frequency`,e=>g(e,`frequency`,`text`)).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
100
|
+
Updates an account subscription.`).positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).coerce(`frequency`,e=>g(e,`frequency`,`text`)).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const un={command:`update <subscription-identifier>`,describe:`Update Subscription`,builder:ln,handler:async e=>d({command:`accounts subscriptions update`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/subscriptions/${e[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(e[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(e[`subscription-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?h({app:{install_id:g(e[`app-install-id`],`app-install-id`,`text`)},component_values:f(e[`component-values`],`component-values`),frequency:e.frequency,rate_plan:{currency:g(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:g(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:g(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:g(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(J,{body:t,account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(r,{successLabel:`Updated`});return}let o=h({app:{install_id:g(e[`app-install-id`],`app-install-id`,`text`)},component_values:f(e[`component-values`],`component-values`),frequency:e.frequency,rate_plan:{currency:g(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:g(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:g(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:g(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}),d=await u(`Updating`,async()=>n.send(J,{body:o,account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(d,{successLabel:`Updated`})})},dn={command:`subscriptions`,describe:`View and manage plan subscriptions attached to this account`,builder:e=>e.command(Gt).command(Yt).command(qt).command(Qt).command(cn).command(tn).command(an).command(un).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/tokens`,body:`json`};function fn(e){return e.usage(`$0 accounts tokens create
|
|
103
101
|
|
|
104
|
-
Create a new Account Owned API token.`).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
102
|
+
Create a new Account Owned API token.`).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pn={command:`create`,describe:`Create Token`,builder:fn,handler:async e=>d({command:`accounts tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:g(e[`expires-on`],`expires-on`,`text`),name:g(e.name,`name`,`text`),not_before:g(e[`not-before`],`not-before`,`text`),policies:f(e.policies,`policies`)}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Creating`,async()=>n.send(Y,{body:t,account_id:i}));c(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await _(`name`,`Token name.`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let o=h({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:g(e[`expires-on`],`expires-on`,`text`),name:g(e.name,`name`,`text`),not_before:g(e[`not-before`],`not-before`,`text`),policies:f(e.policies,`policies`)}),d=await u(`Creating`,async()=>n.send(Y,{body:o,account_id:i}));c(d,{successLabel:`Created`})})};var mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}`};function hn(e){return e.usage(`$0 accounts tokens delete <token-id>
|
|
105
103
|
|
|
106
|
-
Destroy an Account Owned API token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
104
|
+
Destroy an Account Owned API token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const gn={command:`delete <token-id>`,describe:`Delete Token`,builder:hn,handler:async e=>d({command:`accounts tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,!await y({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let o=await u(`Deleting`,async()=>n.send(mn,{account_id:i,token_id:e[`token-id`]}));c(o,{successLabel:`Deleted`})})};var _n={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}`};function vn(e){return e.usage(`$0 accounts tokens get <token-id>
|
|
107
105
|
|
|
108
|
-
Get information about a specific Account Owned API token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
106
|
+
Get information about a specific Account Owned API token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yn={command:`get <token-id>`,describe:`Token Details`,builder:vn,handler:async e=>d({command:`accounts tokens get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(_n,{account_id:i,token_id:e[`token-id`]}));c(o,{successLabel:`Loaded`})})};var bn={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens`,query:[`page`,`per_page`,`direction`,`include_expired`]};function xn(e){return e.usage("$0 accounts tokens list\n\nList Account Owned API tokens created for this account. Callers with `com.cloudflare.api.account.token.list_self` permission only receive tokens they created. Results include active, disabled, and recently-expired tokens when `include_expired` is set to true.").option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`include-expired`,{type:`boolean`,description:`When true, includes recently-expired tokens in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sn={command:`list`,describe:`List Tokens`,builder:xn,handler:async e=>d({command:`accounts tokens list`,classification:{safeFlags:[`direction`,`include-expired`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],direction:e.direction,include_expired:e[`include-expired`]};if(e.dryRun){let e=await a();l({command:`cf accounts tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(bn,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})};var Cn={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens/permission_groups`,query:[`name`,`scope`]};function wn(e){return e.usage(`$0 accounts tokens permission-groups list
|
|
109
107
|
|
|
110
108
|
Find all available permission groups for Account Owned API Tokens. Each permission group indicates whether the caller can select it when creating a token. Token creation performs the authoritative permission check.`).option(`name`,{type:`string`,description:`Filter by the name of the permission group.
|
|
111
109
|
The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
|
|
112
|
-
The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
110
|
+
The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tn={command:`list`,describe:`List Permission Groups`,builder:wn,handler:async e=>d({command:`accounts tokens permission-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={name:e.name,scope:e.scope};if(e.dryRun){let e=await a();l({command:`cf accounts tokens permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/permission_groups`,pathParams:{},query:n,bodyKind:`none`});return}let i=await r(e),o=e.local?t:await s();e.accountId=o;let d=await u(`Loading`,async()=>i.send(Cn,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})},En={command:`permission-groups`,describe:`Operations for tokens.permission-groups`,builder:e=>e.command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dn={method:`PUT`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}/value`};function On(e){return e.usage(`$0 accounts tokens roll <token-id>
|
|
113
111
|
|
|
114
|
-
Roll the Account Owned API token secret.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
112
|
+
Roll the Account Owned API token secret.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const kn={command:`roll <token-id>`,describe:`Roll Token`,builder:On,handler:async e=>d({command:`accounts tokens roll`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts tokens roll`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}/value`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,!await y({force:!!e.force,message:`Rolling this token will invalidate the current secret and generate a new one. Any integrations using the current secret will stop working.`}))return;let o=await u(`Deleting`,async()=>n.send(Dn,{account_id:i,token_id:e[`token-id`]}));c(o,{successLabel:`Deleted`})})};var X={method:`PUT`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}`,body:`json`};function An(e){return e.usage(`$0 accounts tokens update <token-id>
|
|
115
113
|
|
|
116
|
-
Update an existing token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).coerce(`status`,e=>g(e,`status`,`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
|
|
114
|
+
Update an existing token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).coerce(`status`,e=>g(e,`status`,`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 jn={command:`update <token-id>`,describe:`Update Token`,builder:An,handler:async e=>d({command:`accounts tokens update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:g(e[`expires-on`],`expires-on`,`text`),name:g(e.name,`name`,`text`),not_before:g(e[`not-before`],`not-before`,`text`),policies:f(e.policies,`policies`),status:e.status}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(X,{body:t,account_id:i,token_id:e[`token-id`]}));c(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await _(`name`,`Token name.`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let o=h({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:g(e[`expires-on`],`expires-on`,`text`),name:g(e.name,`name`,`text`),not_before:g(e[`not-before`],`not-before`,`text`),policies:f(e.policies,`policies`),status:e.status}),d=await u(`Updating`,async()=>n.send(X,{body:o,account_id:i,token_id:e[`token-id`]}));c(d,{successLabel:`Updated`})})};var Mn={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens/verify`};function Nn(e){return e.usage(`$0 accounts tokens verify
|
|
117
115
|
|
|
118
|
-
Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
116
|
+
Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pn={command:`verify`,describe:`Verify Token`,builder:Nn,handler:async e=>d({command:`accounts tokens verify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tokens/verify`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(Mn,{account_id:i}));c(o,{successLabel:`Loaded`})})},Fn={command:`tokens`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(pn).command(gn).command(yn).command(Sn).command(kn).command(jn).command(Pn).command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/settings/transformations`};function In(e){return e.usage(`$0 accounts transformations list
|
|
119
117
|
|
|
120
|
-
Returns a list of Image Resizing configurations across all zones for the account. This endpoint is useful for retrieving the transformations (image_resizing) state for all zones belonging to an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
118
|
+
Returns a list of Image Resizing configurations across all zones for the account. This endpoint is useful for retrieving the transformations (image_resizing) state for all zones belonging to an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ln={command:`list`,describe:`List Image Resizing configurations for account`,builder:In,handler:async e=>d({command:`accounts transformations list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts transformations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/settings/transformations`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(Z,{account_id:i}));c(o,{successLabel:`Loaded`})})},Rn={command:`transformations`,describe:`Operations for transformations`,builder:e=>e.command(Ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}`,body:`json`};function zn(e){return e.usage(`$0 accounts update
|
|
121
119
|
|
|
122
120
|
Update an existing account.`).option(`id`,{type:`string`,description:`Identifier`}).option(`name`,{type:`string`,description:`Account name`}).option(`settings-abuse-contact-email`,{type:`string`,description:`Sets an abuse contact email to notify for abuse reports.`}).option(`settings-enforce-twofactor`,{type:`boolean`,description:`Indicates whether membership in this account requires that
|
|
123
|
-
Two-Factor Authentication is enabled`}).option(`type`,{type:`string`,description:`The type field`,choices:[`standard`,`enterprise`]}).coerce(`type`,e=>g(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
121
|
+
Two-Factor Authentication is enabled`}).option(`type`,{type:`string`,description:`The type field`,choices:[`standard`,`enterprise`]}).coerce(`type`,e=>g(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bn={command:`update`,describe:`Update Account`,builder:zn,handler:async e=>d({command:`accounts update`,classification:{safeFlags:[`settings-enforce-twofactor`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({id:g(e.id,`id`,`text`),name:g(e.name,`name`,`text`),settings:{abuse_contact_email:g(e[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`),enforce_twofactor:e[`settings-enforce-twofactor`]},type:e.type}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send(Q,{body:t,account_id:i}));c(r,{successLabel:`Updated`});return}e.id===void 0&&(e.id=await _(`id`,`Identifier`)),e.name===void 0&&(e.name=await _(`name`,`Account name`)),e.type===void 0&&(e.type=await v(`type`,`The type field`,[`standard`,`enterprise`]));let o=h({id:g(e.id,`id`,`text`),name:g(e.name,`name`,`text`),settings:{abuse_contact_email:g(e[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`),enforce_twofactor:e[`settings-enforce-twofactor`]},type:e.type}),d=await u(`Updating`,async()=>n.send(Q,{body:o,account_id:i}));c(d,{successLabel:`Updated`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/settings/ut-billing`,body:`json`,constants:{value:`on`}};function Vn(e){return e.usage(`$0 accounts ut-billing edit
|
|
124
122
|
|
|
125
123
|
Updates the Unique Transformations billing configuration for an account. When enabled, billing data is directed to the Transformations pipeline. Note: setting the value to "off" is not permitted once enabled.`).option(`value`,{type:`string`,description:`Enables Unique Transformations billing for the account.
|
|
126
124
|
Note: once enabled, this setting cannot be set back to "off".
|
|
127
|
-
`,choices:[`on`]}).coerce(`value`,e=>g(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
|
|
125
|
+
`,choices:[`on`]}).coerce(`value`,e=>g(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 Hn={command:`edit`,describe:`Change Unique Transformations billing setting`,builder:Vn,handler:async e=>d({command:`accounts ut-billing edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();l({command:`cf accounts ut-billing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/settings/ut-billing`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({value:e.value}):p(e.body)});return}let n=await r(e),i=e.local?t:await s();if(e.accountId=i,e.body){let t=p(e.body),r=await u(`Updating`,async()=>n.send($,{body:t,account_id:i}));c(r,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await v(`value`,`Enables Unique Transformations billing for the account. Note: once enabled, this setting cannot be set back to "off". `,[`on`]));let o=h({value:e.value}),d=await u(`Updating`,async()=>n.send($,{body:o,account_id:i}));c(d,{successLabel:`Updated`})})};var Un={method:`GET`,path:t=>e`/accounts/${t.account_id}/settings/ut-billing`};function Wn(e){return e.usage(`$0 accounts ut-billing get
|
|
128
126
|
|
|
129
|
-
Retrieves the Unique Transformations billing configuration for an account. When enabled, billing data is directed to the Transformations pipeline.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
127
|
+
Retrieves the Unique Transformations billing configuration for an account. When enabled, billing data is directed to the Transformations pipeline.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gn={command:`get`,describe:`Get Unique Transformations billing setting`,builder:Wn,handler:async e=>d({command:`accounts ut-billing get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();l({command:`cf accounts ut-billing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/settings/ut-billing`,pathParams:{},bodyKind:`none`});return}let n=await r(e),i=e.local?t:await s();e.accountId=i;let o=await u(`Loading`,async()=>n.send(Un,{account_id:i}));c(o,{successLabel:`Loaded`})})},Kn={command:`ut-billing`,describe:`Operations for ut-billing`,builder:e=>e.command(Hn).command(Gn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},qn={command:`accounts`,describe:`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,builder:e=>e.command(Qe).command(tt).command(it).command(ot).command(Nt).command(Bn).command(_e).command(Ue).command(Xe).command(_t).command(jt).command(Lt).command(Ut).command(dn).command(Fn).command(Rn).command(Kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{qn as default};
|