cf 1.0.0-beta.16 → 1.0.0-beta.18
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 +6117 -4540
- package/dist/_meta/schemas.json +5016 -3257
- package/dist/{abuse-reports-17K-TRhO.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
- package/dist/{access-BwB7sg1D.mjs → access-BtsMwesh.mjs} +1 -1
- package/dist/{accounts-BnIGu_ac.mjs → accounts-X5QVzEUW.mjs} +27 -21
- package/dist/{acm-CQRcu_zw.mjs → acm-C_NepMi6.mjs} +1 -1
- package/dist/{addressing-Qcm9jd3C.mjs → addressing-BkQY1hoA.mjs} +18 -18
- package/dist/{agent-memory-B3xN9I6-.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
- package/dist/{ai-BRKOCckA.mjs → ai-Bb0_Zknm.mjs} +1 -1
- package/dist/{ai-audit-Cd9Rc2Fc.mjs → ai-audit-DuEjVdML.mjs} +1 -1
- package/dist/{ai-gateway-BWU5064V.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
- package/dist/ai-search-DDRpxyOM.mjs +79 -0
- package/dist/{ai-security-Dn0Ee6QS.mjs → ai-security-A2STvE1b.mjs} +5 -5
- package/dist/{alerting-BXTiMfXo.mjs → alerting-CIwSk-Ks.mjs} +1 -1
- package/dist/{analytics-Jyd04TRW.mjs → analytics-H--uM3DA.mjs} +7 -7
- package/dist/{analytics-engine-CzrNfUeh.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
- package/dist/{api-security-DRBHZaf_.mjs → api-security-D-pcnhUL.mjs} +26 -26
- package/dist/{argo-DiQt0pSb.mjs → argo-Lvmcx3am.mjs} +1 -1
- package/dist/{artifacts-eBZ4YN53.mjs → artifacts-xT5S-mVa.mjs} +1 -1
- package/dist/{audit-logs-Bb4HTZay.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
- package/dist/{auth-C6My1gI6.mjs → auth-B73lQS2h.mjs} +1 -1
- package/dist/auth-DMzEmOhG.mjs +2 -0
- package/dist/{auth-eVI_UEt8.mjs → auth-Db1KT0vm.mjs} +1 -1
- package/dist/{auth-token-Cfj2yehs.mjs → auth-token-D9XIPlwf.mjs} +1 -1
- package/dist/{autoconfig-B0ESZ8DJ.mjs → autoconfig-9po_tqsS.mjs} +1 -1
- package/dist/{basin-catalog-Cwk1RSMX.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
- package/dist/{billing-CfV8oi6A.mjs → billing-Bm2JNSGa.mjs} +6 -6
- package/dist/body-parser-DnBfDdx3.mjs +2 -0
- package/dist/{bot-management-CH4_Kewx.mjs → bot-management-CSr38g-O.mjs} +4 -4
- package/dist/{botnet-feed-Cg_Wp8ei.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
- package/dist/{brand-protection-Cp2ckWou.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
- package/dist/browser-run-BcWxzhAn.mjs +42 -0
- package/dist/build-BRJnyeu8.mjs +2 -0
- package/dist/{build-sBpqm9ga.mjs → build-i8l2qGVZ.mjs} +1 -1
- package/dist/{builds-B2RBgVL9.mjs → builds-BMwDzi7G.mjs} +39 -39
- package/dist/{cache-yvrYPvRI.mjs → cache-_VaTLC5T.mjs} +1 -1
- package/dist/chunk-JP6R7L72-C0kFUelb.mjs +2 -0
- package/dist/cli-P3q5DG3W.mjs +6 -0
- package/dist/{client-side-security-D50iZjd_.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
- package/dist/{cloud-connector-wvSGdxWT.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
- package/dist/{cloudforce-one-j6vlmaMB.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
- package/dist/{command-CM_f48gs.mjs → command-BXiA79DP.mjs} +1 -1
- package/dist/{command-CmUtmu5j.mjs → command-BbsPxJBT.mjs} +1 -1
- package/dist/{command-BDpm-U8z.mjs → command-Bkc04OyY.mjs} +1 -1
- package/dist/{command-BSbhJRmu.mjs → command-BtTc28ql.mjs} +1 -1
- package/dist/{command-DFRsim8q.mjs → command-CBZhxmKD.mjs} +1 -1
- package/dist/{command-BbO3sBQ2.mjs → command-CL7LLXM7.mjs} +1 -1
- package/dist/{command-DQojhTEQ.mjs → command-CYyfigfC.mjs} +1 -1
- package/dist/{command-DiqRELHF.mjs → command-CxWLFv5Y.mjs} +1 -1
- package/dist/{command-74P4_CTx.mjs → command-DDcBC4px.mjs} +1 -1
- package/dist/{command-Dr4PEvB2.mjs → command-NoxvOARP.mjs} +1 -1
- package/dist/{completions-oD1EcuHk.mjs → completions-CrDmwKnK.mjs} +1 -1
- package/dist/{connector-interrupts-DP4rbOe8.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
- package/dist/{connector-telemetry-events-BQGBQwzR.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DBO0Mdcj.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
- package/dist/{connectors-BSVr3Kz1.mjs → connectors-DvVlxGDx.mjs} +1 -1
- package/dist/{containers-BTqAeVV2.mjs → containers-Bt2zFsFd.mjs} +8 -8
- package/dist/{containers-BOpKpipz.mjs → containers-BtcOgwm5.mjs} +2 -2
- package/dist/{content-scan-B9Keyxe-.mjs → content-scan-DldLmTjy.mjs} +1 -1
- package/dist/{context-B-vEsyrK.mjs → context-C_a8oSY9.mjs} +1 -1
- package/dist/cps-REo1OWP1.mjs +6 -0
- package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
- package/dist/{custom-csrs-DM5X-K6H.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
- package/dist/{custom-hostnames-BBjqaiFF.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
- package/dist/{custom-nameservers-C0NDMLPJ.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
- package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
- package/dist/{d1-hin5PmxW.mjs → d1-DvCiQibO.mjs} +8 -8
- package/dist/{deploy-Bo7FtE44.mjs → deploy-K664XPOb.mjs} +1 -1
- package/dist/{deploy-context-ClvBD87y.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
- package/dist/{deploy-input-BqJ7GVZ-.mjs → deploy-input-KK6yyBN_.mjs} +1 -1
- package/dist/{dev-EtnMYA7K.mjs → dev-CnoMHxf4.mjs} +1 -1
- package/dist/{diagnostics-LZuMrGjK.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
- package/dist/{dls-Bq8k3iy-.mjs → dls-DoqfqutH.mjs} +1 -1
- package/dist/{dns-ry5E2Bsa.mjs → dns-DC6WcO3m.mjs} +21 -21
- package/dist/{dns-firewall-zavP5Qxj.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
- package/dist/{docs-B08YtL0U.mjs → docs-CqNRBHab.mjs} +1 -1
- package/dist/{durable-objects-B9fo41B1.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
- package/dist/{email-auth-D9LGjFlh.mjs → email-auth--NHg1TjG.mjs} +1 -1
- package/dist/{email-routing-6iDnNPhY.mjs → email-routing-COjENK55.mjs} +13 -13
- package/dist/{email-security-ty4ufRnJ.mjs → email-security-rdjH95T2.mjs} +38 -38
- package/dist/{email-sending-d7LO_Cz_.mjs → email-sending-26VJhR6Q.mjs} +18 -18
- package/dist/{field-extractors-DkgQ7PSw.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
- package/dist/{firewall-Q88YyEwD.mjs → firewall-D8K93ffF.mjs} +20 -20
- package/dist/{flagship-CzI8zhd6.mjs → flagship-CHdmCmvQ.mjs} +11 -11
- package/dist/{fraud-CvFXTR0w.mjs → fraud-CY4TV5Vc.mjs} +1 -1
- package/dist/{google-tag-gateway-Y2zbyey8.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
- package/dist/healthchecks-B52Mf3uL.mjs +22 -0
- package/dist/{hostnames-B3k7fIUL.mjs → hostnames-BMITIM8P.mjs} +1 -1
- package/dist/{hyperdrive-BWGYz95H.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
- package/dist/{iam-AXco_qmt.mjs → iam-o1n9eUXf.mjs} +9 -9
- package/dist/{images-BzYh8y0u.mjs → images-CJHAGxX6.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/{init-DlenHBtS.mjs → init-CqQDL6i3.mjs} +1 -1
- package/dist/{intel-BBi3i_GU.mjs → intel-B3S1gxUg.mjs} +1 -1
- package/dist/{ips-CWG2b7AM.mjs → ips-q_UJMiy8.mjs} +1 -1
- package/dist/{k2-DXdMe3Cb.mjs → k2-BNqVZnDN.mjs} +2 -2
- package/dist/{kv-FUd7UdDu.mjs → kv-B0nXSOcW.mjs} +1 -1
- package/dist/{lazy-command-BC8rIlHu.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
- package/dist/{leaked-credential-checks-BufVA9vL.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
- package/dist/load-balancers-DJtMztJ0.mjs +76 -0
- package/dist/{login-DVbXZ_Tv.mjs → login-D-1FiBNv.mjs} +1 -1
- package/dist/{login-BJr2PBaJ.mjs → login-chQP8825.mjs} +1 -1
- package/dist/{logo-matches-BluaPvMa.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
- package/dist/{logos-CXtmYWEJ.mjs → logos-tnIahhcu.mjs} +1 -1
- package/dist/{logpush-DCYgrqz0.mjs → logpush-D4s3pJRw.mjs} +24 -24
- package/dist/{logs-as60IP29.mjs → logs-cw7UL5V2.mjs} +3 -3
- package/dist/{magic-cloud-networking-0RsHugUF.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
- package/dist/{magic-network-monitoring-CPqvZdcb.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
- package/dist/{magic-transit-ClPyGzOE.mjs → magic-transit-BFopRdPs.mjs} +170 -170
- package/dist/{managed-defense-P4_QWSbK.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
- package/dist/{managed-transforms-CUwQXMij.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
- package/dist/{matches-BjckDBW1.mjs → matches-ClJ_24EY.mjs} +1 -1
- package/dist/{mcp-C2EG2c7L.mjs → mcp-50os3IRG.mjs} +10 -10
- package/dist/{mesh-CpMZA7Xt.mjs → mesh-jxtQP8sS.mjs} +2 -2
- package/dist/{migrate-6e5mJ79R.mjs → migrate-DerOyuv2.mjs} +1 -1
- package/dist/{monetization-DypuCZmU.mjs → monetization-D6cCDi-h.mjs} +4 -4
- package/dist/{network-DQ5Ridgy.mjs → network-dnWHB2uY.mjs} +27 -25
- package/dist/{network-interconnects-ifU4JhGE.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
- package/dist/{o11y-CzssfRHt.mjs → o11y-oMSg1pG4.mjs} +49 -49
- package/dist/{oauth-BNTiErBG.mjs → oauth-BfBdHhPS.mjs} +1 -1
- package/dist/{oauth-BDdhqasa.mjs → oauth-DDOiiH7h.mjs} +1 -1
- package/dist/{oauth-clients-gknNcBdV.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
- package/dist/{oauth-scopes-BJeSanuF.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
- package/dist/open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs +4 -0
- package/dist/organization-94lHeeOs.mjs +75 -0
- package/dist/{organizations-kfFFW4uO.mjs → organizations-BJf3UTFi.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DfrnptJ1.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
- package/dist/{page-rules-ByrDMDBZ.mjs → page-rules-BUI-50oz.mjs} +4 -4
- package/dist/pages-CcdpCzHs.mjs +54 -0
- package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
- package/dist/{pay-per-use-49EXt75f.mjs → pay-per-use-t066I5wm.mjs} +7 -7
- package/dist/{pipelines-Bvgh1BQZ.mjs → pipelines-Co6S044l.mjs} +8 -8
- package/dist/precursor-BftyvS86.mjs +4 -0
- package/dist/previews-BLhnhElx.mjs +7 -0
- package/dist/{progress-R-1tIuep.mjs → progress-Q5w9PNTT.mjs} +1 -1
- package/dist/{prompt-dgLm0iFJ.mjs → prompt-C0hKSr-R.mjs} +1 -1
- package/dist/{queries-EbIadtC5.mjs → queries-4MubO6Sz.mjs} +3 -3
- package/dist/{queues-C4GZ-O3f.mjs → queues-CteS5M92.mjs} +17 -17
- package/dist/{r2-DEuFfWBR.mjs → r2-2QpT_Gso.mjs} +24 -24
- package/dist/{radar-CDOERVcR.mjs → radar-ODKaK4FJ.mjs} +1 -1
- package/dist/{raw-fetch-BapeoreV.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
- package/dist/{realtime-D_A9Qgly.mjs → realtime-DkfU8uEX.mjs} +84 -84
- package/dist/registrar-DM6JTVPS.mjs +43 -0
- package/dist/{registrar-sandbox-BF3cYO3n.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
- package/dist/{reporting-BWm9jIF8.mjs → reporting-5yFNXbJg.mjs} +1 -1
- package/dist/{request-headers-BRxv6NkA.mjs → request-headers-DXvswze2.mjs} +1 -1
- package/dist/request-tracers-BarLZY95.mjs +4 -0
- package/dist/{resource-sharing-C186jZv0.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
- package/dist/{rules-DYnGIU_0.mjs → rules-_C31X4Jz.mjs} +6 -6
- package/dist/{rulesets-BcNrbVcq.mjs → rulesets-8RwxoFhG.mjs} +6 -6
- package/dist/{rum-BDyRecfp.mjs → rum-CAUcpXpM.mjs} +6 -6
- package/dist/{run-BvDCuZ8q.mjs → run-DtFLvOHB.mjs} +1 -1
- package/dist/run-LcOb9rhI.mjs +2 -0
- package/dist/{schema-flags-DcKjAxI1.mjs → schema-flags-DibfxEF6.mjs} +1 -1
- package/dist/{scim-zn-CNCsc.mjs → scim-DX5XrQ4w.mjs} +1 -1
- package/dist/{secrets-store-CFhyQUV6.mjs → secrets-store-DSqqrr25.mjs} +1 -1
- package/dist/{security-insights-D8XgtCed.mjs → security-insights-FSktO04S.mjs} +1 -1
- package/dist/{security-txt-CCM-Vro0.mjs → security-txt-D2g3lQdg.mjs} +1 -1
- package/dist/{shared-ouAF7o4S.mjs → shared-eefMO8R4.mjs} +1 -1
- package/dist/smart-shield-IVb2sR0C.mjs +24 -0
- package/dist/{snippets-B2jBY0m_.mjs → snippets-cWwWficN.mjs} +2 -2
- package/dist/{spawn-DQttFH05.mjs → spawn-BW2bJmKO.mjs} +1 -1
- package/dist/{spectrum-Cf_4cGE8.mjs → spectrum-DYiIBYRB.mjs} +1 -1
- package/dist/{speed-DoXdyIYK.mjs → speed-C7uiW2Wf.mjs} +1 -1
- package/dist/{sql-Bze4h80q.mjs → sql-TGV8qQMj.mjs} +1 -1
- package/dist/{src-BguQDHjS.mjs → src-BUH-P_zd.mjs} +5 -5
- package/dist/ssl-xQP_HbWN.mjs +139 -0
- package/dist/{stream-BcReYIHJ.mjs → stream-CfWgj8Cr.mjs} +55 -55
- package/dist/{submit-ldFVNfNC.mjs → submit-DxGr1T40.mjs} +1 -1
- package/dist/tags-LEJ2VYhQ.mjs +23 -0
- package/dist/{telemetry-Cojgz4Sv.mjs → telemetry-BHne10Yy.mjs} +1 -1
- package/dist/telemetry-BavSU4ku.mjs +2 -0
- package/dist/{tenant-AZ0EAsmT.mjs → tenant-7d5vwc6K.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-aozjaasc.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
- package/dist/{tunnels-CXez5LPB.mjs → tunnels-DlGODvwT.mjs} +4 -4
- package/dist/{turnstile-B2NQ8Nsk.mjs → turnstile-DhLkdhij.mjs} +5 -5
- package/dist/update-check-nLfkSfdz.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{update-check-BlyKN8m0.mjs → update-check-wvjOsnGK.mjs} +1 -1
- package/dist/{url-info-D_UqGiWD.mjs → url-info-CeoV5dBc.mjs} +1 -1
- package/dist/{url-normalization-CF1YHpIN.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
- package/dist/{url-scanner-ChF3GO2U.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
- package/dist/{user-BfWRsdJh.mjs → user-D33B3alX.mjs} +59 -59
- package/dist/{vectorize-CRYbWKg5.mjs → vectorize-Wp9De13y.mjs} +17 -17
- package/dist/version-B2RUUqGT.mjs +2 -0
- package/dist/{waiting-rooms-Crp7MVd9.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
- package/dist/{web-assets-CgyrPnT-.mjs → web-assets-ew0iaP7c.mjs} +35 -35
- package/dist/{web3-Cd0Yd0eQ.mjs → web3-BUyXBaqq.mjs} +6 -6
- package/dist/{workers-builds-f2nVw7EZ.mjs → workers-builds-DzU9NGno.mjs} +7 -7
- package/dist/{workers-for-platforms-DjeKp2uy.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
- package/dist/{workers-CTwJpTfJ.mjs → workers-pP5tsDbD.mjs} +25 -22
- package/dist/{workers-vpc-B_L3TEg2.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
- package/dist/{workflows-CBPGf65x.mjs → workflows-DXYGKtqq.mjs} +1 -1
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +946 -0
- package/dist/zaraz-DoH4QD0u.mjs +22 -0
- package/dist/{zero-trust-B9xY8zcn.mjs → zero-trust-DKt20rzE.mjs} +461 -458
- package/dist/{zone-CmwVqTI2.mjs → zone-BXM3p0JR.mjs} +1 -1
- package/dist/{zones-Bf0VVpMf.mjs → zones-CJdtqEBx.mjs} +21 -21
- package/package.json +11 -11
- package/dist/account-tags-povXTDAu.mjs +0 -15
- package/dist/ai-search-CJ3b8eot.mjs +0 -79
- package/dist/auth-OFqV2M4q.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-CfQ30dB6.mjs +0 -42
- package/dist/build-Bm6kGyzo.mjs +0 -2
- package/dist/certificate-authorities-BdMRaOnD.mjs +0 -6
- package/dist/cli-CsnoQloF.mjs +0 -6
- package/dist/client-certificates-CuWGvZSr.mjs +0 -13
- package/dist/cps-VRP794c5.mjs +0 -6
- package/dist/csam-scanner-C1jOgXVu.mjs +0 -10
- package/dist/ct-alerting-Y9vfa6Fo.mjs +0 -5
- package/dist/custom-certificates-CojTEC0E.mjs +0 -17
- package/dist/custom-pages-M4RUxcn6.mjs +0 -21
- package/dist/dcv-delegation-KOO8syyQ.mjs +0 -4
- package/dist/healthchecks-4Hz-6xYi.mjs +0 -22
- package/dist/keyless-certificates-B4ta_OGS.mjs +0 -13
- package/dist/keys-B9zvFzrf.mjs +0 -4
- package/dist/load-balancers-CWd9mSWM.mjs +0 -76
- package/dist/mtls-certificates-B5AWTU6u.mjs +0 -13
- package/dist/organization-CXAM41sd.mjs +0 -71
- package/dist/origin-ca-certificates-DwhYV3m_.mjs +0 -11
- package/dist/origin-tls-client-auth-COSxTc2q.mjs +0 -30
- package/dist/pages-DuGcBC6k.mjs +0 -54
- package/dist/pay-per-crawl-B3_Gn9Cj.mjs +0 -38
- package/dist/precursor-VobQf--m.mjs +0 -4
- package/dist/previews-DkwFHNRx.mjs +0 -7
- package/dist/registrar-X1YLlnmg.mjs +0 -43
- package/dist/request-tracers-CHWpiejG.mjs +0 -4
- package/dist/resource-tagging-BTagOZli.mjs +0 -4
- package/dist/run-roYb_Odh.mjs +0 -2
- package/dist/smart-shield-DwW7N92r.mjs +0 -24
- package/dist/ssl-u_0gUhPA.mjs +0 -45
- package/dist/tags-D_Hc_A-r.mjs +0 -4
- package/dist/telemetry-Ct_2AaO4.mjs +0 -2
- package/dist/update-check-BnGDxswi.mjs +0 -2
- package/dist/values-CLfxkAUJ.mjs +0 -4
- package/dist/version-CVlh2Zaq.mjs +0 -2
- package/dist/wrangler-migration-DxTB5yPT.mjs +0 -2
- package/dist/zaraz-3VDxl0gF.mjs +0 -22
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-DnBfDdx3.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C0hKSr-R.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
|
|
|
6
|
-
|
|
6
|
+
Lists the traces associated with a session, ordered by most recent activity. The service and agent parameters must identify an agent that participated in the conversation. Results include every authorized trace containing an agent invocation in that conversation during the requested time range.`).positional(`conversation-id`,{type:`string`,description:`OpenTelemetry gen_ai.conversation.id value that identifies the session.`,demandOption:!0}).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 ne={command:`runs <conversationId>`,describe:`List Agent session runs`,builder:b,handler:async e=>l({command:`o11y agents sessions runs`,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 t=await r();s({command:`cf o11y agents sessions runs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/sessions/${e[`conversation-id`]==null?`<conversation-id>`:encodeURIComponent(String(e[`conversation-id`]))}/runs`,pathParams:{"conversation-id":String(e[`conversation-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(y,{account_id:u,conversationId:e[`conversation-id`],...i}));o(d,{successLabel:`Loaded`})})},re={command:`sessions`,describe:`Operations for agents.sessions`,builder:e=>e.command(v).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ie={command:`agents`,describe:`Operations for agents`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 o11y destinations create
|
|
7
7
|
|
|
8
|
-
Create a new Workers Observability Telemetry Destination.`).option(`configuration-logpush-dataset`,{type:`string`,description:`The configuration.logpushDataset field`,choices:[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`]}).coerce(`configuration-logpush-dataset`,e=>
|
|
8
|
+
Create a new Workers Observability Telemetry Destination.`).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json.`}).option(`configuration-logpush-dataset`,{type:`string`,description:`The configuration.logpushDataset field`,choices:[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`]}).coerce(`configuration-logpush-dataset`,e=>m(e,`configuration-logpush-dataset`,`text`)).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(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck 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 oe={command:`create`,describe:`Create Destination`,builder:ae,handler:async e=>l({command:`o11y destinations create`,classification:{safeFlags:[`configuration-logpush-dataset`,`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({configuration:{headers:f(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]):d(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}])});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}]),n=await c(`Creating`,async()=>i.send(x,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`configuration-headers`]===void 0)throw Error(`--configuration-headers is required (or pass --body with this field set).`);if(e[`configuration-logpush-dataset`]===void 0&&(e[`configuration-logpush-dataset`]=await g(`configuration-logpush-dataset`,`The configuration.logpushDataset field`,[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`])),e[`configuration-type`]===void 0&&(e[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),e[`configuration-url`]===void 0&&(e[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await h(`name`,`The name field`));let u=p({configuration:{headers:f(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]),_=await c(`Creating`,async()=>i.send(x,{body:u,account_id:l}));o(_,{successLabel:`Created`})})};var se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 o11y destinations delete <slug>
|
|
9
9
|
|
|
10
|
-
Delete a Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,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 le={command:`delete <slug>`,describe:`Delete Destination`,builder:ce,handler:async e=>l({command:`o11y destinations 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 destinations delete`,method:`DELETE`,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:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
10
|
+
Delete a Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,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 le={command:`delete <slug>`,describe:`Delete Destination`,builder:ce,handler:async e=>l({command:`o11y destinations 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 destinations delete`,method:`DELETE`,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:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
11
11
|
`);return}let u=await c(`Deleting`,async()=>i.send(se,{account_id:l,slug:e.slug}));o(u,{successLabel:`Deleted`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,query:[`page`,`perPage`,`order`,`orderBy`],errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 o11y destinations list
|
|
12
12
|
|
|
13
|
-
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
|
|
13
|
+
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`,500:`InternalServerError`}};function pe(e){return e.usage(`$0 o11y destinations update <slug>
|
|
14
14
|
|
|
15
|
-
Update an existing Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>
|
|
15
|
+
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-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)`})}const me={command:`update <slug>`,describe:`Update Destination`,builder:pe,handler:async e=>l({command:`o11y destinations update`,classification:{safeFlags:[`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`,!0),type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled},[[`configuration`,`headers`]]):d(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}])});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}]),n=await c(`Updating`,async()=>i.send(S,{body:t,account_id:l,slug:e.slug}));o(n,{successLabel:`Updated`});return}if(e[`configuration-headers`]===void 0)throw Error(`--configuration-headers is required (or pass --body with this field set).`);if(e[`configuration-type`]===void 0&&(e[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),e[`configuration-url`]===void 0&&(e[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),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`,!0),type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled},[[`configuration`,`headers`]]),_=await c(`Updating`,async()=>i.send(S,{body:u,account_id:l,slug:e.slug}));o(_,{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>
|
|
16
16
|
|
|
17
|
-
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
|
|
17
|
+
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
|
|
18
18
|
|
|
19
|
-
Create an account or service issue automation.`).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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
|
|
19
|
+
Create an account or service issue automation.`).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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 O={command:`create`,describe:`Create an issue automation`,builder:D,handler:async e=>l({command:`o11y issues automations create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`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(E,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e[`policy-id`]===void 0&&(e[`policy-id`]=await h(`policy-id`,`The policyId field`));let u=p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}),f=await c(`Creating`,async()=>i.send(E,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var k={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function A(e){return e.usage(`$0 o11y issues automations delete <automationId>
|
|
20
20
|
|
|
21
|
-
Delete an issue automation while preserving its historical runs.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,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
|
|
22
|
-
`);return}let u=await c(`Deleting`,async()=>i.send(
|
|
21
|
+
Delete an issue automation while preserving its historical runs.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j={command:`delete <automationId>`,describe:`Delete an issue automation`,builder:A,handler:async e=>l({command:`o11y issues automations 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 issues automations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
22
|
+
`);return}let u=await c(`Deleting`,async()=>i.send(k,{account_id:l,automationId:e[`automation-id`]}));o(u,{successLabel:`Deleted`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function N(e){return e.usage(`$0 o11y issues automations get <automationId>
|
|
23
23
|
|
|
24
|
-
Retrieve an issue automation.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
24
|
+
Retrieve an issue automation.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <automationId>`,describe:`Get an issue automation`,builder:N,handler:async e=>l({command:`o11y issues automations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-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(M,{account_id:l,automationId:e[`automation-id`]}));o(u,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 o11y issues automations list
|
|
25
25
|
|
|
26
|
-
List account and service issue automations.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
26
|
+
List account and service issue automations.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List issue automations`,builder:I,handler:async e=>l({command:`o11y issues automations list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service};if(e.dryRun){let e=await r();s({command:`cf o11y issues automations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations`,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(F,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var R={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,body:`json`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ge(e){return e.usage(`$0 o11y issues automations update <automationId>
|
|
27
27
|
|
|
28
|
-
Replace an issue automation configuration.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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
|
|
28
|
+
Replace an issue automation configuration.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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 _e={command:`update <automationId>`,describe:`Update an issue automation`,builder:ge,handler:async e=>l({command:`o11y issues automations update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`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(R,{body:t,account_id:l,automationId:e[`automation-id`]}));o(n,{successLabel:`Updated`});return}e[`policy-id`]===void 0&&(e[`policy-id`]=await h(`policy-id`,`The policyId field`));let u=p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}),f=await c(`Updating`,async()=>i.send(R,{body:u,account_id:l,automationId:e[`automation-id`]}));o(f,{successLabel:`Updated`})})},ve={command:`automations`,describe:`Operations for issues.automations`,builder:e=>e.command(O).command(j).command(P).command(L).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function be(e){return e.usage(`$0 o11y issues get <issueId>
|
|
29
29
|
|
|
30
|
-
Retrieve an issue.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
30
|
+
Retrieve an issue.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`get <issueId>`,describe:`Get an issue`,builder:be,handler:async e=>l({command:`o11y issues get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"issue-id":String(e[`issue-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(ye,{account_id:l,issueId:e[`issue-id`]}));o(u,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Se(e){return e.usage(`$0 o11y issues group
|
|
31
31
|
|
|
32
|
-
Group two or more issues under a new customer-defined identity.`).option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds field`}).option(`title`,{type:`string`,description:`The title 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
|
|
32
|
+
Group two or more issues under a new customer-defined identity.`).option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds field`}).option(`title`,{type:`string`,description:`The title 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 Ce={command:`group`,describe:`Create an issue group`,builder:Se,handler:async e=>l({command:`o11y issues group`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues group`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({issueIds:e[`issue-ids`],title:m(e.title,`title`,`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(z,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);e.title===void 0&&(e.title=await h(`title`,`The title field`));let u=p({issueIds:e[`issue-ids`],title:m(e.title,`title`,`text`)}),f=await c(`Creating`,async()=>i.send(z,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var we={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues`,query:[`page`,`perPage`,`order`,`orderBy`,`search`,`service`,`type`,`status`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Te(e){return e.usage(`$0 o11y issues list
|
|
33
33
|
|
|
34
|
-
List detected issues.`).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:[`id`,`service`,`title`,`type`,`status`,`statusUpdated`,`count`,`firstObserved`,`lastObserved`,`created`,`updated`]}).option(`search`,{type:`string`,description:`Search`}).option(`service`,{type:`string`,description:`Service`}).option(`type`,{type:`string`,description:`Type`}).option(`status`,{type:`string`,description:`Status`,choices:[`active`,`resolved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
34
|
+
List detected issues.`).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:[`id`,`service`,`title`,`type`,`status`,`statusUpdated`,`count`,`firstObserved`,`lastObserved`,`created`,`updated`]}).option(`search`,{type:`string`,description:`Search`}).option(`service`,{type:`string`,description:`Service`}).option(`type`,{type:`string`,description:`Type`}).option(`status`,{type:`string`,description:`Status`,choices:[`active`,`resolved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`list`,describe:`List detected issues`,builder:Te,handler:async e=>l({command:`o11y issues list`,classification:{safeFlags:[`order`,`order-by`,`status`,`dry-run`]}},e,async()=>{let i={page:e.page,perPage:e[`per-page`],order:e.order,orderBy:e[`order-by`],search:e.search,service:e.service,type:e.type,status:e.status};if(e.dryRun){let e=await r();s({command:`cf o11y issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues`,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(we,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}/notification-runs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function De(e){return e.usage(`$0 o11y issues notify <issueId>
|
|
35
35
|
|
|
36
|
-
Send the issue to one ANS policy, or every matching Real-Time Issue policy when no policy ID is provided.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`policy-id`,{type:`string`,description:`The policyId 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
|
|
36
|
+
Send the issue to one ANS policy, or every matching Real-Time Issue policy when no policy ID is provided.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`policy-id`,{type:`string`,description:`The policyId 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 Oe={command:`notify <issueId>`,describe:`Notify about an issue`,builder:De,handler:async e=>l({command:`o11y issues notify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/notification-runs`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({policyId:m(e[`policy-id`],`policy-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(B,{body:t,account_id:l,issueId:e[`issue-id`]}));o(n,{successLabel:`Created`});return}let u=p({policyId:m(e[`policy-id`],`policy-id`,`text`)}),f=await c(`Creating`,async()=>i.send(B,{body:u,account_id:l,issueId:e[`issue-id`]}));o(f,{successLabel:`Created`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}/occurrences`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function Ae(e){return e.usage(`$0 o11y issues occurrences <issueId>
|
|
37
37
|
|
|
38
|
-
List the retained error occurrences grouped into an issue, newest first.`).positional(`issue-id`,{type:`string`,description:`Issue ID returned by the issues API.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor returned in result_info.cursors.after.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
38
|
+
List the retained error occurrences grouped into an issue, newest first.`).positional(`issue-id`,{type:`string`,description:`Issue ID returned by the issues API.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor returned in result_info.cursors.after.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`occurrences <issueId>`,describe:`List issue occurrences`,builder:Ae,handler:async e=>l({command:`o11y issues occurrences`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();s({command:`cf o11y issues occurrences`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/occurrences`,pathParams:{"issue-id":String(e[`issue-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(ke,{account_id:u,issueId:e[`issue-id`],...i}));o(d,{successLabel:`Loaded`})})};var Me={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}/members/${t.issueId}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Ne(e){return e.usage(`$0 o11y issues remove <issueId>
|
|
39
39
|
|
|
40
|
-
Remove an issue from a group, dissolving the group when fewer than two members remain.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`group-id`,{type:`string`,description:`GroupId`,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
|
|
41
|
-
`);return}let u=await c(`Deleting`,async()=>i.send(
|
|
40
|
+
Remove an issue from a group, dissolving the group when fewer than two members remain.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`group-id`,{type:`string`,description:`GroupId`,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 Pe={command:`remove <issueId>`,describe:`Remove an issue group member`,builder:Ne,handler:async e=>l({command:`o11y issues remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues remove`,method:`DELETE`,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/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
41
|
+
`);return}let u=await c(`Deleting`,async()=>i.send(Me,{account_id:l,groupId:e[`group-id`],issueId:e[`issue-id`]}));o(u,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/summary`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ie(e){return e.usage(`$0 o11y issues summary
|
|
42
42
|
|
|
43
|
-
Retrieve aggregate issue counts for the account.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
43
|
+
Retrieve aggregate issue counts for the account.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`summary`,describe:`Summarize detected issues`,builder:Ie,handler:async e=>l({command:`o11y issues summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service};if(e.dryRun){let e=await r();s({command:`cf o11y issues summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/summary`,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(Fe,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var Re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ze(e){return e.usage(`$0 o11y issues ungroup <groupId>
|
|
44
44
|
|
|
45
|
-
Dissolve an issue group and restore its members as standalone issues.`).positional(`group-id`,{type:`string`,description:`GroupId`,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
|
|
46
|
-
`);return}let u=await c(`Deleting`,async()=>i.send(
|
|
45
|
+
Dissolve an issue group and restore its members as standalone issues.`).positional(`group-id`,{type:`string`,description:`GroupId`,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 Be={command:`ungroup <groupId>`,describe:`Dissolve an issue group`,builder:ze,handler:async e=>l({command:`o11y issues ungroup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues ungroup`,method:`DELETE`,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`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
46
|
+
`);return}let u=await c(`Deleting`,async()=>i.send(Re,{account_id:l,groupId:e[`group-id`]}));o(u,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ve(e){return e.usage(`$0 o11y issues update <issueId>
|
|
47
47
|
|
|
48
|
-
Modify an issue status or group title.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`active`,`resolved`,`ignored`]}).coerce(`status`,e=>
|
|
48
|
+
Modify an issue status or group title.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`active`,`resolved`,`ignored`]}).coerce(`status`,e=>m(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Modify an issue status or group title.`})}const He={command:`update <issueId>`,describe:`Modify an issue`,builder:Ve,handler:async e=>l({command:`o11y issues update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({status:e.status,title:m(e.title,`title`,`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(V,{body:t,account_id:l,issueId:e[`issue-id`]}));o(n,{successLabel:`Updated`});return}let u=p({status:e.status,title:m(e.title,`title`,`text`)}),f=await c(`Updating`,async()=>i.send(V,{body:u,account_id:l,issueId:e[`issue-id`]}));o(f,{successLabel:`Updated`})})},Ue={command:`issues`,describe:`Operations for issues`,builder:e=>e.command(T).command(xe).command(Ce).command(Ee).command(Oe).command(je).command(Pe).command(Le).command(Be).command(He).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var We={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/metricsexport`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function Ge(e){return e.usage(`$0 o11y metrics-export list
|
|
49
49
|
|
|
50
|
-
List resources configured for Workers Observability metrics export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
50
|
+
List resources configured for Workers Observability metrics export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`list`,describe:`List Metrics Exports`,builder:Ge,handler:async e=>l({command:`o11y metrics-export list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf o11y metrics-export list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/metricsexport`,pathParams:{},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(We,{account_id:l}));o(u,{successLabel:`Loaded`})})};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/metricsexport`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,500:`InternalServerError`}};function qe(e){return e.usage(`$0 o11y metrics-export upsert
|
|
51
51
|
|
|
52
|
-
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=>
|
|
52
|
+
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
|
|
53
53
|
|
|
54
|
-
Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).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=>
|
|
54
|
+
Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).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-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:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let u=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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`)}}}),f=await c(`Creating`,async()=>i.send(U,{body:u,account_id:l}));o(f,{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>
|
|
55
55
|
|
|
56
|
-
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
|
|
57
|
-
`);return}let u=await c(`Deleting`,async()=>i.send(
|
|
56
|
+
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})){process.stderr.write(`Aborted.
|
|
57
|
+
`);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>
|
|
58
58
|
|
|
59
|
-
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-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=>
|
|
59
|
+
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-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-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:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let u=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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`)}}}),f=await c(`Updating`,async()=>i.send(W,{body:u,account_id:l,queryId:e[`query-id`]}));o(f,{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>
|
|
60
60
|
|
|
61
|
-
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
|
|
61
|
+
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
|
|
62
62
|
|
|
63
|
-
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
|
|
63
|
+
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
|
|
64
64
|
|
|
65
|
-
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=>
|
|
65
|
+
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-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-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-datasets`,`parameters-filter-combination`,`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:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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 u=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:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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}),f=await c(`Creating`,async()=>i.send(G,{body:u,account_id:l}));o(f,{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>
|
|
66
66
|
|
|
67
|
-
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
|
|
67
|
+
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
|
|
68
68
|
|
|
69
|
-
Notify live tail that user is still eligible to receive live events.`).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:`Keep your live tail connection alive.`})}const
|
|
69
|
+
Notify live tail that user is still eligible to receive live events.`).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:`Keep your live tail connection alive.`})}const _t={command:`heartbeat`,describe:`Live tail heartbeat`,builder:gt,handler:async e=>l({command:`o11y telemetry heartbeat`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry heartbeat`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/live-tail/heartbeat`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({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(K,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({scriptId:m(e[`script-id`],`script-id`,`text`)}),f=await c(`Creating`,async()=>i.send(K,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/keys`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function vt(e){return e.usage(`$0 o11y telemetry keys
|
|
70
70
|
|
|
71
|
-
List all the keys in your telemetry events.`).option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters to narrow key discovery. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`number`,description:`The from field`}).option(`key-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`key-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`limit`,{type:`number`,description:`Advanced usage: set limit=1000+ to retrieve comprehensive key options without needing additional filtering.`}).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(`to`,{type:`number`,description:`The to field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Find keys in your telemetry events matching a specific filter or needle.`})}const
|
|
71
|
+
List all the keys in your telemetry events.`).option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters to narrow key discovery. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`number`,description:`The from field`}).option(`key-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`key-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`limit`,{type:`number`,description:`Advanced usage: set limit=1000+ to retrieve comprehensive key options without needing additional filtering.`}).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(`to`,{type:`number`,description:`The to field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Find keys in your telemetry events matching a specific filter or needle.`})}const yt={command:`keys`,describe:`List keys`,builder:vt,handler:async e=>l({command:`o11y telemetry keys`,classification:{safeFlags:[`key-needle-is-regex`,`key-needle-match-case`,`needle-is-regex`,`needle-match-case`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/keys`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({datasets:e.datasets,filters:u(e.filters,`filters`),from:e.from,keyNeedle:{isRegex:e[`key-needle-is-regex`],matchCase:e[`key-needle-match-case`]},limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},to:e.to}):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(q,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let f=p({datasets:e.datasets,filters:u(e.filters,`filters`),from:e.from,keyNeedle:{isRegex:e[`key-needle-is-regex`],matchCase:e[`key-needle-match-case`]},limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},to:e.to}),m=await c(`Creating`,async()=>i.send(q,{body:f,account_id:l}));o(m,{successLabel:`Created`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/live-tail`,body:`json`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function bt(e){return e.usage(`$0 o11y telemetry live-tail
|
|
72
72
|
|
|
73
|
-
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=>
|
|
73
|
+
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
|
|
74
74
|
|
|
75
|
-
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=>
|
|
75
|
+
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-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-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-datasets`,`parameters-filter-combination`,`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:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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 u=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:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],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}),f=await c(`Loading`,async()=>i.send(Y,{body:u,account_id:l}));o(f,{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
|
|
76
76
|
|
|
77
|
-
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=>
|
|
77
|
+
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
|
|
78
78
|
|
|
79
|
-
Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`).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
|
|
80
|
-
`);return}let a=await c(`Deleting`,async()=>t.send(
|
|
79
|
+
Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`).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 kt={command:`delete`,describe:`Delete zone trace rules`,builder:Ot,handler:async e=>l({command:`o11y tracing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
80
|
+
`);return}let a=await c(`Deleting`,async()=>t.send(Dt,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var At={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function jt(e){return e.usage(`$0 o11y tracing rules get
|
|
81
81
|
|
|
82
|
-
Retrieve the ordered sampling overrides for a zone's managed Cloudflare Traces ruleset.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
82
|
+
Retrieve the ordered sampling overrides for a zone's managed Cloudflare Traces ruleset.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`get`,describe:`View zone trace rules`,builder:jt,handler:async e=>l({command:`o11y tracing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(At,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Nt(e){return e.usage(`$0 o11y tracing rules update
|
|
83
83
|
|
|
84
|
-
Replace all sampling overrides in a zone's managed Cloudflare Traces ruleset. Rules are evaluated in the supplied order.`).option(`rules`,{type:`string`,description:`Trace rules in evaluation order. 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:`Replace the ordered trace rules`})}const
|
|
84
|
+
Replace all sampling overrides in a zone's managed Cloudflare Traces ruleset. Rules are evaluated in the supplied order.`).option(`rules`,{type:`string`,description:`Trace rules in evaluation order. 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:`Replace the ordered trace rules`})}const Pt={command:`update`,describe:`Replace zone trace rules`,builder:Nt,handler:async e=>l({command:`o11y tracing rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send(Z,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let a=p({rules:u(e.rules,`rules`)}),l=await c(`Updating`,async()=>t.send(Z,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},Q={command:`rules`,describe:`Operations for tracing.rules`,builder:e=>e.command(kt).command(Mt).command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ft={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function It(e){return e.usage(`$0 o11y tracing settings delete
|
|
85
85
|
|
|
86
|
-
Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`).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
|
|
87
|
-
`);return}let a=await c(`Deleting`,async()=>t.send(
|
|
86
|
+
Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`).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 Lt={command:`delete`,describe:`Reset zone tracing settings`,builder:It,handler:async e=>l({command:`o11y tracing settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
87
|
+
`);return}let a=await c(`Deleting`,async()=>t.send(Ft,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var Rt={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function zt(e){return e.usage(`$0 o11y tracing settings get
|
|
88
88
|
|
|
89
|
-
Retrieve the zone-level Cloudflare Traces settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
89
|
+
Retrieve the zone-level Cloudflare Traces settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`get`,describe:`View zone tracing settings`,builder:zt,handler:async e=>l({command:`o11y tracing settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(Rt,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Vt(e){return e.usage(`$0 o11y tracing settings update
|
|
90
90
|
|
|
91
|
-
Update the zone-level Cloudflare Traces settings.`).option(`destinations`,{type:`string`,array:!0,description:`Up to 100 OpenTelemetry destination identifiers that receive traces.`}).option(`enabled`,{type:`boolean`,description:`Whether Cloudflare Traces is enabled for the zone.`}).option(`forward-context`,{type:`boolean`,description:`Whether trace context is sent externally or across a zone boundary.`}).option(`persist`,{type:`boolean`,description:`Whether traces are persisted in Cloudflare.`}).option(`propagation-policy`,{type:`string`,description:`When inbound trace context may be continued. Authenticated propagation is not supported yet.`,choices:[`accept`,`authenticated`,`reject`]}).coerce(`propagation-policy`,e=>
|
|
91
|
+
Update the zone-level Cloudflare Traces settings.`).option(`destinations`,{type:`string`,array:!0,description:`Up to 100 OpenTelemetry destination identifiers that receive traces.`}).option(`enabled`,{type:`boolean`,description:`Whether Cloudflare Traces is enabled for the zone.`}).option(`forward-context`,{type:`boolean`,description:`Whether trace context is sent externally or across a zone boundary.`}).option(`persist`,{type:`boolean`,description:`Whether traces are persisted in Cloudflare.`}).option(`propagation-policy`,{type:`string`,description:`When inbound trace context may be continued. Authenticated propagation is not supported yet.`,choices:[`accept`,`authenticated`,`reject`]}).coerce(`propagation-policy`,e=>m(e,`propagation-policy`,`text`)).option(`sampling-ratio`,{type:`number`,description:`The ratio of requests sampled for tracing, from 0 to 1.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update zone tracing settings`})}const Ht={command:`update`,describe:`Update zone tracing settings`,builder:Vt,handler:async e=>l({command:`o11y tracing settings update`,classification:{safeFlags:[`enabled`,`forward-context`,`persist`,`propagation-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing settings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:e[`propagation-policy`],sampling_ratio:e[`sampling-ratio`]}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send($,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=p({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:e[`propagation-policy`],sampling_ratio:e[`sampling-ratio`]}),l=await c(`Updating`,async()=>t.send($,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},Ut={command:`settings`,describe:`Operations for tracing.settings`,builder:e=>e.command(Lt).command(Bt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`tracing`,describe:`Operations for tracing`,builder:e=>e.command(Q).command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/usage`,query:[`from`,`to`,`tz`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function Kt(e){return e.usage(`$0 o11y usage
|
|
92
92
|
|
|
93
|
-
Event counts and sizes broken down by dataset and service, bucketed by day, for up to 90 days. The top-level events field is the sum of all breakdown counts.`).option(`from`,{type:`string`,description:`Unix timestamp in milliseconds for the start of the range.`,demandOption:!0}).option(`to`,{type:`string`,description:`Unix timestamp in milliseconds for the end of the range.`,demandOption:!0}).option(`tz`,{type:`string`,description:`IANA timezone used to align daily bins to local midnight (e.g. 'America/Chicago'). Defaults to UTC.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
93
|
+
Event counts and sizes broken down by dataset and service, bucketed by day, for up to 90 days. The top-level events field is the sum of all breakdown counts.`).option(`from`,{type:`string`,description:`Unix timestamp in milliseconds for the start of the range.`,demandOption:!0}).option(`to`,{type:`string`,description:`Unix timestamp in milliseconds for the end of the range.`,demandOption:!0}).option(`tz`,{type:`string`,description:`IANA timezone used to align daily bins to local midnight (e.g. 'America/Chicago'). Defaults to UTC.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qt={command:`usage`,describe:`Get event count`,builder:Kt,handler:async e=>l({command:`o11y usage`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to,tz:e.tz};if(e.dryRun){let e=await r();s({command:`cf o11y usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/usage`,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(Gt,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})},Jt={command:`o11y`,describe:`o11y`,builder:e=>e.command(qt).command(ie).command(he).command(Ue).command(Ye).command(lt).command(ht).command(Et).command(Wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Jt as default};
|