cf 1.0.0-beta.24 → 1.0.0-beta.25
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 +478 -141
- package/dist/_meta/hand-written-commands.json +44 -0
- package/dist/_meta/schemas.json +254 -2
- package/dist/{abuse-reports-CTOO4FJ4.mjs → abuse-reports-BIS9MZn7.mjs} +3 -3
- package/dist/{access-DFGLlXpy.mjs → access-__sFDSFL.mjs} +1 -1
- package/dist/{accounts-C-wpV8Az.mjs → accounts-CmggwRjh.mjs} +36 -34
- package/dist/{acm-thIt17mv.mjs → acm-AAhRZUAU.mjs} +1 -1
- package/dist/{addressing-D7VI7-Oi.mjs → addressing-DVeJNPZc.mjs} +1 -1
- package/dist/{agent-memory-duLTH8pl.mjs → agent-memory-DQhWO6sc.mjs} +1 -1
- package/dist/{ai-ctIjDCq0.mjs → ai-CULO9sno.mjs} +3 -3
- package/dist/{ai-audit-CjhuS21p.mjs → ai-audit-udn4HF34.mjs} +1 -1
- package/dist/{ai-gateway-B1TIw7wl.mjs → ai-gateway-Bm2MMdec.mjs} +3 -3
- package/dist/{ai-search-DUQBnOWH.mjs → ai-search-GRN_gXgU.mjs} +1 -1
- package/dist/{ai-security-bdABwEIR.mjs → ai-security-DXy9ht-9.mjs} +2 -2
- package/dist/{alerting-I_KErGZy.mjs → alerting-CssnaN2i.mjs} +1 -1
- package/dist/{analytics-DGxcDAWu.mjs → analytics-BVo7Ax0w.mjs} +1 -1
- package/dist/{analytics-engine-DNNokw1O.mjs → analytics-engine-BBd0Bydx.mjs} +1 -1
- package/dist/{api-security-CsPrJ-Xw.mjs → api-security-C-D9OKtH.mjs} +3 -3
- package/dist/{argo-BhNmRYk5.mjs → argo-DSziwzvA.mjs} +1 -1
- package/dist/{artifacts-DRo8KadB.mjs → artifacts-nVMgn4dn.mjs} +1 -1
- package/dist/{audit-logs-CzxDyTbx.mjs → audit-logs-DIZ5oA_y.mjs} +1 -1
- package/dist/auth-Bls_1yRW.mjs +2 -0
- package/dist/{auth-pbuzyz4C.mjs → auth-CB9wjyad.mjs} +1 -1
- package/dist/auth-JsvLULHA.mjs +7 -0
- package/dist/{auth-token-BcIV7k1B.mjs → auth-token-BAgw7kYP.mjs} +1 -1
- package/dist/{autoconfig-CXcy-e1R.mjs → autoconfig-CajkMb3B.mjs} +19 -11
- package/dist/{basin-catalog-DoTn8zvi.mjs → basin-catalog-BRvGeKm3.mjs} +9 -9
- package/dist/{billing-CMbLzZV0.mjs → billing-BhPoqyKC.mjs} +1 -1
- package/dist/{blocks-DmOx-xEv.mjs → blocks-D2tE8dp2.mjs} +1 -1
- package/dist/{bot-management-CJs5WwAW.mjs → bot-management-BfjX5DuH.mjs} +1 -1
- package/dist/{botnet-feed-DeF7P5lI.mjs → botnet-feed-VOL5P4s3.mjs} +1 -1
- package/dist/{brand-protection-dx_B8OWa.mjs → brand-protection-CSVHQ9Pt.mjs} +2 -2
- package/dist/{browser-run-fRn9ItYu.mjs → browser-run-cxOd2cZE.mjs} +1 -1
- package/dist/{build-CCepbVuJ.mjs → build-BfkzV5_c.mjs} +1 -1
- package/dist/build-DCdLWwOg.mjs +2 -0
- package/dist/{builds-5YhQ_zIm.mjs → builds-y5BQCJ81.mjs} +1 -1
- package/dist/{cache-WQyxt7O5.mjs → cache-Bvr988Hj.mjs} +1 -1
- package/dist/cf-DgLg6Hop.mjs +18 -0
- package/dist/{chunk-3PJ54H4K-C8sxQzhB.mjs → chunk-3PJ54H4K-CbRAWQWI.mjs} +1 -1
- package/dist/{chunk-DSGVRFIS-CP2xC0bc.mjs → chunk-DSGVRFIS-Dq2PrGsi.mjs} +1 -1
- package/dist/{cli-CgkhNdjb.mjs → cli-BTxJfFus.mjs} +1 -1
- package/dist/{client-side-security-COuAb7BM.mjs → client-side-security-CFmO0uz9.mjs} +1 -1
- package/dist/{cloud-connector-D1gjX0Dx.mjs → cloud-connector-CtwPdFBa.mjs} +1 -1
- package/dist/{cloudflared-FEg1GxHT.mjs → cloudflared-DPkNN1Qv.mjs} +1 -1
- package/dist/{cloudforce-one-BmXgL6kB.mjs → cloudforce-one-DHrMaxnU.mjs} +58 -58
- package/dist/{command-BfoLlrr1.mjs → command-6_Ms3TZv.mjs} +1 -1
- package/dist/{command-DrdxR1tJ.mjs → command-BWyx7dNO.mjs} +1 -1
- package/dist/{command-qhfkede5.mjs → command-BXCk1OsI.mjs} +1 -1
- package/dist/{command-WyIFe__L.mjs → command-CCDzJjIB.mjs} +1 -1
- package/dist/{command-BG9JYUHo.mjs → command-CDYTsmxe.mjs} +1 -1
- package/dist/{command-Dsi4sM8D.mjs → command-CXwKBbj9.mjs} +1 -1
- package/dist/{command-8hWrCCy6.mjs → command-ClneauMx.mjs} +1 -1
- package/dist/{command-BJFKdqVc.mjs → command-CmK8-DJ9.mjs} +1 -1
- package/dist/{command-BaIY4UuC.mjs → command-Ct3tf-P5.mjs} +1 -1
- package/dist/{command-hh8rEbH4.mjs → command-DPOjEs1B.mjs} +1 -1
- package/dist/{command-D3E7d8E7.mjs → command-DqWBPiew.mjs} +1 -1
- package/dist/{command-BXPssGfS.mjs → command-YFWLEK8W.mjs} +1 -1
- package/dist/{command-CA6yIa17.mjs → command-ckixJeTm.mjs} +1 -1
- package/dist/{command-B_Fxpr5v.mjs → command-lJJ7sEZe.mjs} +1 -1
- package/dist/{completions-BshG3sAO.mjs → completions-B1rYgw_a.mjs} +1 -1
- package/dist/{connector-interrupts-pNU4QmsW.mjs → connector-interrupts-DecTdK6X.mjs} +1 -1
- package/dist/{connector-telemetry-events-BpRPtTdD.mjs → connector-telemetry-events-wePxPACj.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-pNfynA2r.mjs → connector-telemetry-snapshots-D8sXR1qx.mjs} +1 -1
- package/dist/{connectors-CiWTAGHh.mjs → connectors-C-6RQ_Q1.mjs} +1 -1
- package/dist/{containers-IBtaInTL.mjs → containers-C_byVTZF.mjs} +193 -193
- package/dist/{containers-Dvq0NjQg.mjs → containers-D65Gpj9Q.mjs} +2 -2
- package/dist/{content-scan-B69hOyhb.mjs → content-scan-DbIDQ-Yu.mjs} +1 -1
- package/dist/{context-BryBS1zQ.mjs → context-DCon1tRZ.mjs} +1 -1
- package/dist/{cps-DLgWaZMT.mjs → cps-DGLmzCzp.mjs} +1 -1
- package/dist/{csam-scanner-D1928b81.mjs → csam-scanner-R7Ih-Dnw.mjs} +1 -1
- package/dist/{custom-csrs-DrxWBjmx.mjs → custom-csrs-D0RnVoJ7.mjs} +1 -1
- package/dist/{custom-hostnames-BP1pxK1F.mjs → custom-hostnames-BFWR-tR_.mjs} +1 -1
- package/dist/{custom-nameservers-5DJLY479.mjs → custom-nameservers-Dn_9Ssti.mjs} +1 -1
- package/dist/{custom-pages-CNAsOY9a.mjs → custom-pages-HqIQcb77.mjs} +1 -1
- package/dist/{d1-Dge80Qgq.mjs → d1-CopIY9RT.mjs} +2 -2
- package/dist/{delegate-CBKb0nov.mjs → delegate-CTj0dYET.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CR5b7uhB.mjs → deploy-BVTA83rN.mjs} +1 -1
- package/dist/{deploy-context-D51tgJGI.mjs → deploy-context-CO8ZSRwx.mjs} +1 -1
- package/dist/{deploy-input-em95cFc7.mjs → deploy-input-PhKRxa_2.mjs} +1 -1
- package/dist/{dev-BczBHbpj.mjs → dev-CM5GLHNn.mjs} +1 -1
- package/dist/{diagnostics-BKKinCge.mjs → diagnostics-DPjl0aCm.mjs} +1 -1
- package/dist/{dist-D5YYi2LO.mjs → dist-ataVE8ob.mjs} +3 -3
- package/dist/{dls-DU4HnxED.mjs → dls-BLTIVlbh.mjs} +1 -1
- package/dist/{dns-BzdH3geY.mjs → dns-DkqVq-nB.mjs} +60 -58
- package/dist/{dns-firewall-puq_86Wd.mjs → dns-firewall-D1bb1byu.mjs} +1 -1
- package/dist/{docs-AWb7X2VX.mjs → docs-tOv_OllI.mjs} +1 -1
- package/dist/{durable-objects-Dg6XPcsB.mjs → durable-objects-OJhns_to.mjs} +1 -1
- package/dist/{email-auth-DXR0NU9R.mjs → email-auth-BbsIBNlu.mjs} +1 -1
- package/dist/{email-domains-B00mAtjT.mjs → email-domains-pWZi1M4q.mjs} +1 -1
- package/dist/{email-routing-Cm19q9hA.mjs → email-routing-DnitWE1A.mjs} +1 -1
- package/dist/{email-security-CFKcS-DM.mjs → email-security-DiWtb7cx.mjs} +2 -2
- package/dist/{email-sending-B3xSoKcC.mjs → email-sending-DuDjXykw.mjs} +1 -1
- package/dist/{errors-CIQDUrWg.mjs → errors-CCFmptqJ.mjs} +1 -1
- package/dist/{field-extractors-Csz8QknP.mjs → field-extractors-DNNnkBZH.mjs} +1 -1
- package/dist/{firewall-C8FW0Nb2.mjs → firewall-C7eZRNVF.mjs} +22 -16
- package/dist/{flagship-v-bGZ_U-.mjs → flagship-BczjsrJ5.mjs} +1 -1
- package/dist/{fraud-VvfL2I5a.mjs → fraud-wE0UM2SM.mjs} +1 -1
- package/dist/{google-tag-gateway-DF6fS2MQ.mjs → google-tag-gateway-6mvtxcJK.mjs} +1 -1
- package/dist/{healthchecks-D3p3E4WL.mjs → healthchecks-aIB3DebS.mjs} +1 -1
- package/dist/{hyperdrive-DopYL1dK.mjs → hyperdrive-DHRP8SJS.mjs} +1 -1
- package/dist/{iam-cIfyshlf.mjs → iam-6t7-ScrS.mjs} +1 -1
- package/dist/{images-BR5fP_6r.mjs → images-CLgvxd0t.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-JXRQoqGP.mjs → init-B_DBTMXU.mjs} +1 -1
- package/dist/{intel-BvNrrM7V.mjs → intel-jnoIVlYG.mjs} +2 -2
- package/dist/{interactive-DOWEcR6_.mjs → interactive-1g0dnrA8.mjs} +1 -1
- package/dist/{internal-DcnAVlpA.mjs → internal-Ba3b-Z8J.mjs} +1 -1
- package/dist/{ips-BUEIuhhw.mjs → ips-CQ4gFfex.mjs} +1 -1
- package/dist/{k2-Dm4LvAhL.mjs → k2-Bsm6rzNX.mjs} +1 -1
- package/dist/{kv-7oD-JIak.mjs → kv-DQfnNE-w.mjs} +1 -1
- package/dist/{lazy-command-CD1nuS38.mjs → lazy-command-DjGzxiUT.mjs} +1 -1
- package/dist/{leaked-credential-checks-B6s8hUYU.mjs → leaked-credential-checks-CaqjG3Oz.mjs} +1 -1
- package/dist/list-4MfEFwJN.mjs +2 -0
- package/dist/list-ByCv9-Fl.mjs +2 -0
- package/dist/{live-CHP4AXSN.mjs → live-BfobGv8W.mjs} +1 -1
- package/dist/{load-balancers-B_yvINGW.mjs → load-balancers-BzSCp2Uh.mjs} +1 -1
- package/dist/{local-CIeKNHSz.mjs → local-BNmz58v4.mjs} +1 -1
- package/dist/local-ChR3YIMU.mjs +2 -0
- package/dist/{local-runtime-DOSBgJlo.mjs → local-runtime-DvH92pV8.mjs} +1 -1
- package/dist/{login-h8vuvNN3.mjs → login-B9wYab6S.mjs} +2 -2
- package/dist/login-ierSCYE6.mjs +2 -0
- package/dist/{logpush-B70rNMOP.mjs → logpush-DgfiSd1b.mjs} +2 -2
- package/dist/{logs-DqmqCNqQ.mjs → logs-Dan7xU-k.mjs} +1 -1
- package/dist/{magic-cloud-networking-CurtlBvl.mjs → magic-cloud-networking-DP8fWC4a.mjs} +3 -3
- package/dist/{magic-network-monitoring-OzpX7MfI.mjs → magic-network-monitoring-TAjt04vN.mjs} +1 -1
- package/dist/{magic-transit-Ca_CROhr.mjs → magic-transit-BSuLHnQ5.mjs} +1 -1
- package/dist/{managed-defense-BRxv0mgy.mjs → managed-defense-CTnIZLg4.mjs} +1 -1
- package/dist/{managed-transforms-C7YLIPdN.mjs → managed-transforms-BETvesjp.mjs} +1 -1
- package/dist/{mcp-B_StIx94.mjs → mcp-DhjMGaKc.mjs} +1 -1
- package/dist/{mesh-YW-p6Tkx.mjs → mesh-jxLLG3t4.mjs} +1 -1
- package/dist/{migrate-CrBgU7Xm.mjs → migrate-Bkhk38nJ.mjs} +1 -1
- package/dist/{monetization-rMP8HK_4.mjs → monetization-BqDgHlPv.mjs} +1 -1
- package/dist/{network-D9Do7C-u.mjs → network-D6BRpgOv.mjs} +2 -2
- package/dist/{network-interconnects-DYMhB3TR.mjs → network-interconnects-tP41GbnL.mjs} +1 -1
- package/dist/{o11y-HT9_9NUF.mjs → o11y-h4cIC_1T.mjs} +1 -1
- package/dist/{oauth-D6uh5ZdS.mjs → oauth-CuM12iNb.mjs} +1 -1
- package/dist/{oauth-clients-B_BJco0Z.mjs → oauth-clients-B0voUiXM.mjs} +1 -1
- package/dist/{oauth-DetIFT59.mjs → oauth-nDH3nTCa.mjs} +2 -2
- package/dist/oauth-scopes-Bhns1ZHW.mjs +4 -0
- package/dist/{organization-DhxMPdqU.mjs → organization-Cy55HoRR.mjs} +4 -4
- package/dist/organizations-7Q3d9vcW.mjs +4 -0
- package/dist/{origin-post-quantum-encryption-CPZQGLmW.mjs → origin-post-quantum-encryption-XBMPCdSL.mjs} +1 -1
- package/dist/package-DK3JX4I3.mjs +2 -0
- package/dist/{page-rules-0nDfdFWr.mjs → page-rules-BlT5xlhH.mjs} +1 -1
- package/dist/{pages-Br-w5HLL.mjs → pages-CIbL62L2.mjs} +2 -2
- package/dist/{pay-per-crawl-Di6UpJoo.mjs → pay-per-crawl-BzsBqo_m.mjs} +1 -1
- package/dist/{pay-per-use-Bm7Nxf6s.mjs → pay-per-use-DtejLYJ8.mjs} +1 -1
- package/dist/{pipelines-BRVI3bV9.mjs → pipelines-LjLb8jq6.mjs} +1 -1
- package/dist/{precursor-DyrQWdO5.mjs → precursor-BKp5_Ag4.mjs} +1 -1
- package/dist/{previews-rpfwcJzi.mjs → previews-zRYO9uO9.mjs} +1 -1
- package/dist/{progress-C_yVLVcl.mjs → progress-_Jux05O5.mjs} +1 -1
- package/dist/{prompt-kxvGZ6nF.mjs → prompt-SNVLBS1b.mjs} +1 -1
- package/dist/{queues-BGV3aC26.mjs → queues-Ci4rGGC4.mjs} +1 -1
- package/dist/{r2-CWMqr3JJ.mjs → r2-qm2hgS43.mjs} +1 -1
- package/dist/radar-C_ydbJe_.mjs +300 -0
- package/dist/{raw-fetch-C_hWBr7n.mjs → raw-fetch-D3ydyJYW.mjs} +1 -1
- package/dist/{ready-BXz5amSL.mjs → ready-hk-_B8z3.mjs} +1 -1
- package/dist/{realtime-9jG5GaNK.mjs → realtime-BAvjYmYw.mjs} +2 -2
- package/dist/{registrar-C-2I1SJh.mjs → registrar-DD7WZaP2.mjs} +10 -10
- package/dist/{registrar-sandbox-D9ldxGPo.mjs → registrar-sandbox-DbxloH5s.mjs} +2 -2
- package/dist/{reporting-Bk3dc6Gi.mjs → reporting-CRVg3J1C.mjs} +1 -1
- package/dist/{request-headers-B5Rjq7Ic.mjs → request-headers-Cn01EsbI.mjs} +1 -1
- package/dist/{request-tracers-H-iRAUdG.mjs → request-tracers-BWs0rdFS.mjs} +1 -1
- package/dist/{resource-sharing-A6ITunsT.mjs → resource-sharing-yipIkdbd.mjs} +2 -2
- package/dist/{rules-BntvQdnS.mjs → rules-CCtaBLiN.mjs} +1 -1
- package/dist/{rulesets-DKz_iYU_.mjs → rulesets-DBEvCNDS.mjs} +1 -1
- package/dist/{rum-D9zpcNqT.mjs → rum-gDOKylu_.mjs} +1 -1
- package/dist/{run-BlSXngtI.mjs → run-Br8sYjNF.mjs} +1 -1
- package/dist/run-LOgTLpob.mjs +2 -0
- package/dist/schema-cache-Cb64Nqbt.mjs +3 -0
- package/dist/schema-flags-BcbbCWR5.mjs +4 -0
- package/dist/{scim-DVhxKKpH.mjs → scim-CM8Xah56.mjs} +1 -1
- package/dist/{secrets-store-3mxJrDWJ.mjs → secrets-store-BEnXiYCC.mjs} +2 -2
- package/dist/{security-insights-BDLWuG0E.mjs → security-insights-Be5GvdBA.mjs} +5 -5
- package/dist/{security-txt-COzdrpdW.mjs → security-txt-BF0PWAEW.mjs} +1 -1
- package/dist/{session-X3xaW70I.mjs → session-B7vOqdZU.mjs} +1 -1
- package/dist/{shared-foRpbmSV.mjs → shared-CBMFY1VY.mjs} +1 -1
- package/dist/{signed-url-Dgi1p-Qi.mjs → signed-url-VDDQlllt.mjs} +1 -1
- package/dist/{smart-shield-DSDA5bZt.mjs → smart-shield-DQku_wYi.mjs} +1 -1
- package/dist/{snippets-myowgDLd.mjs → snippets-B3FCEMuh.mjs} +1 -1
- package/dist/{spawn-C8D5pzxJ.mjs → spawn-9sE67p7c.mjs} +1 -1
- package/dist/{spectrum-CB-NzbZ7.mjs → spectrum-nLirlVue.mjs} +5 -5
- package/dist/{speed-UqKG1WDl.mjs → speed-C1hCyMPy.mjs} +1 -1
- package/dist/{sql-BzikdIje.mjs → sql-DVQOKThL.mjs} +1 -1
- package/dist/{src-B9agxHh8.mjs → src-Bh2gHpI7.mjs} +5 -5
- package/dist/{ssl-BmWWsUX6.mjs → ssl-CYDRgr24.mjs} +2 -2
- package/dist/{startup-profile-B7yHR_YB.mjs → startup-profile-BLvw_Wmc.mjs} +1 -1
- package/dist/startup-profile-ByxSdhEl.mjs +2 -0
- package/dist/{state-DNuVv5i-.mjs → state-B8n0QU04.mjs} +1 -1
- package/dist/state-BTOzaT5L.mjs +2 -0
- package/dist/{stream-G87TzC9e.mjs → stream-DHyejrI6.mjs} +1 -1
- package/dist/{tags-Ctl4fLux.mjs → tags-DOL6dKQE.mjs} +2 -2
- package/dist/{telemetry-CA0_i9-l.mjs → telemetry-DJ8-Q2pU.mjs} +1 -1
- package/dist/telemetry-kjElc1zT.mjs +2 -0
- package/dist/{tenant-t5yPFQOx.mjs → tenant-2EdATz2Y.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-B2ehXfQK.mjs → tenant-custom-nameservers-DhEpJNST.mjs} +1 -1
- package/dist/{tunnels-DL_VgV0P.mjs → tunnels-CMAmH4Vh.mjs} +3 -3
- package/dist/{turnstile-CEjw5vn6.mjs → turnstile-DTJjDMFp.mjs} +1 -1
- package/dist/ui-7zujR-O7.mjs +2 -0
- package/dist/{update-check-LF-JcHRF.mjs → update-check-BkCdHK-3.mjs} +1 -1
- package/dist/{update-check-2Mn4Z1ln.mjs → update-check-DDGKWkmi.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-BL_BkGvP.mjs → url-normalization-BbWOra1u.mjs} +1 -1
- package/dist/{url-scanner-CVzV9Syq.mjs → url-scanner-Bj-eS_3C.mjs} +2 -2
- package/dist/{user-YnQSmPNR.mjs → user-CMzTHHVX.mjs} +1 -1
- package/dist/{vectorize-C5ZwKQzI.mjs → vectorize-D4H7_KPs.mjs} +1 -1
- package/dist/version-DIIJ2ixL.mjs +2 -0
- package/dist/{waiting-rooms-D9V1Fm16.mjs → waiting-rooms-CqMbVu9s.mjs} +1 -1
- package/dist/{web-assets-yzPkWgLy.mjs → web-assets-BgfzyF8t.mjs} +5 -5
- package/dist/{web3-DbWNUhP4.mjs → web3-ByCe47FI.mjs} +1 -1
- package/dist/{workers-r9Aj68v1.mjs → workers-BiLsPkYD.mjs} +2 -2
- package/dist/{workers-builds-DgIDPDhj.mjs → workers-builds-2N71_8MZ.mjs} +1 -1
- package/dist/{workers-for-platforms-CoPp1ez5.mjs → workers-for-platforms-BMN4QXgT.mjs} +1 -1
- package/dist/{workers-vpc-Cvjg15bk.mjs → workers-vpc-3o7dMg7-.mjs} +1 -1
- package/dist/{workflows-D4SIo58Q.mjs → workflows-COiyqt-B.mjs} +1 -1
- package/dist/{wrangler-migration-D2HwxIG5.mjs → wrangler-migration-CqSg8IDj.mjs} +5 -5
- package/dist/{zaraz-CkqpiZBH.mjs → zaraz-DjwhCH8A.mjs} +2 -2
- package/dist/{zero-trust-CEY-lohP.mjs → zero-trust-BmpuDOmH.mjs} +64 -58
- package/dist/{zones-BWieAez1.mjs → zones-XYQiz5kF.mjs} +2 -2
- package/package.json +12 -12
- package/dist/auth-B2V5gsm4.mjs +0 -2
- package/dist/auth-CyF_s5ic.mjs +0 -2
- package/dist/build-CgpCJjPA.mjs +0 -2
- package/dist/cf-CInFH4Ng.mjs +0 -18
- package/dist/local-CTaqb1nl.mjs +0 -2
- package/dist/login-pt6gTX3x.mjs +0 -2
- package/dist/oauth-scopes-Cub2pl0Z.mjs +0 -4
- package/dist/organizations-DIduPB74.mjs +0 -4
- package/dist/package-Bf2u3-yO.mjs +0 -2
- package/dist/radar-D8x_TUAi.mjs +0 -300
- package/dist/run-DB1-Sj9a.mjs +0 -2
- package/dist/schema-flags-CoTAkrz8.mjs +0 -5
- package/dist/startup-profile-zt6cFnBn.mjs +0 -2
- package/dist/state-C5mQ9At8.mjs +0 -2
- package/dist/telemetry-jl3s2-bN.mjs +0 -2
- package/dist/ui-Dt1-eURh.mjs +0 -2
- package/dist/version-Bz705iJe.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r,s as i}from"./auth-CB9wjyad.mjs";import{a,i as o,t as s}from"./context-DCon1tRZ.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-_Jux05O5.mjs";import{t as d}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as f,n as p,s as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-SNVLBS1b.mjs";import{n as ee,t as te}from"./raw-fetch-D3ydyJYW.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
|
|
|
@@ -53,75 +53,77 @@ Toggles PDF invoice generation for an account.`).option(`toggle`,{type:`boolean`
|
|
|
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
|
-
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
|
|
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`/${t.account_or_zone}/${t.account_or_zone_id}/entitlements`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,405:`MethodNotAllowedError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function rt(e){return e.usage(`$0 accounts entitlements get
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Returns the list of entitlements (features and their allocations) for a given account or zone. Each entitlement describes a product feature the account or zone is permitted to use and the allocation value (boolean, count, range, enum, or string) that governs its behaviour.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Get account or zone Entitlements`,builder:rt,handler:async e=>d({command:`accounts entitlements 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 entitlements get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/entitlements`,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(nt,{account_or_zone:i,account_or_zone_id:d}));c(f,{successLabel:`Loaded`})})},at={command:`entitlements`,describe:`Operations for entitlements`,builder:e=>e.command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ot={method:`GET`,path:t=>e`/accounts/${t.account_id}`};function st(e){return e.usage(`$0 accounts get
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
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 ct={command:`get`,describe:`Account Details`,builder:st,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(ot,{account_id:i}));c(o,{successLabel:`Loaded`})})};function lt(e){return e.usage(`$0 accounts list
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
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 ut={command:`list`,describe:`List Accounts`,builder:lt,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 dt={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 ft(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 pt={command:`history <id>`,describe:`Get resource change history from an account audit log entry (Version 2)`,builder:ft,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(dt,{account_id:o,id:e.id,...n}));c(d,{successLabel:`Loaded`})})};var mt={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 ht(e){return e.usage(`$0 accounts logs audit list
|
|
63
63
|
|
|
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
|
|
64
|
+
Gets a list of audit logs for an account.`).option(`account-name`,{type:`string`,array:!0,description:`Filters by the account name.`}).option(`action-result`,{type:`string`,array:!0,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,array:!0,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,array:!0,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`,array:!0,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,array:!0,description:`Filters by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address`,{type:`string`,array:!0,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,array:!0,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,array:!0,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,array:!0,description:`Filters by the actor type.`}).option(`audit-log-id`,{type:`string`,array:!0,description:`Finds a specific log by its ID.`}).option(`id`,{type:`string`,array:!0,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,array:!0,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,array:!0,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,array:!0,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,array:!0,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,array:!0,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,array:!0,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,array:!0,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,array:!0,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`,array:!0,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`,array:!0,description:`Filters by the zone ID.`}).option(`zone-name`,{type:`string`,array:!0,description:`Filters by the zone name associated with the change.`}).option(`account-name-not`,{type:`string`,array:!0,description:`Filters out audit logs by the account name.`}).option(`action-result-not`,{type:`string`,array:!0,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,array:!0,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,array:!0,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`,array:!0,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,array:!0,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`,array:!0,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,array:!0,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`,array:!0,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`,array:!0,description:`Filters out audit logs by the actor type.`}).option(`audit-log-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by their IDs.`}).option(`id-not`,{type:`string`,array:!0,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,array:!0,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,array:!0,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,array:!0,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,array:!0,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,array:!0,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,array:!0,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,array:!0,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`,array:!0,description:`Filters out audit logs by the zone ID.`}).option(`zone-name-not`,{type:`string`,array:!0,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 gt={command:`list`,describe:`Get account audit logs (Version 2)`,builder:ht,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(mt,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})};var _t={method:`GET`,path:t=>e`/accounts/${t.account_id}/logs/audit/product_categories`};function vt(e){return e.usage(`$0 accounts logs audit product-categories
|
|
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 yt={command:`product-categories`,describe:`List account audit log product categories (Version 2)`,builder:vt,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(_t,{account_id:i}));c(o,{successLabel:`Loaded`})})},bt={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(pt).command(gt).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/members`,body:`json`};function St(e){return e.usage(`$0 accounts members create
|
|
65
67
|
|
|
66
68
|
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'.
|
|
67
69
|
Changing from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.
|
|
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
|
|
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 Ct={command:`create`,describe:`Add Member`,builder:St,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 wt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/members/${t.member_id}`};function Tt(e){return e.usage(`$0 accounts members delete <member-id>
|
|
69
71
|
|
|
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
|
|
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 Et={command:`delete <member-id>`,describe:`Remove Member`,builder:Tt,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(wt,{account_id:i,member_id:e[`member-id`]}));c(o,{successLabel:`Deleted`})})};var Dt={method:`GET`,path:t=>e`/accounts/${t.account_id}/members/${t.member_id}`};function Ot(e){return e.usage(`$0 accounts members get <member-id>
|
|
71
73
|
|
|
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
|
|
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 kt={command:`get <member-id>`,describe:`Member Details`,builder:Ot,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(Dt,{account_id:i,member_id:e[`member-id`]}));c(o,{successLabel:`Loaded`})})};var At={method:`GET`,path:t=>e`/accounts/${t.account_id}/members`,query:[`order`,`status`,`page`,`per_page`,`direction`]};function jt(e){return e.usage(`$0 accounts members list
|
|
73
75
|
|
|
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
|
|
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 Mt={command:`list`,describe:`List Members`,builder:jt,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(At,{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 Nt(e){return e.usage(`$0 accounts members update <member-id>
|
|
75
77
|
|
|
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
|
|
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 Pt={command:`update <member-id>`,describe:`Update Member`,builder:Nt,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`})})},Ft={command:`members`,describe:`Operations for members`,builder:e=>e.command(Ct).command(Et).command(kt).command(Mt).command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/move`,body:`json`};function It(e){return e.usage(`$0 accounts move
|
|
77
79
|
|
|
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
|
|
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 Lt={command:`move`,describe:`Move account to organization`,builder:It,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 Rt={method:`GET`,path:t=>e`/accounts/${t.account_id}/organizations`};function zt(e){return e.usage(`$0 accounts organization list
|
|
79
81
|
|
|
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
|
|
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 Bt={command:`list`,describe:`List account organizations`,builder:zt,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(Rt,{account_id:i}));c(o,{successLabel:`Loaded`})})},Vt={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ht={method:`GET`,path:t=>e`/accounts/${t.account_id}/profile`};function Ut(e){return e.usage(`$0 accounts profile get
|
|
81
83
|
|
|
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
|
|
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 Wt={command:`get`,describe:`Get account profile`,builder:Ut,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(Ht,{account_id:i}));c(o,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/profile`,body:`json`,response:!1};function Gt(e){return e.usage(`$0 accounts profile update
|
|
83
85
|
|
|
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
|
|
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 Kt={command:`update`,describe:`Update account profile`,builder:Gt,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`})})},qt={command:`profile`,describe:`View and manage the profile for a Cloudflare account`,builder:e=>e.command(Wt).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/subscriptions/cancel-downgrade`,body:`json`};function Jt(e){return e.usage(`$0 accounts subscriptions cancel-delayed-downgrade
|
|
85
87
|
|
|
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
|
|
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 Yt={command:`cancel-delayed-downgrade`,describe:`Cancel Delayed Downgrade`,builder:Jt,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 Xt(e){return e.usage(`$0 accounts subscriptions create-cancel-reason <subscription-identifier>
|
|
87
89
|
|
|
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
|
|
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 Zt={command:`create-cancel-reason <subscription-identifier>`,describe:`Create Cancel Reason`,builder:Xt,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 Qt(e){return e.usage(`$0 accounts subscriptions create
|
|
89
91
|
|
|
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
|
|
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 $t={command:`create`,describe:`Create Subscription`,builder:Qt,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 en={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}`};function tn(e){return e.usage(`$0 accounts subscriptions delete <subscription-identifier>
|
|
91
93
|
|
|
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
|
|
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 nn={command:`delete <subscription-identifier>`,describe:`Delete Subscription`,builder:tn,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(en,{account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(o,{successLabel:`Deleted`})})};var rn={method:`GET`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}`,errors:{404:`NotFoundError`}};function an(e){return e.usage(`$0 accounts subscriptions get-by-identifier <subscription-identifier>
|
|
93
95
|
|
|
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
|
|
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 on={command:`get-by-identifier <subscription-identifier>`,describe:`Get Subscription`,builder:an,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(rn,{account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(o,{successLabel:`Loaded`})})};var sn={method:`GET`,path:t=>e`/accounts/${t.account_id}/subscriptions/${t.subscription_identifier}/cancel-reason`};function cn(e){return e.usage(`$0 accounts subscriptions get-cancel-reason <subscription-identifier>
|
|
95
97
|
|
|
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
|
|
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 ln={command:`get-cancel-reason <subscription-identifier>`,describe:`Get Cancel Reason`,builder:cn,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(sn,{account_id:i,subscription_identifier:e[`subscription-identifier`]}));c(o,{successLabel:`Loaded`})})};var un={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/subscriptions`};function dn(e){return e.usage(`$0 accounts subscriptions get
|
|
97
99
|
|
|
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
|
|
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 fn={command:`get`,describe:`List Subscriptions`,builder:dn,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(un,{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 pn(e){return e.usage(`$0 accounts subscriptions update <subscription-identifier>
|
|
99
101
|
|
|
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
|
|
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 mn={command:`update <subscription-identifier>`,describe:`Update Subscription`,builder:pn,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`})})},hn={command:`subscriptions`,describe:`View and manage plan subscriptions attached to this account`,builder:e=>e.command(Yt).command($t).command(Zt).command(nn).command(fn).command(on).command(ln).command(mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/tokens`,body:`json`};function gn(e){return e.usage(`$0 accounts tokens create
|
|
101
103
|
|
|
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
|
|
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 _n={command:`create`,describe:`Create Token`,builder:gn,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 vn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}`};function yn(e){return e.usage(`$0 accounts tokens delete <token-id>
|
|
103
105
|
|
|
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
|
|
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 bn={command:`delete <token-id>`,describe:`Delete Token`,builder:yn,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(vn,{account_id:i,token_id:e[`token-id`]}));c(o,{successLabel:`Deleted`})})};var xn={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}`};function Sn(e){return e.usage(`$0 accounts tokens get <token-id>
|
|
105
107
|
|
|
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
|
|
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 Cn={command:`get <token-id>`,describe:`Token Details`,builder:Sn,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(xn,{account_id:i,token_id:e[`token-id`]}));c(o,{successLabel:`Loaded`})})};var wn={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens`,query:[`page`,`per_page`,`direction`,`include_expired`]};function Tn(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 En={command:`list`,describe:`List Tokens`,builder:Tn,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(wn,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})};var Dn={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens/permission_groups`,query:[`name`,`scope`]};function On(e){return e.usage(`$0 accounts tokens permission-groups list
|
|
107
109
|
|
|
108
110
|
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.
|
|
109
111
|
The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
|
|
110
|
-
The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
112
|
+
The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kn={command:`list`,describe:`List Permission Groups`,builder:On,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(Dn,{account_id:o,...n}));c(d,{successLabel:`Loaded`})})},An={command:`permission-groups`,describe:`Operations for tokens.permission-groups`,builder:e=>e.command(kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var jn={method:`PUT`,path:t=>e`/accounts/${t.account_id}/tokens/${t.token_id}/value`};function Mn(e){return e.usage(`$0 accounts tokens roll <token-id>
|
|
111
113
|
|
|
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
|
|
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 Nn={command:`roll <token-id>`,describe:`Roll Token`,builder:Mn,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(jn,{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 Pn(e){return e.usage(`$0 accounts tokens update <token-id>
|
|
113
115
|
|
|
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
|
|
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 Fn={command:`update <token-id>`,describe:`Update Token`,builder:Pn,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 Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/tokens/verify`};function In(e){return e.usage(`$0 accounts tokens verify
|
|
115
117
|
|
|
116
|
-
Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
118
|
+
Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ln={command:`verify`,describe:`Verify Token`,builder:In,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(Z,{account_id:i}));c(o,{successLabel:`Loaded`})})},Rn={command:`tokens`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(_n).command(bn).command(Cn).command(En).command(Nn).command(Fn).command(Ln).command(An).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zn={method:`GET`,path:t=>e`/accounts/${t.account_id}/settings/transformations`};function Bn(e){return e.usage(`$0 accounts transformations list
|
|
117
119
|
|
|
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
|
|
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 Vn={command:`list`,describe:`List Image Resizing configurations for account`,builder:Bn,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(zn,{account_id:i}));c(o,{successLabel:`Loaded`})})},Hn={command:`transformations`,describe:`Operations for transformations`,builder:e=>e.command(Vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}`,body:`json`};function Un(e){return e.usage(`$0 accounts update
|
|
119
121
|
|
|
120
122
|
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
|
|
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
|
|
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 Wn={command:`update`,describe:`Update Account`,builder:Un,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 Gn(e){return e.usage(`$0 accounts ut-billing edit
|
|
122
124
|
|
|
123
125
|
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.
|
|
124
126
|
Note: once enabled, this setting cannot be set back to "off".
|
|
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
|
|
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 Kn={command:`edit`,describe:`Change Unique Transformations billing setting`,builder:Gn,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 qn={method:`GET`,path:t=>e`/accounts/${t.account_id}/settings/ut-billing`};function Jn(e){return e.usage(`$0 accounts ut-billing get
|
|
126
128
|
|
|
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
|
|
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 Yn={command:`get`,describe:`Get Unique Transformations billing setting`,builder:Jn,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(qn,{account_id:i}));c(o,{successLabel:`Loaded`})})},Xn={command:`ut-billing`,describe:`Operations for ut-billing`,builder:e=>e.command(Kn).command(Yn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zn={command:`accounts`,describe:`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,builder:e=>e.command(Qe).command(tt).command(ct).command(ut).command(Lt).command(Wn).command(_e).command(Ue).command(Xe).command(at).command(xt).command(Ft).command(Vt).command(qt).command(hn).command(Rn).command(Hn).command(Xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zn as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-SNVLBS1b.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store`,body:`json`};function p(e){return e.usage(`$0 acm custom-trust-store create
|
|
3
3
|
|
|
4
4
|
Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`).option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Upload Custom Origin Trust Store`,builder:p,handler:async e=>o({command:`acm custom-trust-store create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({certificate:l(e.certificate,`certificate`,`text`)}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(f,{body:t,zone_id:d}));r(n,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await u(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let p=c({certificate:l(e.certificate,`certificate`,`text`)}),m=await a(`Creating`,async()=>o.send(f,{body:p,zone_id:d}));r(m,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store/${t.custom_origin_trust_store_id}`};function g(e){return e.usage(`$0 acm custom-trust-store delete <custom-origin-trust-store-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,i as a,t as o}from"./context-DCon1tRZ.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-_Jux05O5.mjs";import{t as u}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-SNVLBS1b.mjs";import{n as ee,t as te}from"./raw-fetch-D3ydyJYW.mjs";var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function y(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
|
|
3
3
|
|
|
4
4
|
Remove an account as a member of a particular address map.`).positional(`member-account-id`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <member-account-id>`,describe:`Remove an account membership from an Address Map`,builder:y,handler:async e=>u({command:`addressing address-maps accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}/accounts/${e[`member-account-id`]==null?`<member-account-id>`:encodeURIComponent(String(e[`member-account-id`]))}`,pathParams:{"address-map-id":String(e[`address-map-id`]??``),"member-account-id":String(e[`member-account-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(v,{account_id:a,address_map_id:e[`address-map-id`],member_account_id:e[`member-account-id`]}));s(u,{successLabel:`Deleted`})})};var re={method:`PUT`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function ie(e){return e.usage(`$0 addressing address-maps accounts update <member-account-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-SNVLBS1b.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces`,body:`json`};function g(e){return e.usage(`$0 agent-memory create-namespace
|
|
3
3
|
|
|
4
4
|
Creates a new memory namespace owned by the account.`).option(`name`,{type:`string`,description:`Namespace name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create-namespace`,describe:`Create a namespace`,builder:g,handler:async e=>c({command:`agent-memory create-namespace`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Namespace name.`));let m=d({name:f(e.name,`name`,`text`)}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:l}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces/${t.namespace_name}/profiles/${t.profile_name}/memories/${t.memory_id}`};function y(e){return e.usage(`$0 agent-memory delete-memory <memory-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{n,t as r}from"./local-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{n,t as r}from"./local-BNmz58v4.mjs";import{a as i,i as a,n as o}from"./auth-CB9wjyad.mjs";import{a as s,t as c}from"./context-DCon1tRZ.mjs";import{t as l}from"./output-BJEgbI0G.mjs";import{t as u}from"./dry-run-gy0Hl9xo.mjs";import{t as d}from"./progress-_Jux05O5.mjs";import{n as f,t as p}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g,t as _}from"./input-validation-D7z60HJH.mjs";import{a as v,i as ee,n as te}from"./prompt-SNVLBS1b.mjs";import{n as ne}from"./raw-fetch-D3ydyJYW.mjs";import{a as re,i as ie,n as y,r as b,t as ae}from"./schema-cache-Cb64Nqbt.mjs";import{c as x,d as oe,f as se,i as ce,l as S,n as C,o as w,r as T,s as E,t as D}from"./schema-flags-BcbbCWR5.mjs";var O={method:`GET`,path:e=>t`/accounts/${e.account_id}/ai/authors/search`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 ai authors list
|
|
3
3
|
|
|
4
4
|
Searches Workers AI models by author or organization name.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Author Search`,builder:k,handler:async e=>p({command:`ai authors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();u({command:`cf ai authors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/ai/authors/search`,pathParams:{},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(O,{account_id:n}));l(i,{successLabel:`Loaded`})})},j={command:`authors`,describe:`Operations for authors`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 ai finetunes assets create <finetune-id>
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ Searches Workers AI models by task type (e.g., text-generation, embeddings).`).o
|
|
|
25
25
|
|
|
26
26
|
Converts files uploaded as multipart form data into Markdown using Workers AI. Returns a conversion result for each file. Use the supported-formats endpoint to check accepted file types.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`files`,{type:`string`,description:`Files to convert, supplied as multipart file uploads.`})}const Oe={command:`to-markdown`,describe:`Convert uploaded files to Markdown`,builder:De,handler:async e=>p({command:`ai to-markdown`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf ai to-markdown`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/tomarkdown`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,files:e.files}});return}let t=await o(e),n=e.local?r:await c();if(e.accountId=n,e.file!==void 0||e.body!==void 0||e.files!==void 0){let r=new FormData;if(e.file){let t=_(e.file);r.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&r.append(`file`,e.body);if(e.files!==void 0){let t=typeof e.files==`string`?g(e.files,`files`,`text`):e.files;r.append(`files`,typeof t==`string`?t:JSON.stringify(t))}let i=await d(`Creating`,async()=>a(t,`POST`,`/accounts/${n}/ai/tomarkdown`,{body:r}));l(i,{successLabel:`Created`})}else if(e.body){let r=g(e.body,`body`,`binary`),i=await d(`Creating`,async()=>a(t,`POST`,`/accounts/${n}/ai/tomarkdown`,{body:r,headers:{"Content-Type":`multipart/form-data`}}));l(i,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var J={method:`POST`,path:e=>t`/accounts/${e.account_id}/ai/websearch`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,502:`BadGatewayError`}};function ke(e){return e.usage(`$0 ai websearch
|
|
27
27
|
|
|
28
|
-
Run a web search through a configured AI Gateway.`).option(`byok-alias`,{type:`string`,description:`The byokAlias field`}).option(`limit`,{type:`number`,description:`The limit field`}).option(`options-gateway-id`,{type:`string`,description:`The options.gateway.id field`}).option(`provider`,{type:`string`,description:`The provider field`}).option(`query`,{type:`string`,description:`The query 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 Ae={command:`websearch`,describe:`Search the web through AI Gateway`,builder:ke,handler:async e=>p({command:`ai websearch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf ai websearch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/websearch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({byokAlias:g(e[`byok-alias`],`byok-alias`,`text`),limit:e.limit,options:{gateway:{id:g(e[`options-gateway-id`],`options-gateway-id`,`text`)}},provider:g(e.provider,`provider`,`text`),query:g(e.query,`query`,`text`)}):m(e.body)});return}let t=await o(e),n=e.local?r:await c();if(e.accountId=n,e.body){let r=m(e.body),i=await d(`Creating`,async()=>t.send(J,{body:r,account_id:n}));l(i,{successLabel:`Created`});return}e[`options-gateway-id`]===void 0&&(e[`options-gateway-id`]=await v(`options-gateway-id`,`The options.gateway.id field`)),e.query===void 0&&(e.query=await v(`query`,`The query field`));let i=h({byokAlias:g(e[`byok-alias`],`byok-alias`,`text`),limit:e.limit,options:{gateway:{id:g(e[`options-gateway-id`],`options-gateway-id`,`text`)}},provider:g(e.provider,`provider`,`text`),query:g(e.query,`query`,`text`)}),a=await d(`Creating`,async()=>t.send(J,{body:i,account_id:n}));l(a,{successLabel:`Created`})})},Y=`ai-model-schema`;async function X(e,t,n,r){let i=ie(Y,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.send(q,{account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.send(q,{account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:
|
|
29
|
-
`)}\n\nRun \`cf ai run ${t} --help\` for this model's input flags.`);let c=/* @__PURE__ */ new Set;for(;;){let t=
|
|
28
|
+
Run a web search through a configured AI Gateway.`).option(`byok-alias`,{type:`string`,description:`The byokAlias field`}).option(`limit`,{type:`number`,description:`The limit field`}).option(`options-gateway-id`,{type:`string`,description:`The options.gateway.id field`}).option(`provider`,{type:`string`,description:`The provider field`}).option(`query`,{type:`string`,description:`The query 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 Ae={command:`websearch`,describe:`Search the web through AI Gateway`,builder:ke,handler:async e=>p({command:`ai websearch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf ai websearch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/websearch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?h({byokAlias:g(e[`byok-alias`],`byok-alias`,`text`),limit:e.limit,options:{gateway:{id:g(e[`options-gateway-id`],`options-gateway-id`,`text`)}},provider:g(e.provider,`provider`,`text`),query:g(e.query,`query`,`text`)}):m(e.body)});return}let t=await o(e),n=e.local?r:await c();if(e.accountId=n,e.body){let r=m(e.body),i=await d(`Creating`,async()=>t.send(J,{body:r,account_id:n}));l(i,{successLabel:`Created`});return}e[`options-gateway-id`]===void 0&&(e[`options-gateway-id`]=await v(`options-gateway-id`,`The options.gateway.id field`)),e.query===void 0&&(e.query=await v(`query`,`The query field`));let i=h({byokAlias:g(e[`byok-alias`],`byok-alias`,`text`),limit:e.limit,options:{gateway:{id:g(e[`options-gateway-id`],`options-gateway-id`,`text`)}},provider:g(e.provider,`provider`,`text`),query:g(e.query,`query`,`text`)}),a=await d(`Creating`,async()=>t.send(J,{body:i,account_id:n}));l(a,{successLabel:`Created`})})},Y=`ai-model-schema`;async function X(e,t,n,r){let i=ie(Y,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.send(q,{account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.send(q,{account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:y(e)}}let o=b(a,`input`);return o?(re(Y,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const Z="Run `cf ai models list` to see the models you can run.",Q=[`model-name`,`modelName`];let $;function je(e){return $=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${Z}`)}async function Me(t){t.local&&console.log(`${n}\n`),$?.showHelp(`log`);let r=t[`model-name`];if(!r||t.local)return;let a=Date.now()+ae,s=await i(a);if(!s){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await X(r,s,()=>o(t),a);console.log(c.ok?`\n${w(x(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var Ne=f({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:je,handler:async e=>{if(e.help){await Me(e);return}if(e.local)throw Error(n);let t=e[`model-name`];if(!t)throw Error(`A model is required: cf ai run <model>. ${Z}`);let r=e.dryRun?await s()??`<account-id>`:await c(),i;if(e.body!==void 0){if(S(e,Q).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);i=m(e.body)}else{let n=await X(t,r,()=>o(e));if(!n.ok)throw Error(`Could not load the input schema for ${t}: ${n.reason}.\nPass the request body directly instead: cf ai run ${t} --body '{…}'`);let a=x(n.schema),s=S(e,[...Q,...C(a)]);if(s.length>0)throw Error(`${s.map(e=>`Unknown flag --${e}`).join(`
|
|
29
|
+
`)}\n\nRun \`cf ai run ${t} --help\` for this model's input flags.`);let c=/* @__PURE__ */ new Set;for(;;){let t=ce(a,e).find(e=>!c.has(e.name)&&(e.choices!==void 0||e.type===`string`));if(!t)break;c.add(t.name),t.choices?e[t.name]=await ee(t.name,E(t),t.choices,t.choiceLabels):e[t.name]=await v(t.name,E(t))}let l=T(n.schema),u=D(a,e,{reserved:Q}),d=u.errors.length===0?l?oe(n.schema,u.body):se(n.schema,u.body):u.errors;if(d.length>0)throw Error(`${d.join(`
|
|
30
30
|
`)}\n\nRun \`cf ai run ${t} --help\` for this model's input flags.`);i=u.body}if(e.dryRun){let e={model:t,input:i};u({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r}/ai/run`,pathParams:{},bodyKind:`json`,body:e});return}let f=await o(e);e.accountId=r;let p=await d(`Running`,async()=>a(f,`POST`,`/accounts/${r}/ai/run`,{body:{model:t,input:i},preserveNonJsonBytes:!0}));Buffer.isBuffer(p)?ne(p):l(p,{successLabel:`Ran`})}},{command:`ai run`,recordArgs:!1});const Pe={command:`ai`,describe:`ai`,builder:e=>e.command(he).command(ve).command(Ne).command(Oe).command(Ae).command(j).command(pe).command(Se).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|