cf 1.0.0-beta.26 → 1.0.0-beta.27
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 +1996 -3422
- package/dist/_meta/schemas.json +9249 -2339
- package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
- package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
- package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
- package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
- package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
- package/dist/ai-search-DbZIxdio.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
- package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
- package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
- package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
- package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
- package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
- package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
- package/dist/auth-CspwoBlp.mjs +2 -0
- package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
- package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
- package/dist/billing-DRNww0iC.mjs +24 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
- package/dist/body-unions-CjpNjwSW.mjs +2 -0
- package/dist/bot-management-fwxKIbaB.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
- package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
- package/dist/browser-run-CEk-NIgP.mjs +40 -0
- package/dist/build-CRm2TQq8.mjs +2 -0
- package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
- package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
- package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
- package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
- package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
- package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
- package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
- package/dist/containers-DINLx5_i.mjs +380 -0
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
- package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
- package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
- package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
- package/dist/custom-pages-DAkKVzgR.mjs +38 -0
- package/dist/d1-CDIyRdh4.mjs +52 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
- package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
- package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
- package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
- package/dist/email-domains-CDSbVclP.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
- package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
- package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
- package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
- package/dist/iam-8T74DNhH.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
- package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
- package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
- package/dist/k2-wsanPL3y.mjs +10 -0
- package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
- package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
- package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
- package/dist/local-CFsO9Tkg.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
- package/dist/login-BfuOf-Yi.mjs +2 -0
- package/dist/logpush-qhlxsioM.mjs +68 -0
- package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
- package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
- package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
- package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
- package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
- package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
- package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
- package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
- package/dist/observability-BxhJQCgZ.mjs +4 -0
- package/dist/organization-CEnlXwrl.mjs +70 -0
- package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
- package/dist/package-CiRJBRHO.mjs +2 -0
- package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
- package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
- package/dist/precursor-D3VH2MXT.mjs +4 -0
- package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
- package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
- package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
- package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
- package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
- package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
- package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
- package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
- package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
- package/dist/rulesets-CKyc-Xlx.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
- package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
- package/dist/run-DD45EQTm.mjs +2 -0
- package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
- package/dist/schema-flags-DrqvwQNw.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
- package/dist/security-insights-SlUGW3F_.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
- package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
- package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
- package/dist/src-DPnUfK4c.mjs +131 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
- package/dist/startup-profile-tZNb2HGz.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
- package/dist/state-Uwfrmw5I.mjs +2 -0
- package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
- package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
- package/dist/telemetry-Pt5GpCKD.mjs +2 -0
- package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
- package/dist/ui-FYultowZ.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
- package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
- package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
- package/dist/version-Zr2oF8mY.mjs +2 -0
- package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
- package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
- package/dist/workers-B3uJqJKc.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
- package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
- package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
- package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
- package/package.json +14 -14
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/containers-D4sa-Eoy.mjs +0 -380
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/k2-Cj1ORHul.mjs +0 -10
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
|
@@ -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-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D0dXwuME.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function te(e){return e.usage(`$0 o11y agents sessions list
|
|
3
3
|
|
|
4
4
|
Lists sessions in which the specified agent participated, ordered by most recent activity. A session is identified by gen_ai.conversation.id and includes authorized activity from every agent in that conversation during the requested time range. Agent invocation and chat spans without a conversation ID are attributed only when their trace is associated with exactly one observed conversation.`).option(`service`,{type:`string`,description:`Worker service name associated with the participating agent.`,demandOption:!0}).option(`agent`,{type:`string`,description:`Agent name reported in gen_ai.agent.name. The request is limited to conversations in which this service and agent participated.`,demandOption:!0}).option(`from`,{type:`number`,description:`Start of the requested time range, as Unix epoch milliseconds. Values earlier than the 7-day retention boundary are clamped.`,demandOption:!0}).option(`to`,{type:`number`,description:`End of the requested time range, as Unix epoch milliseconds. Must be later than from.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response.`}).option(`per-page`,{type:`number`,description:`Maximum number of items to return. Defaults to 20 and cannot exceed 100.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List Agent sessions`,builder:te,handler:async e=>l({command:`o11y agents sessions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await r();s({command:`cf o11y agents sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/sessions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ee,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions/${t.conversationId}/runs`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents sessions runs <conversationId>
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ Delete a Workers Observability Telemetry Destination.`).positional(`slug`,{type:
|
|
|
11
11
|
|
|
12
12
|
List your Workers Observability Telemetry Destinations.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`Get Destinations`,builder:de,handler:async e=>l({command:`o11y destinations list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},e,async()=>{let i={page:e.page,perPage:e[`per-page`],order:e.order,orderBy:e[`order-by`]};if(e.dryRun){let e=await r();s({command:`cf o11y destinations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ue,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function pe(e){return e.usage(`$0 o11y destinations update <slug>
|
|
13
13
|
|
|
14
|
-
Update an existing Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json.`}).option(`configuration-replace-headers`,{type:`boolean`,description:`The configuration.replaceHeaders field`}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{
|
|
14
|
+
Update an existing Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json.`}).option(`configuration-replace-headers`,{type:`boolean`,description:`The configuration.replaceHeaders field`}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`configuration-headers`,`configuration-replace-headers`,`configuration-type`,`configuration-url`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`configuration-headers`,`configuration-type`,`configuration-url`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --configuration-* flag is set`)}return!0})}const me={command:`update <slug>`,describe:`Update Destination`,builder:pe,handler:async e=>l({command:`o11y destinations update`,classification:{safeFlags:[`configuration-replace-headers`,`configuration-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y destinations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations/${e.slug==null?`<slug>`:encodeURIComponent(String(e.slug))}`,pathParams:{slug:String(e.slug??``)},bodyKind:`json`,body:e.body===void 0?p({configuration:{headers:f(e[`configuration-headers`],`configuration-headers`),replaceHeaders:e[`configuration-replace-headers`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled},[[`configuration`,`headers`]]):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(S,{body:t,account_id:l,slug:e.slug}));o(n,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({configuration:{headers:f(e[`configuration-headers`],`configuration-headers`),replaceHeaders:e[`configuration-replace-headers`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled},[[`configuration`,`headers`]]),h=await c(`Updating`,async()=>i.send(S,{body:u,account_id:l,slug:e.slug}));o(h,{successLabel:`Updated`})})},he={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(oe).command(le).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}/members`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function w(e){return e.usage(`$0 o11y issues add <groupId>
|
|
15
15
|
|
|
16
16
|
Add one or more ungrouped issues to an existing issue group.`).positional(`group-id`,{type:`string`,description:`GroupId`,demandOption:!0}).option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds 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 T={command:`add <groupId>`,describe:`Add issue group members`,builder:w,handler:async e=>l({command:`o11y issues add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({issueIds:e[`issue-ids`]}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(C,{body:t,account_id:l,groupId:e[`group-id`]}));o(n,{successLabel:`Created`});return}if(e[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);let u=p({issueIds:e[`issue-ids`]}),f=await c(`Creating`,async()=>i.send(C,{body:u,account_id:l,groupId:e[`group-id`]}));o(f,{successLabel:`Created`})})};var E={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations`,body:`json`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function D(e){return e.usage(`$0 o11y issues automations create
|
|
17
17
|
|
|
@@ -47,17 +47,17 @@ List resources configured for Workers Observability metrics export.`).option(`dr
|
|
|
47
47
|
|
|
48
48
|
Create or replace resources configured for Workers Observability metrics export.`).option(`requester-requester-id`,{type:`string`,description:`The requester.requesterId field`}).option(`requester-requester-type`,{type:`string`,description:`The requester.requesterType field`,choices:[`workers`]}).coerce(`requester-requester-type`,e=>m(e,`requester-requester-type`,`text`)).option(`resources`,{type:`string`,description:`The resources field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Je={command:`upsert`,describe:`Upsert Metrics Exports`,builder:qe,handler:async e=>l({command:`o11y metrics-export upsert`,classification:{safeFlags:[`requester-requester-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y metrics-export upsert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/metricsexport`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({requester:{requesterId:m(e[`requester-requester-id`],`requester-requester-id`,`text`),requesterType:e[`requester-requester-type`]},resources:u(e.resources,`resources`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(H,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`requester-requester-id`]===void 0&&(e[`requester-requester-id`]=await h(`requester-requester-id`,`The requester.requesterId field`)),e[`requester-requester-type`]===void 0&&(e[`requester-requester-type`]=await g(`requester-requester-type`,`The requester.requesterType field`,[`workers`])),e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let f=p({requester:{requesterId:m(e[`requester-requester-id`],`requester-requester-id`,`text`),requesterType:e[`requester-requester-type`]},resources:u(e.resources,`resources`)}),_=await c(`Creating`,async()=>i.send(H,{body:f,account_id:l}));o(_,{successLabel:`Created`})})},Ye={command:`metrics-export`,describe:`Operations for metrics-export`,builder:e=>e.command(Ke).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries`,body:`json`,errors:{401:`UnauthorizedError`,409:`ConflictError`,500:`InternalServerError`}};function Xe(e){return e.usage(`$0 o11y queries create
|
|
49
49
|
|
|
50
|
-
Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const Ze={command:`create`,describe:`Save query`,builder:Xe,handler:async e=>l({command:`o11y queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(U,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`))
|
|
50
|
+
Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`}).check(e=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-order-by-* flag is set`)}return!0})}const Ze={command:`create`,describe:`Save query`,builder:Xe,handler:async e=>l({command:`o11y queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(U,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`));let f=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),g=await c(`Creating`,async()=>i.send(U,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var Qe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function $e(e){return e.usage(`$0 o11y queries delete <queryId>
|
|
51
51
|
|
|
52
52
|
Delete a saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,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 <queryId>`,describe:`Delete query`,builder:$e,handler:async e=>l({command:`o11y queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Qe,{account_id:l,queryId:e[`query-id`]}));o(u,{successLabel:`Deleted`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function tt(e){return e.usage(`$0 o11y queries edit <queryId>
|
|
53
53
|
|
|
54
|
-
Update saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const nt={command:`edit <queryId>`,describe:`Update query`,builder:tt,handler:async e=>l({command:`o11y queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(W,{body:t,account_id:l,queryId:e[`query-id`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`))
|
|
54
|
+
Update saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`}).check(e=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-order-by-* flag is set`)}return!0})}const nt={command:`edit <queryId>`,describe:`Update query`,builder:tt,handler:async e=>l({command:`o11y queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(W,{body:t,account_id:l,queryId:e[`query-id`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`));let f=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),g=await c(`Updating`,async()=>i.send(W,{body:f,account_id:l,queryId:e[`query-id`]}));o(g,{successLabel:`Updated`})})};var rt={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function it(e){return e.usage(`$0 o11y queries get <queryId>
|
|
55
55
|
|
|
56
56
|
Retrieve a saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const at={command:`get <queryId>`,describe:`Get query`,builder:it,handler:async e=>l({command:`o11y queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(rt,{account_id:l,queryId:e[`query-id`]}));o(u,{successLabel:`Loaded`})})};var ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries`,query:[`page`,`perPage`,`order`,`orderBy`],errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function st(e){return e.usage(`$0 o11y queries list
|
|
57
57
|
|
|
58
58
|
List saved queries.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`list`,describe:`List queries`,builder:st,handler:async e=>l({command:`o11y queries list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},e,async()=>{let i={page:e.page,perPage:e[`per-page`],order:e.order,orderBy:e[`order-by`]};if(e.dryRun){let e=await r();s({command:`cf o11y queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ot,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})},lt={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(Ze).command(et).command(nt).command(at).command(ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/shared/query`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ut(e){return e.usage(`$0 o11y shared-queries create
|
|
59
59
|
|
|
60
|
-
Shared queries store the results of a previously run query, allowing you to share the results with others.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-calculations`,{type:`string`,description:`Aggregation calculations to compute (e.g. count, avg, p99). Each calculation produces aggregate values and optional time-series data. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Filters to narrow query results. Use the keys and values endpoints to discover available fields before building filters. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Post-aggregation filters applied to calculation results. Use to filter groups after aggregation (e.g. only groups where count > 100). Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sharable link to a query result.`}).check(e=>{if([`parameters-calculations`,`parameters-datasets`,`parameters-filter-combination`,`parameters-filters`,`parameters-group-bys`,`parameters-havings`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const dt={command:`create`,describe:`Create a sharable link to a query result`,builder:ut,handler:async e=>l({command:`o11y shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y shared-queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/shared/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(G,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let f=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),g=await c(`Creating`,async()=>i.send(G,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/shared/query/${t.id}`,query:[`view`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function pt(e){return e.usage(`$0 o11y shared-queries get <id>
|
|
60
|
+
Shared queries store the results of a previously run query, allowing you to share the results with others.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`preview`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-calculations`,{type:`string`,description:`Aggregation calculations to compute (e.g. count, avg, p99). Each calculation produces aggregate values and optional time-series data. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Filters to narrow query results. Use the keys and values endpoints to discover available fields before building filters. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Post-aggregation filters applied to calculation results. Use to filter groups after aggregation (e.g. only groups where count > 100). Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sharable link to a query result.`}).check(e=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-order-by-* flag is set`)}return!0})}const dt={command:`create`,describe:`Create a sharable link to a query result`,builder:ut,handler:async e=>l({command:`o11y shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`preview`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y shared-queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/shared/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],dry:e.preview,granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(G,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let f=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],dry:e.preview,granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),g=await c(`Creating`,async()=>i.send(G,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/shared/query/${t.id}`,query:[`view`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function pt(e){return e.usage(`$0 o11y shared-queries get <id>
|
|
61
61
|
|
|
62
62
|
Shared queries store the results of a previously run query, allowing you to share the results with others.`).positional(`id`,{type:`string`,description:`Specify the ID of the shared query.`,demandOption:!0}).option(`view`,{type:`string`,description:`Select the view of the query result to return, defaults to events.`,choices:[`events`,`invocations`,`calculations`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`get <id>`,describe:`View a query that has been shared`,builder:pt,handler:async e=>l({command:`o11y shared-queries get`,classification:{safeFlags:[`view`,`dry-run`]}},e,async()=>{let i={view:e.view};if(e.dryRun){let t=await r();s({command:`cf o11y shared-queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/shared/query/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ft,{account_id:u,id:e.id,...i}));o(d,{successLabel:`Loaded`})})},ht={command:`shared-queries`,describe:`Operations for shared-queries`,builder:e=>e.command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/live-tail/heartbeat`,body:`json`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function gt(e){return e.usage(`$0 o11y telemetry heartbeat
|
|
63
63
|
|
|
@@ -67,7 +67,7 @@ List all the keys in your telemetry events.`).option(`datasets`,{type:`string`,a
|
|
|
67
67
|
|
|
68
68
|
Prepare websocket server for live tail.`).option(`filter-combination`,{type:`string`,description:`Set a flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`],default:`and`}).coerce(`filter-combination`,e=>m(e,`filter-combination`,`text`)).option(`filters`,{type:`string`,description:`Apply filters to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`script-id`,{type:`string`,description:`The scriptId field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create websocket server for live tail.`})}const xt={command:`live-tail`,describe:`Prepare live tail`,builder:bt,handler:async e=>l({command:`o11y telemetry live-tail`,classification:{safeFlags:[`filter-combination`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry live-tail`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/live-tail`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({filterCombination:e[`filter-combination`],filters:u(e.filters,`filters`),scriptId:m(e[`script-id`],`script-id`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(J,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let f=p({filterCombination:e[`filter-combination`],filters:u(e.filters,`filters`),scriptId:m(e[`script-id`],`script-id`,`text`)}),h=await c(`Creating`,async()=>i.send(J,{body:f,account_id:l}));o(h,{successLabel:`Created`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/query`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function St(e){return e.usage(`$0 o11y telemetry query
|
|
69
69
|
|
|
70
|
-
Run a temporary or saved query.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-calculations`,{type:`string`,description:`Aggregation calculations to compute (e.g. count, avg, p99). Each calculation produces aggregate values and optional time-series data. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Filters to narrow query results. Use the keys and values endpoints to discover available fields before building filters. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Post-aggregation filters applied to calculation results. Use to filter groups after aggregation (e.g. only groups where count > 100). Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{if([`parameters-calculations`,`parameters-datasets`,`parameters-filter-combination`,`parameters-filters`,`parameters-group-bys`,`parameters-havings`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const Ct={command:`query`,describe:`Run a query`,builder:St,handler:async e=>l({command:`o11y telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Loading`,async()=>i.send(Y,{body:t,account_id:l}));o(n,{successLabel:`Loaded`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let f=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),g=await c(`Loading`,async()=>i.send(Y,{body:f,account_id:l}));o(g,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/values`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function wt(e){return e.usage(`$0 o11y telemetry values
|
|
70
|
+
Run a temporary or saved query.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`preview`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-calculations`,{type:`string`,description:`Aggregation calculations to compute (e.g. count, avg, p99). Each calculation produces aggregate values and optional time-series data. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Filters to narrow query results. Use the keys and values endpoints to discover available fields before building filters. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Post-aggregation filters applied to calculation results. Use to filter groups after aggregation (e.g. only groups where count > 100). Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-order-by-* flag is set`)}return!0})}const Ct={command:`query`,describe:`Run a query`,builder:St,handler:async e=>l({command:`o11y telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`preview`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],dry:e.preview,granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Loading`,async()=>i.send(Y,{body:t,account_id:l}));o(n,{successLabel:`Loaded`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let f=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],dry:e.preview,granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),g=await c(`Loading`,async()=>i.send(Y,{body:f,account_id:l}));o(g,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/values`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function wt(e){return e.usage(`$0 o11y telemetry values
|
|
71
71
|
|
|
72
72
|
List unique values found in your events.`).option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters before listing values. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`key`,{type:`string`,description:`The key field`}).option(`limit`,{type:`number`,description:`The limit field`,default:50}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`timeframe-from`,{type:`number`,description:`The timeframe.from field`}).option(`timeframe-to`,{type:`number`,description:`The timeframe.to field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`string`,`boolean`,`number`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Retrieve values from your telemetry events.`})}const Tt={command:`values`,describe:`List values`,builder:wt,handler:async e=>l({command:`o11y telemetry values`,classification:{safeFlags:[`needle-is-regex`,`needle-match-case`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry values`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/values`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({datasets:e.datasets,filters:u(e.filters,`filters`),key:m(e.key,`key`,`text`),limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},type:e.type}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(X,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.datasets===void 0)throw Error(`--datasets is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`The key field`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await g(`type`,`The type field`,[`string`,`boolean`,`number`]));let f=p({datasets:e.datasets,filters:u(e.filters,`filters`),key:m(e.key,`key`,`text`),limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},type:e.type}),_=await c(`Creating`,async()=>i.send(X,{body:f,account_id:l}));o(_,{successLabel:`Created`})})},Et={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(_t).command(yt).command(xt).command(Ct).command(Tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dt={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Ot(e){return e.usage(`$0 o11y tracing rules delete
|
|
73
73
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-
|
|
2
|
+
export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-BmSFLp_s.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{t as n}from"./cli-exit-CstFZ1eJ.mjs";import{n as r,t as i}from"./version-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{t as n}from"./cli-exit-CstFZ1eJ.mjs";import{n as r,t as i}from"./version-Zr2oF8mY.mjs";import{n as a}from"./blocks-C8vyXIAT.mjs";import{t as o}from"./session-D2yuwO4i.mjs";import{t as s}from"./errors-DatLr-iR.mjs";import{n as c,t as l}from"./project-settings-nBMEx1f-.mjs";import{n as u,o as d,r as f,s as p}from"./cf-hP0SOgC6.mjs";import{c as m,i as h,l as g,o as _}from"./log-BWdaOGOW.mjs";import{n as v}from"./context-Dp4CXG22.mjs";import{n as y}from"./interactive-wQM7Blhm.mjs";import{i as b}from"./dialog-D5lus4M4.mjs";import{relative as x}from"node:path";function S(t,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,o=n.columns??(i.columns||80),s=c(r),u=s?x(r,s):l,d=s?`To make this the project's default account, add accountId to ${u}:`:`To make this the project's default account, create ${u}:`,f=/* @__PURE__ */ new Set([`accountId`,u]),p=a(d,Math.max(20,o-3)).map(t=>t.split(` `).map(t=>{let n=t.replace(/:$/,``);return f.has(n)?`${e.code(n)}${t.slice(n.length)}`:t}).join(` `));h.info(p.join(`
|
|
3
3
|
`),{output:i});let m=`accountId: ${e.jsonString(JSON.stringify(t))},`,g=s?[m]:[`import { defineConfig } from "cf/config";`,``,`export default defineConfig({`,` ${m}`,`});`],_=` `.repeat(3);i.write(`\n${g.map(e=>e&&_+e).join(`
|
|
4
4
|
`)}\n\n`)}const C={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var w=class extends Error{};async function T(e){if(y())throw new w;o(r);let t=await m({message:b(e),output:process.stderr});if(g(t)||typeof t!=`string`)throw new n(130,{cancelled:!0});return t}async function E(e,i){if(y())throw new w;o(r);let a=await _({message:e,output:process.stderr,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(g(a)||typeof a!=`string`)throw new n(130,{cancelled:!0});return t()||S(a),a}const D=u({logger:C,userAgent:i,prompt:T,select:E,isNoDefaultValueProvidedError:e=>e instanceof w});let O=!1;function k(e,t){O=e,D.setTemporaryAllowed(e,t)}function A(){return O}async function j(e){if(!A())throw Error(`Temporary accounts require --temporary-account.`);try{let t=await D.requireAuth({compliance_region:e?.complianceRegion??await v(e)}),{apiToken:n}=D.requireApiToken();return{accountId:t,apiToken:n}}catch(e){throw e instanceof Error&&(e.message=e.message.replaceAll(/--temporary(?!-account)/g,`--temporary-account`)),e}}async function M(e,t){try{return await D.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await v(t)})}catch(e){throw e instanceof Error&&!(`reason`in e)&&`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&y()&&D.getAPIToken()===void 0?new s(e.message,{cause:e}):e}}function N(){return D.getActiveAccountId({})}async function P(){return D.fetchAllAccounts({compliance_region:await v()},{throwOnEmpty:!1})}async function F(e){if(e?.scopes&&!p(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return D.login({compliance_region:await v()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function I(e){return D.logout(e)}function L(e){D.setProfile(e)}function R(e){d(e,{logger:C,getCredentialStore:()=>D.getCredentialStore()})}function z(){return D.getActiveProfile()}function B(){return f({logger:C})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return L(n),n}function H(){return D.getOAuthTokenFromLocalState()}function U(){return D.readAuthCredentials()?.oauth_token!==void 0}function W(){return D.readAuthCredentials()}function G(){return D.getCredentialStore().path()}export{k as _,M as a,U as c,I as d,W as f,L as g,R as h,G as i,A as l,V as m,N as n,B as o,j as p,z as r,H as s,P as t,F as u};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/observability/usage/limit`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 observability usage-limit get
|
|
3
|
+
|
|
4
|
+
Whether Workers Observability is keeping fewer of the account's events, usually because it passed its daily limit, and what that limit is. Daily limits reset at 00:00 UTC; paid accounts are brought back in stages over the following hours.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get usage limit status`,builder:u,handler:async e=>c({command:`observability usage-limit get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf observability usage-limit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/observability/usage/limit`,pathParams:{},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u}));a(d,{successLabel:`Loaded`})})},f={command:`usage-limit`,describe:`Operations for usage-limit`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},p={command:`observability`,describe:`observability`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-FK2eLQ02.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-D0dXwuME.mjs";function m(e){return e.usage("$0 organization account list\n\nRetrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included. Use `page_token` and `page_size` for cursor pagination, or provide `page` and `per_page` together for legacy offset pagination. Cursor pagination takes precedence when requested. The default response uses Account fields; `Accept: application/json; legacy=true` requests the LegacyAccount representation.").option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-sensitive) Filter the list of accounts to where the account_pubname is equal to
|
|
3
|
+
a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
|
|
4
|
+
a particular string.`}).option(`account-pubname-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname ends with
|
|
5
|
+
a particular string.`}).option(`account-pubname-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname contains
|
|
6
|
+
a particular string.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of accounts to where the name is equal to a
|
|
7
|
+
particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name starts with a
|
|
8
|
+
particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name ends with a particular
|
|
9
|
+
string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name contains a particular
|
|
10
|
+
string.`}).option(`status`,{type:`string`,description:"Filter accounts by lifecycle status. Defaults to `active`.",choices:[`active`,`deleted`]}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-tags`,{type:`boolean`,description:`Include Account tags from the resource tag mirror. Omit this parameter to preserve the existing Account response shape.`}).option(`include-total`,{type:`boolean`,description:`Whether to calculate and return the exact result_info.total_size for cursor
|
|
11
|
+
pagination. Defaults to true. When false, total_size is omitted. page_size and
|
|
12
|
+
include_total may change between pages; next_page_token remains the authoritative
|
|
13
|
+
continuation signal.
|
|
14
|
+
Legacy page/per_page requests always calculate total_count.`}).option(`page`,{type:`number`,description:"Legacy offset page number. Must be provided with `per_page`. Values below 1 are treated as\n1. Cursor pagination takes precedence when requested."}).option(`per-page`,{type:`number`,description:"Legacy offset page size. Must be provided with `page`. Values are clamped to the range\n1-100. Cursor pagination takes precedence when requested."}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
|
|
15
|
+
provided will retrieve the next page.
|
|
16
|
+
|
|
17
|
+
Parameters used to filter the retrieved list must remain in subsequent
|
|
18
|
+
requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`accept`,{type:`string`,description:"Request `application/json; legacy=true` for the LegacyAccount representation."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`list`,describe:`List organization accounts`,builder:m,handler:async e=>o({command:`organization account list`,classification:{safeFlags:[`status`,`order-by`,`direction`,`include-tags`,`include-total`,`dry-run`]}},e,async()=>{let o={account_pubname:e[`account-pubname`],"account_pubname.startsWith":e[`account-pubname-starts-with`],"account_pubname.endsWith":e[`account-pubname-ends-with`],"account_pubname.contains":e[`account-pubname-contains`],name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],status:e.status,order_by:e[`order-by`],direction:e.direction,include_tags:e[`include-tags`],include_total:e[`include-total`],page:e.page,per_page:e[`per-page`],page_token:e[`page-token`],page_size:e[`page-size`]},s={};if(e.accept!==void 0&&(s.Accept=String(e.accept)),e.dryRun){i({command:`cf organization account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/accounts`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:o,bodyKind:`none`});return}let c=await n(e),l=await a(`Loading`,async()=>t(c,`GET`,`/organizations/${encodeURIComponent(String(e[`organization-id`]))}/accounts`,{query:o,headers:Object.keys(s).length>0?s:void 0}));r(l,{successLabel:`Loaded`})})},g={command:`account`,describe:`Operations for account`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _={method:`POST`,path:()=>`/organizations`,body:`json`};function ee(e){return e.usage(`$0 organization create
|
|
19
|
+
|
|
20
|
+
Create a new organization for a user. Sub-organization creation availability depends on the organization's capabilities. The optional \`profile\` object accepts partial profile details; its individual fields are not required. Organization names are limited to 65 UTF-8 bytes. Each profile field is limited to 1,000 UTF-8 bytes, and a non-empty business email must be valid. At least one of business name, address, phone, or email must be non-empty to persist a profile.`).option(`name`,{type:`string`,description:`The Organization name, limited to 65 UTF-8 bytes.`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create organization`,builder:ee,handler:async e=>o({command:`organization create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({name:u(e.name,`name`,`text`),parent:{id:u(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:u(e[`profile-business-address`],`profile-business-address`,`text`),business_email:u(e[`profile-business-email`],`profile-business-email`,`text`),business_name:u(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:u(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:u(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):c(e.body)});return}let t=await n(e);if(e.body){let n=c(e.body),i=await a(`Creating`,async()=>t.send(_,{body:n}));r(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await d(`name`,`The Organization name, limited to 65 UTF-8 bytes.`));let o=l({name:u(e.name,`name`,`text`),parent:{id:u(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:u(e[`profile-business-address`],`profile-business-address`,`text`),business_email:u(e[`profile-business-email`],`profile-business-email`,`text`),business_name:u(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:u(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:u(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),s=await a(`Creating`,async()=>t.send(_,{body:o}));r(s,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}`};function y(e){return e.usage(`$0 organization delete <organization-id>
|
|
21
|
+
|
|
22
|
+
Delete an organization. It must not contain active sub-organizations or accounts. A root organization must also have no active managed users. Sub-organization deletion availability depends on the organization's capabilities. **Access Control:** Root deletion is restricted to enterprise organizations.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <organization-id>`,describe:`Delete organization`,builder:y,handler:async e=>o({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let t=await n(e);if(!await p({force:!!e.force,message:`Delete this empty organization? This action cannot be undone.`}))return;let o=await a(`Deleting`,async()=>t.send(v,{organization_id:e[`organization-id`]}));r(o,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/organizations/${t.organization_id}`};function S(e){return e.usage(`$0 organization get <organization-id>
|
|
23
|
+
|
|
24
|
+
Retrieve the details of a certain organization.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <organization-id>`,describe:`Get organization`,builder:S,handler:async e=>o({command:`organization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let t=await n(e),o=await a(`Loading`,async()=>t.send(x,{organization_id:e[`organization-id`]}));r(o,{successLabel:`Loaded`})})};var w={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/invites/${t.member_code}`,body:`json`};function T(e){return e.usage(`$0 organization invite update <member-code>
|
|
25
|
+
|
|
26
|
+
Accept or reject an invitation to a specific organization. The credential must belong to the invited user. No additional API token permission is required.`).positional(`member-code`,{type:`string`,description:`The invitation code to accept or reject.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The ID of the organization associated with the invitation.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`accept`,`reject`]}).coerce(`status`,e=>u(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The invitation action. Use `accept` to join the organization or `reject` to decline the invitation."})}const E={command:`update <member-code>`,describe:`Handle organization invite`,builder:T,handler:async e=>o({command:`organization invite update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization invite update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/invites/${e[`member-code`]==null?`<member-code>`:encodeURIComponent(String(e[`member-code`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-code":String(e[`member-code`]??``)},bodyKind:`json`,body:e.body===void 0?l({status:e.status}):c(e.body)});return}let t=await n(e);if(e.body){let n=c(e.body),i=await a(`Updating`,async()=>t.send(w,{body:n,organization_id:e[`organization-id`],member_code:e[`member-code`]}));r(i,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await f(`status`,`The status field`,[`accept`,`reject`]));let o=l({status:e.status}),s=await a(`Updating`,async()=>t.send(w,{body:o,organization_id:e[`organization-id`],member_code:e[`member-code`]}));r(s,{successLabel:`Updated`})})},D={command:`invite`,describe:`Operations for invite`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:()=>`/organizations`,query:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`member.email`,`order_by`,`direction`,`page_token`,`page_size`],joined:[`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`order_by`,`direction`,`page_token`,`page_size`]};function k(e){return e.usage("$0 organization list\n\nRetrieve a list of organizations a particular user has access to. At most one of `containing.account`, `containing.user`, or `containing.organization` may be provided.").option(`id`,{type:`string`,array:!0,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
|
|
27
|
+
by repeating the query value.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of organizations to where the name is equal to a
|
|
28
|
+
particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name starts with a
|
|
29
|
+
particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name ends with a particular
|
|
30
|
+
string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name contains a particular
|
|
31
|
+
string.`}).option(`containing-account`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
|
|
32
|
+
account.`}).option(`containing-user`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
|
|
33
|
+
user.
|
|
34
|
+
|
|
35
|
+
IMPORTANT: Just because an organization "contains" a user is not a
|
|
36
|
+
representation of any authorization or privilege to manage any resources
|
|
37
|
+
therein. An organization "containing" a user simply means the user is managed by
|
|
38
|
+
that organization.`}).option(`containing-organization`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
|
|
39
|
+
organization.`}).option(`parent-id`,{type:`string`,description:`Filter the list of organizations to the ones that are a sub-organization
|
|
40
|
+
of the specified organization.
|
|
41
|
+
|
|
42
|
+
"null" is a valid value to provide for this parameter. It means "where
|
|
43
|
+
an organization has no parent (i.e. it is a 'root' organization)."`}).option(`member-email`,{type:`string`,description:`Filter organizations to those where the given user, by email, is an active member of
|
|
44
|
+
that exact organization. This does not include hierarchy-derived access.`}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `name`.\nWhen not specified, results are ordered by hierarchy.",choices:[`name`]}).option(`direction`,{type:`string`,description:"Sort direction for the `order_by` field. Defaults to `asc` when `order_by` is\nspecified.",choices:[`asc`,`desc`]}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
|
|
45
|
+
provided will retrieve the next page.
|
|
46
|
+
|
|
47
|
+
Parameters used to filter the retrieved list must remain in subsequent
|
|
48
|
+
requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List organizations the user has access to`,builder:k,handler:async e=>o({command:`organization list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let t={id:e.id,name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],"containing.account":e[`containing-account`],"containing.user":e[`containing-user`],"containing.organization":e[`containing-organization`],"parent.id":e[`parent-id`],"member.email":e[`member-email`],order_by:e[`order-by`],direction:e.direction,page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){i({command:`cf organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},query:t,bodyKind:`none`});return}let o=await n(e),s=await a(`Loading`,async()=>o.send(O,t));r(s,{successLabel:`Loaded`})})};var j={method:`POST`,path:t=>e`/organizations/${t.organization_id}/members:batchCreate`,body:`json`};function M(e){return e.usage(`$0 organization member batch create <organization-id>
|
|
49
|
+
|
|
50
|
+
Batch create multiple memberships that grant access to a specific Organization.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`members`,{type:`string`,description:`Omitted or null members are treated as an empty batch. 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 <organization-id>`,describe:`Batch create organization members`,builder:M,handler:async e=>o({command:`organization member batch create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization member batch create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members:batchCreate`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({members:s(e.members,`members`)}):c(e.body)});return}let t=await n(e);if(e.body){let n=c(e.body),i=await a(`Creating`,async()=>t.send(j,{body:n,organization_id:e[`organization-id`]}));r(i,{successLabel:`Created`});return}let o=l({members:s(e.members,`members`)}),u=await a(`Creating`,async()=>t.send(j,{body:o,organization_id:e[`organization-id`]}));r(u,{successLabel:`Created`})})},P={command:`batch`,describe:`Operations for member.batch`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/organizations/${t.organization_id}/members`,body:`json`};function I(e){return e.usage(`$0 organization member create <organization-id>
|
|
51
|
+
|
|
52
|
+
Create a membership that grants access to a specific Organization.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`member-user-email`,{type:`string`,description:`The member.user.email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`create <organization-id>`,describe:`Create organization member`,builder:I,handler:async e=>o({command:`organization member create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization member create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({member:{user:{email:u(e[`member-user-email`],`member-user-email`,`text`)}}}):c(e.body)});return}let t=await n(e);if(e.body){let n=c(e.body),i=await a(`Creating`,async()=>t.send(F,{body:n,organization_id:e[`organization-id`]}));r(i,{successLabel:`Created`});return}e[`member-user-email`]===void 0&&(e[`member-user-email`]=await d(`member-user-email`,`The member.user.email field`));let o=l({member:{user:{email:u(e[`member-user-email`],`member-user-email`,`text`)}}}),s=await a(`Creating`,async()=>t.send(F,{body:o,organization_id:e[`organization-id`]}));r(s,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`};function R(e){return e.usage(`$0 organization member delete <member-id>
|
|
53
|
+
|
|
54
|
+
Delete a membership to a particular Organization.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const z={command:`delete <member-id>`,describe:`Delete organization member`,builder:R,handler:async e=>o({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let t=await n(e);if(!await p({force:!!e.force,message:`Delete this organization membership? The member will lose access to this organization and its sub-organizations.`}))return;let o=await a(`Deleting`,async()=>t.send(ne,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));r(o,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`};function V(e){return e.usage(`$0 organization member get <member-id>
|
|
55
|
+
|
|
56
|
+
Retrieve a single membership from an Organization.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <member-id>`,describe:`Get organization member`,builder:V,handler:async e=>o({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let t=await n(e),o=await a(`Loading`,async()=>t.send(B,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));r(o,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members`,query:[`status`,`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`],joined:[`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`]};function W(e){return e.usage(`$0 organization member list
|
|
57
|
+
|
|
58
|
+
List memberships for an Organization.`).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,array:!0,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
|
|
59
|
+
provided will retrieve the next page.
|
|
60
|
+
|
|
61
|
+
Parameters used to filter the retrieved list must remain in subsequent
|
|
62
|
+
requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List organization members`,builder:W,handler:async e=>o({command:`organization member list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={status:e.status,"user.email":e[`user-email`],"user.email.contains":e[`user-email-contains`],"user.email.startsWith":e[`user-email-starts-with`],"user.email.endsWith":e[`user-email-ends-with`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){i({command:`cf organization member list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:t,bodyKind:`none`});return}let o=await n(e),s=await a(`Loading`,async()=>o.send(U,{organization_id:e[`organization-id`],...t}));r(s,{successLabel:`Loaded`})})},K={command:`member`,describe:`Operations for member`,builder:e=>e.command(L).command(z).command(H).command(G).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`GET`,path:t=>e`/organizations/${t.organization_id}/profile`};function J(e){return e.usage(`$0 organization profile get <organization-id>
|
|
63
|
+
|
|
64
|
+
Retrieves the business profile (name, email, phone, address, and external metadata) associated with this organization's customer record. Profiles can be shared across accounts and organizations. Only available to members of the organization.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a profile for.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <organization-id>`,describe:`Get organization profile`,builder:J,handler:async e=>o({command:`organization profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let t=await n(e),o=await a(`Loading`,async()=>t.send(q,{organization_id:e[`organization-id`]}));r(o,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/profile`,body:`json`,response:!1};function Z(e){return e.usage(`$0 organization profile update <organization-id>
|
|
65
|
+
|
|
66
|
+
Partially updates the business profile (name, email, phone, address, and external metadata) associated with this organization's customer record, creating the profile if it does not exist. Changes apply to every account and organization sharing that profile. Omitted, empty, or null fields are left unchanged. Each profile field is limited to 1,000 UTF-8 bytes. Only available to members of the organization.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial business profile update. Omitted, empty, or null fields remain unchanged. At least one of business name, address, phone, or email must be non-empty.`})}const re={command:`update <organization-id>`,describe:`Modify organization profile.`,builder:Z,handler:async e=>o({command:`organization profile update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({business_address:u(e[`business-address`],`business-address`,`text`),business_email:u(e[`business-email`],`business-email`,`text`),business_name:u(e[`business-name`],`business-name`,`text`),business_phone:u(e[`business-phone`],`business-phone`,`text`),external_metadata:u(e[`external-metadata`],`external-metadata`,`text`)}):c(e.body)});return}let t=await n(e);if(e.body){let n=c(e.body),i=await a(`Updating`,async()=>t.send(X,{body:n,organization_id:e[`organization-id`]}));r(i,{successLabel:`Updated`});return}let o=l({business_address:u(e[`business-address`],`business-address`,`text`),business_email:u(e[`business-email`],`business-email`,`text`),business_name:u(e[`business-name`],`business-name`,`text`),business_phone:u(e[`business-phone`],`business-phone`,`text`),external_metadata:u(e[`external-metadata`],`external-metadata`,`text`)}),s=await a(`Updating`,async()=>t.send(X,{body:o,organization_id:e[`organization-id`]}));r(s,{successLabel:`Updated`})})},ie={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(Y).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae={method:`GET`,path:t=>e`/organizations/${t.organization_id}/shares`,query:[`status`,`kind`,`target_type`,`resource_types`,`order`,`direction`,`page`,`per_page`]};function oe(e){return e.usage(`$0 organization share list
|
|
67
|
+
|
|
68
|
+
Lists all organization shares.`).option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,array:!0,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page` is supplied without `per_page`. May be omitted entirely along with `page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List organization shares`,builder:oe,handler:async e=>o({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},e,async()=>{let t={status:e.status,kind:e.kind,target_type:e[`target-type`],resource_types:e[`resource-types`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/shares`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:t,bodyKind:`none`});return}let o=await n(e),s=await a(`Loading`,async()=>o.send(ae,{organization_id:e[`organization-id`],...t}));r(s,{successLabel:`Loaded`})})},Q={command:`share`,describe:`Operations for share`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/organizations/${t.organization_id}`,body:`json`};function ce(e){return e.usage(`$0 organization update <organization-id>
|
|
69
|
+
|
|
70
|
+
Update an organization's name. Supplying \`parent_id\` verifies the current parent; this endpoint cannot move an organization. Organization names are limited to 65 UTF-8 bytes.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to modify.`,demandOption:!0}).option(`name`,{type:`string`,description:`The Organization's display name, limited to 65 UTF-8 bytes. An omitted, empty, or unchanged value is a no-op.`}).option(`parent-id`,{type:`string`,description:`The current parent Organization ID. A different value is rejected; this endpoint cannot move an Organization.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The Organization fields to update or verify.`})}const le={command:`update <organization-id>`,describe:`Update organization`,builder:ce,handler:async e=>o({command:`organization update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({name:u(e.name,`name`,`text`),parent_id:u(e[`parent-id`],`parent-id`,`text`)}):c(e.body)});return}let t=await n(e);if(e.body){let n=c(e.body),i=await a(`Updating`,async()=>t.send($,{body:n,organization_id:e[`organization-id`]}));r(i,{successLabel:`Updated`});return}let o=l({name:u(e.name,`name`,`text`),parent_id:u(e[`parent-id`],`parent-id`,`text`)}),s=await a(`Updating`,async()=>t.send($,{body:o,organization_id:e[`organization-id`]}));r(s,{successLabel:`Updated`})})},ue={command:`organization`,describe:`organization`,builder:e=>e.command(te).command(b).command(C).command(A).command(le).command(g).command(D).command(K).command(ie).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
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-FK2eLQ02.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-DLri-rA7.mjs";import{t as a}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";var o={method:`GET`,path:t=>e`/organizations/${t.organization_id}/billable/usage`,query:[`from`,`to`]};function s(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. Rated costs are available per account via `POST /accounts/{account_id}/billable/usage` with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:s,handler:async e=>a({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={from:e.from,to:e.to};if(e.dryRun){r({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(e),c=await i(`Loading`,async()=>s.send(o,{organization_id:e[`organization-id`],...a}));n(c,{successLabel:`Loaded`})})},l={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var d={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit`,query:/* @__PURE__ */ `action_result,action_type,actor_context,actor_email,actor_id,actor_ip_address,actor_token_id,actor_token_name,actor_type,id,raw_cf_ray_id,raw_method,raw_status_code,raw_uri,resource_id,resource_product,resource_type,resource_scope,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,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,since,before,direction,limit,cursor`.split(`,`)};function f(e){return e.usage(`$0 organizations logs audit get <organization-id>
|
|
3
3
|
|
|
4
4
|
Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,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's 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(`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 organization.`}).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's 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(`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 organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:f,handler:async e=>a({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let a={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`],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`],"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`],"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`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){r({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})};var m={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit/${t.id}/history`,query:[`action_time`,`since`,`before`,`direction`,`limit`,`cursor`],errors:{404:`NotFoundError`}};function h(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:h,handler:async e=>a({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let a={action_time:e[`action-time`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){r({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/logs/audit/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/history`,pathParams:{"organization-id":String(e[`organization-id`]??``),id:String(e.id??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(m,{organization_id:e[`organization-id`],id:e.id,...a}));n(s,{successLabel:`Loaded`})})},_={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(u).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{y 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-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u}from"./prompt-D0dXwuME.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`};function f(e){return e.usage(`$0 origin-post-quantum-encryption get
|
|
3
3
|
|
|
4
4
|
Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:f,handler:async e=>o({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`,body:`json`};function h(e){return e.usage(`$0 origin-post-quantum-encryption update
|
|
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{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-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-D0dXwuME.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/pagerules`,body:`json`};function p(e){return e.usage(`$0 page-rules create
|
|
3
3
|
|
|
4
4
|
Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
5
5
|
request. Actions can redirect to another URL or override settings, but
|