cf 1.0.0-beta.28 → 1.0.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/_meta/commands.json +2240 -3181
- package/dist/_meta/hand-written-commands.json +38 -8
- package/dist/_meta/schemas.json +1683 -2505
- package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
- package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
- package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
- package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
- package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
- package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
- package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
- package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
- package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
- package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
- package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
- package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
- package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
- package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
- package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
- package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
- package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
- package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
- package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
- package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
- package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
- package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
- package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
- package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/static-assets-DGDoaJf1.mjs +386 -0
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
- package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
- package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
- package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +19 -19
- package/dist/ai-gateway-Lj4On37s.mjs +0 -74
- package/dist/ai-search-BxyhS3X7.mjs +0 -74
- package/dist/alerting-r0G2X9y9.mjs +0 -52
- package/dist/analytics-C6bfqm-W.mjs +0 -17
- package/dist/auth-B-h0BHg7.mjs +0 -2
- package/dist/auth-B6tswVxH.mjs +0 -2
- package/dist/auth-clmqFEWU.mjs +0 -7
- package/dist/body-parser-DoewLePl.mjs +0 -2
- package/dist/brand-protection-kv1ba80i.mjs +0 -14
- package/dist/browser-run-D-vRoZmf.mjs +0 -40
- package/dist/build-BzJGqb2o.mjs +0 -2
- package/dist/builds-BbxINHRP.mjs +0 -64
- package/dist/cf-BQ_LRiut.mjs +0 -18
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
- package/dist/cli-B7vslRfu.mjs +0 -4
- package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
- package/dist/command-AVwd7XjE.mjs +0 -2
- package/dist/command-B87T_f2f.mjs +0 -2
- package/dist/command-CEHhi3t0.mjs +0 -2
- package/dist/command-CYmQE79n.mjs +0 -2
- package/dist/command-Ce8CVLth.mjs +0 -2
- package/dist/command-CqDudQZs.mjs +0 -2
- package/dist/command-D4YcwpVp.mjs +0 -2
- package/dist/command-D9Qyi1B0.mjs +0 -2
- package/dist/command-Dl9ICrRK.mjs +0 -2
- package/dist/command-DtCSe8Hy.mjs +0 -2
- package/dist/command-DwzVtmb3.mjs +0 -2
- package/dist/command-wtBubtZ4.mjs +0 -2
- package/dist/containers-B06OGOEB.mjs +0 -380
- package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
- package/dist/d1-nJCOJZb8.mjs +0 -50
- package/dist/deploy-DJMnWFNk.mjs +0 -2
- package/dist/deploy-context-YCW3eqP1.mjs +0 -56
- package/dist/deploy-input-CQLBXFEB.mjs +0 -2
- package/dist/dev-GsYHvMah.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/docs-CRc_WOXh.mjs +0 -3
- package/dist/email-auth-ptdqNSTZ.mjs +0 -6
- package/dist/email-domains-uL22-zRY.mjs +0 -14
- package/dist/email-routing-CV43rMJC.mjs +0 -44
- package/dist/errors-VG1mgwJl.mjs +0 -11
- package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-BA1fmzTm.mjs +0 -20
- package/dist/init-EVsjBrOz.mjs +0 -43
- package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
- package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
- package/dist/local-D5Vq6ooZ.mjs +0 -2
- package/dist/local-runtime-BZjgkacr.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-DRJugxya.mjs +0 -2
- package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
- package/dist/o11y-ySxrnP1Z.mjs +0 -88
- package/dist/oauth-CFVUl-Wv.mjs +0 -4
- package/dist/output-BZQEl3mK.mjs +0 -2
- package/dist/package-B7RgwuFR.mjs +0 -2
- package/dist/page-rules-DRw763O1.mjs +0 -38
- package/dist/pages-DfQnxiTk.mjs +0 -48
- package/dist/pipelines-DbyrI6F4.mjs +0 -40
- package/dist/previews-DEVNSip2.mjs +0 -6
- package/dist/progress-yvPscjYg.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-CEpZ-lQZ.mjs +0 -4
- package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
- package/dist/registrar-D23gfKBi.mjs +0 -43
- package/dist/request-headers-C0FpeBhz.mjs +0 -2
- package/dist/request-tracers-qd7XOAka.mjs +0 -4
- package/dist/rulesets-DmqwixUC.mjs +0 -42
- package/dist/run-BOKI1uWa.mjs +0 -2
- package/dist/run-DBqOjD1P.mjs +0 -2
- package/dist/schema-Dj9STsWI.mjs +0 -2
- package/dist/schema-flags-CXm9iIv6.mjs +0 -4
- package/dist/session-vzNfUhPl.mjs +0 -2
- package/dist/shared-MK-_lkbn.mjs +0 -2
- package/dist/smart-shield-Boy_qbqd.mjs +0 -22
- package/dist/snippets-DdoDYXW-.mjs +0 -18
- package/dist/spawn-B5F4OIHG.mjs +0 -5
- package/dist/sql-Bb56llsb.mjs +0 -4
- package/dist/src-BoSDeQ9m.mjs +0 -133
- package/dist/startup-profile-DQVkZZpb.mjs +0 -2
- package/dist/state-DW3QZtfh.mjs +0 -2
- package/dist/stream-BuZYDbNR.mjs +0 -89
- package/dist/telemetry-DkDUr4KK.mjs +0 -2
- package/dist/tunnels-D90ztENM.mjs +0 -27
- package/dist/ui-xjCox-gU.mjs +0 -2
- package/dist/url-scanner-BRdWwka4.mjs +0 -16
- package/dist/user-Cmb1_Wu5.mjs +0 -103
- package/dist/version-6Bpy6Bgt.mjs +0 -2
- package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
- package/dist/workers-BnLiOjZf.mjs +0 -39
- package/dist/workers-builds-sKpITeRk.mjs +0 -14
- package/dist/zaraz-BBKki5WS.mjs +0 -22
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{a as l,i as u,n as d}from"./prompt-D274Im1O.mjs";import{o as f,r as p,t as m}from"./body-parser-HN91kAf0.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{n as g,t as _}from"./raw-fetch-DhlyWQtk.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/available_alerts`};function y(e){return e.usage(`$0 alerting available-alerts list
|
|
3
|
+
|
|
4
|
+
Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`Get Alert Types`,builder:y,handler:async e=>c({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(v,{account_id:l}));o(u,{successLabel:`Loaded`})})},ee={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/eligible`};function ne(e){return e.usage(`$0 alerting destinations eligible get
|
|
5
|
+
|
|
6
|
+
Get a list of all delivery mechanism types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get`,describe:`Get delivery mechanism eligibility`,builder:ne,handler:async e=>c({command:`alerting destinations eligible get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations eligible get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/eligible`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l}));o(u,{successLabel:`Loaded`})})},ie={command:`eligible`,describe:`Operations for destinations.eligible`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty/connect`};function S(e){return e.usage(`$0 alerting destinations pagerduty create
|
|
7
|
+
|
|
8
|
+
Creates a new token for integrating with PagerDuty.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`create`,describe:`Create PagerDuty integration token`,builder:S,handler:async e=>c({command:`alerting destinations pagerduty create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations pagerduty create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/pagerduty/connect`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(x,{account_id:l}));o(u,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty`};function T(e){return e.usage(`$0 alerting destinations pagerduty delete
|
|
9
|
+
|
|
10
|
+
Deletes all the PagerDuty Services connected to the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete`,describe:`Delete PagerDuty Services`,builder:T,handler:async e=>c({command:`alerting destinations pagerduty delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations pagerduty delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/pagerduty`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await d({force:!!e.force,message:`This operation deletes all PagerDuty services connected to the account.`}))return;let u=await s(`Deleting`,async()=>c.send(w,{account_id:l}));o(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty`};function O(e){return e.usage(`$0 alerting destinations pagerduty get
|
|
11
|
+
|
|
12
|
+
Get a list of all configured PagerDuty services.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`List PagerDuty services`,builder:O,handler:async e=>c({command:`alerting destinations pagerduty get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations pagerduty get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/pagerduty`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l}));o(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty/connect/${t.token_id}`};function j(e){return e.usage(`$0 alerting destinations pagerduty link <token-id>
|
|
13
|
+
|
|
14
|
+
Links PagerDuty with the account using the integration token.`).positional(`token-id`,{type:`string`,description:`The token integration key`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`link <token-id>`,describe:`Connect PagerDuty`,builder:j,handler:async e=>c({command:`alerting destinations pagerduty link`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations pagerduty link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/pagerduty/connect/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(A,{account_id:l,token_id:e[`token-id`]}));o(u,{successLabel:`Loaded`})})},N={command:`pagerduty`,describe:`Operations for destinations.pagerduty`,builder:e=>e.command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks`,body:`json`};function F(e){return e.usage(`$0 alerting destinations webhooks create
|
|
15
|
+
|
|
16
|
+
Creates a new webhook destination.`).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create a webhook`,builder:F,handler:async e=>c({command:`alerting destinations webhooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`),secret:h(e.secret,`secret`,`text`),url:h(e.url,`url`,`text`)}):p(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:p(e.body),u=await t(e),d=e.local?a:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>u.send(P,{body:e,account_id:d}));o(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await l(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await l(`url`,`The POST endpoint to call when dispatching a notification.`));let f=m({name:h(e.name,`name`,`text`),secret:h(e.secret,`secret`,`text`),url:h(e.url,`url`,`text`)}),g=await s(`Creating`,async()=>u.send(P,{body:f,account_id:d}));o(g,{successLabel:`Created`})})};var L={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`};function R(e){return e.usage(`$0 alerting destinations webhooks delete <webhook-id>
|
|
17
|
+
|
|
18
|
+
Delete a configured webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const z={command:`delete <webhook-id>`,describe:`Delete a webhook`,builder:R,handler:async e=>c({command:`alerting destinations webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await d({force:!!e.force,message:`This operation deletes the webhook destination.`}))return;let u=await s(`Deleting`,async()=>c.send(L,{account_id:l,webhook_id:e[`webhook-id`]}));o(u,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`};function V(e){return e.usage(`$0 alerting destinations webhooks get <webhook-id>
|
|
19
|
+
|
|
20
|
+
Get details for a single webhooks destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <webhook-id>`,describe:`Get a webhook`,builder:V,handler:async e=>c({command:`alerting destinations webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(B,{account_id:l,webhook_id:e[`webhook-id`]}));o(u,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks`};function W(e){return e.usage(`$0 alerting destinations webhooks list
|
|
21
|
+
|
|
22
|
+
Gets a list of all configured webhook destinations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List webhooks`,builder:W,handler:async e=>c({command:`alerting destinations webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting destinations webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(U,{account_id:l}));o(u,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`,body:`json`};function q(e){return e.usage(`$0 alerting destinations webhooks update <webhook-id>
|
|
23
|
+
|
|
24
|
+
Update a webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update <webhook-id>`,describe:`Update a webhook`,builder:q,handler:async e=>c({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`),secret:h(e.secret,`secret`,`text`),url:h(e.url,`url`,`text`)}):p(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:p(e.body),u=await t(e),d=e.local?a:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>u.send(K,{body:t,account_id:d,webhook_id:e[`webhook-id`]}));o(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await l(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await l(`url`,`The POST endpoint to call when dispatching a notification.`));let f=m({name:h(e.name,`name`,`text`),secret:h(e.secret,`secret`,`text`),url:h(e.url,`url`,`text`)}),g=await s(`Updating`,async()=>u.send(K,{body:f,account_id:d,webhook_id:e[`webhook-id`]}));o(g,{successLabel:`Updated`})})},Y={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(ie).command(N).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/history`,query:[`per_page`,`before`,`page`,`since`]};function se(e){return e.usage(`$0 alerting history list
|
|
25
|
+
|
|
26
|
+
Gets a list of history records for notifications sent to an account. The records are displayed for last \`x\` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).`).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`before`,{type:`string`,description:`Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`since`,{type:`string`,description:`Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List History`,builder:se,handler:async e=>c({command:`alerting history list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={per_page:e[`per-page`],before:e.before,page:e.page,since:e.since};if(e.dryRun){let e=await r();n({command:`cf alerting history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/history`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(oe,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})},le={command:`history`,describe:`Operations for history`,builder:e=>e.command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies`,body:`json`};function ue(e){return e.usage(`$0 alerting policies create
|
|
27
|
+
|
|
28
|
+
Creates a new Notification policy.`).option(`alert-interval`,{type:`string`,description:`Optional specification of how often to re-alert from the same incident, not support on all alert types.`}).option(`alert-type`,{type:`string`,description:"Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. This enum lists every alert type, not the ones a given account can create, since some types depend on entitlements or account type. To get the alert types an account can create, call `GET /accounts/{account_id}/alerting/v3/available_alerts`.",choices:/* @__PURE__ */ `abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.attack_lifecycle.bgp_advertisement_change.bgp_hijack_notification.billing_budget_alert.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.casb_weekly_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.closed_port_scan_alert.cloudforce_one_request_notification.cmd_managed_defense_notification.cni_maintenance_notification.containers_security_alert.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dex_device_connectivity_alert.dex_synthetic_test_availability_alert.dex_synthetic_test_latency_alert.dos_attack_l4.dos_attack_l7.executive_communications.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.leaked_service_token_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.log_explorer_ingest_rate_limit.log_explorer_scheduled_query_results_alert.logo_match_alert.magic_endpoint_healthcheck_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.open_port_scan_alert.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stakeout_credential_leak_alert.stakeout_saved_query_daily_digest_alert.stakeout_saved_query_immediate_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.workers_for_platforms_security_alert.workers_observability_alert.workers_observability_real_time_issue.zone_aop_custom_certificate_expiration_type`.split(`.`)}).coerce(`alert-type`,e=>h(e,`alert-type`,`text`)).option(`description`,{type:`string`,description:`Optional description for the Notification policy.`}).option(`enabled`,{type:`boolean`,description:`Whether or not the Notification policy is enabled.`,default:!0}).option(`filters-actions`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-affected-asns`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-affected-components`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-affected-locations`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-airport-code`,{type:`string`,array:!0,description:`Used for configuring maintenance_event_notification`}).option(`filters-alert-trigger-preferences`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-alert-trigger-preferences-value`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-check-id`,{type:`string`,array:!0,description:`Used for configuring magic_endpoint_healthcheck_alert. Takes one or more health check IDs, each a UUID. That alert type requires check_id together with alert_trigger_preferences set to slo, a numeric alert_trigger_preferences_value, and selectors set to failures.`}).option(`filters-enabled`,{type:`string`,array:!0,description:`Used for configuring load_balancing_pool_enablement_alert`}).option(`filters-environment`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event-source`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-event-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-group-by`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-health-check-id`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-incident-impact`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-input-id`,{type:`string`,array:!0,description:`Used for configuring stream_live_notifications`}).option(`filters-insight-class`,{type:`string`,array:!0,description:`Used for configuring security_insights_alert`}).option(`filters-limit`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-logo-tag`,{type:`string`,array:!0,description:`Used for configuring logo_match_alert`}).option(`filters-megabits-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-new-health`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-new-status`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-packets-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-pool-id`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-pop-names`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-product`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-project-id`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-protocol`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-query-id`,{type:`string`,array:!0,description:`Used for configuring stakeout_saved_query_daily_digest_alert and stakeout_saved_query_immediate_alert, which require it. Takes exactly one value, the saved query ID.`}).option(`filters-query-tag`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-requests-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-selectors`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-services`,{type:`string`,array:!0,description:`Used for configuring clickhouse_alert_fw_ent_anomaly`}).option(`filters-slo`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-status`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-target-hostname`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-target-ip`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-target-zone-name`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-token-id`,{type:`string`,array:!0,description:`Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.`}).option(`filters-total-spend-dollars`,{type:`string`,array:!0,description:`Used for configuring billing_budget_alert. Takes exactly one value, the budget threshold in US dollars, as a string greater than zero.`}).option(`filters-traffic-exclusions`,{type:`string`,array:!0,description:`Used for configuring traffic_anomalies_alert`}).option(`filters-tunnel-id`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-tunnel-name`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-where`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-zones`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`mechanisms-email`,{type:`string`,description:`The mechanisms.email field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id"?: string}]. ? marks optional keys.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id"?: string}]. ? marks optional keys.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id"?: string}]. ? marks optional keys.`}).option(`name`,{type:`string`,description:`Name of the policy.`}).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 de={command:`create`,describe:`Create a Notification policy`,builder:ue,handler:async e=>c({command:`alerting policies create`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({alert_interval:h(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:h(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],check_id:e[`filters-check-id`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_id:e[`filters-query-id`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],total_spend_dollars:e[`filters-total-spend-dollars`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:f(e[`mechanisms-email`],`mechanisms-email`),pagerduty:f(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:f(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:h(e.name,`name`,`text`)}):p(e.body)});return}let c=e.body===void 0?void 0:p(e.body),d=await t(e),g=e.local?a:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>d.send(X,{body:e,account_id:g}));o(t,{successLabel:`Created`});return}if(e[`alert-type`]===void 0&&(e[`alert-type`]=await u(`alert-type`,"Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. This enum lists every alert type, not the ones a given account can create, since some types depend on entitlements or account type. To get the alert types an account can create, call `GET /accounts/{account_id}/alerting/v3/available_alerts`.",/* @__PURE__ */ `abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.attack_lifecycle.bgp_advertisement_change.bgp_hijack_notification.billing_budget_alert.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.casb_weekly_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.closed_port_scan_alert.cloudforce_one_request_notification.cmd_managed_defense_notification.cni_maintenance_notification.containers_security_alert.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dex_device_connectivity_alert.dex_synthetic_test_availability_alert.dex_synthetic_test_latency_alert.dos_attack_l4.dos_attack_l7.executive_communications.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.leaked_service_token_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.log_explorer_ingest_rate_limit.log_explorer_scheduled_query_results_alert.logo_match_alert.magic_endpoint_healthcheck_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.open_port_scan_alert.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stakeout_credential_leak_alert.stakeout_saved_query_daily_digest_alert.stakeout_saved_query_immediate_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.workers_for_platforms_security_alert.workers_observability_alert.workers_observability_real_time_issue.zone_aop_custom_certificate_expiration_type`.split(`.`))),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await l(`name`,`Name of the policy.`));let _=m({alert_interval:h(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:h(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],check_id:e[`filters-check-id`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_id:e[`filters-query-id`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],total_spend_dollars:e[`filters-total-spend-dollars`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:f(e[`mechanisms-email`],`mechanisms-email`),pagerduty:f(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:f(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:h(e.name,`name`,`text`)}),v=await s(`Creating`,async()=>d.send(X,{body:_,account_id:g}));o(v,{successLabel:`Created`})})};var fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`};function pe(e){return e.usage(`$0 alerting policies delete <policy-id>
|
|
29
|
+
|
|
30
|
+
Delete a Notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,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 me={command:`delete <policy-id>`,describe:`Delete a Notification policy`,builder:pe,handler:async e=>c({command:`alerting policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await d({force:!!e.force,message:`This operation deletes the notification policy.`}))return;let u=await s(`Deleting`,async()=>c.send(fe,{account_id:l,policy_id:e[`policy-id`]}));o(u,{successLabel:`Deleted`})})};function he(e){return e.usage(`$0 alerting policies email details <policy-id>
|
|
31
|
+
|
|
32
|
+
Shows details for unsubscribing an email address from a notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`email`,{type:`string`,description:`Email`,demandOption:!0}).option(`token`,{type:`string`,description:`Token`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`details <policy-id>`,describe:`Show email unsubscribe details`,builder:he,handler:async e=>c({command:`alerting policies email details`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={email:e.email,token:e.token};if(e.dryRun){let t=await r();n({command:`cf alerting policies email details`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/email/unsubscribe`,pathParams:{"policy-id":String(e[`policy-id`]??``)},query:o,bodyKind:`none`});return}await t(e);let c=e.local?a:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(o).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>_(`/accounts/${c}/alerting/v3/policies/${encodeURIComponent(String(e[`policy-id`]))}/email/unsubscribe${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));g(u.toString(`utf-8`))})};function _e(e){return e.usage(`$0 alerting policies email unsubscribe <policy-id>
|
|
33
|
+
|
|
34
|
+
Unsubscribes an email address from a notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`email`,{type:`string`,description:`Email`,demandOption:!0}).option(`token`,{type:`string`,description:`Token`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`unsubscribe <policy-id>`,describe:`Unsubscribe email from a Notification policy`,builder:_e,handler:async e=>c({command:`alerting policies email unsubscribe`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={email:e.email,token:e.token};if(e.dryRun){let t=await r();n({command:`cf alerting policies email unsubscribe`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/email/unsubscribe`,pathParams:{"policy-id":String(e[`policy-id`]??``)},query:o,bodyKind:`none`});return}await t(e);let c=e.local?a:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(o).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Creating`,async()=>_(`/accounts/${c}/alerting/v3/policies/${encodeURIComponent(String(e[`policy-id`]))}/email/unsubscribe${l?`?`+l:``}`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo}));g(u.toString(`utf-8`))})},ye={command:`email`,describe:`Operations for policies.email`,builder:e=>e.command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var be={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`};function xe(e){return e.usage(`$0 alerting policies get <policy-id>
|
|
35
|
+
|
|
36
|
+
Get details for a single policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get <policy-id>`,describe:`Get a Notification policy`,builder:xe,handler:async e=>c({command:`alerting policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(be,{account_id:l,policy_id:e[`policy-id`]}));o(u,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies`};function we(e){return e.usage(`$0 alerting policies list
|
|
37
|
+
|
|
38
|
+
Get a list of all Notification policies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List Notification policies`,builder:we,handler:async e=>c({command:`alerting policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ce,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}/test`,body:`json`};function Ee(e){return e.usage(`$0 alerting policies test <policy-id>
|
|
39
|
+
|
|
40
|
+
Send a test notification for a policy to verify delivery mechanisms are working as expected.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`severity`,{type:`number`,description:`Severity level for the test alert. Defaults to INFO (1) if omitted.`}).option(`source`,{type:`string`,description:`Source identifier for the test alert.`}).option(`state-correlation-id`,{type:`string`,description:`Correlation ID for stateful test alerts. Required when state_event is set.`}).option(`state-event`,{type:`number`,description:`State event type for stateful test alerts. Use with state_correlation_id.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Optional configuration for the test notification. When omitted, a default INFO-severity test alert is sent.`})}const De={command:`test <policy-id>`,describe:`Test a Notification policy`,builder:Ee,handler:async e=>c({command:`alerting policies test`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting policies test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/test`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({severity:e.severity,source:h(e.source,`source`,`text`),state_correlation_id:h(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}):p(e.body)});return}let c=e.body===void 0?void 0:p(e.body),l=await t(e),u=e.local?a:await i();if(e.accountId=u,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>l.send(Z,{body:t,account_id:u,policy_id:e[`policy-id`]}));o(n,{successLabel:`Created`});return}let d=m({severity:e.severity,source:h(e.source,`source`,`text`),state_correlation_id:h(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}),f=await s(`Creating`,async()=>l.send(Z,{body:d,account_id:u,policy_id:e[`policy-id`]}));o(f,{successLabel:`Created`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`,body:`json`};function Oe(e){return e.usage(`$0 alerting policies update <policy-id>
|
|
41
|
+
|
|
42
|
+
Update a Notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`alert-interval`,{type:`string`,description:`Optional specification of how often to re-alert from the same incident, not support on all alert types.`}).option(`alert-type`,{type:`string`,description:"Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. This enum lists every alert type, not the ones a given account can create, since some types depend on entitlements or account type. To get the alert types an account can create, call `GET /accounts/{account_id}/alerting/v3/available_alerts`.",choices:/* @__PURE__ */ `abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.attack_lifecycle.bgp_advertisement_change.bgp_hijack_notification.billing_budget_alert.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.casb_weekly_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.closed_port_scan_alert.cloudforce_one_request_notification.cmd_managed_defense_notification.cni_maintenance_notification.containers_security_alert.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dex_device_connectivity_alert.dex_synthetic_test_availability_alert.dex_synthetic_test_latency_alert.dos_attack_l4.dos_attack_l7.executive_communications.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.leaked_service_token_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.log_explorer_ingest_rate_limit.log_explorer_scheduled_query_results_alert.logo_match_alert.magic_endpoint_healthcheck_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.open_port_scan_alert.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stakeout_credential_leak_alert.stakeout_saved_query_daily_digest_alert.stakeout_saved_query_immediate_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.workers_for_platforms_security_alert.workers_observability_alert.workers_observability_real_time_issue.zone_aop_custom_certificate_expiration_type`.split(`.`)}).coerce(`alert-type`,e=>h(e,`alert-type`,`text`)).option(`description`,{type:`string`,description:`Optional description for the Notification policy.`}).option(`enabled`,{type:`boolean`,description:`Whether or not the Notification policy is enabled.`}).option(`filters-actions`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-affected-asns`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-affected-components`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-affected-locations`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-airport-code`,{type:`string`,array:!0,description:`Used for configuring maintenance_event_notification`}).option(`filters-alert-trigger-preferences`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-alert-trigger-preferences-value`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-check-id`,{type:`string`,array:!0,description:`Used for configuring magic_endpoint_healthcheck_alert. Takes one or more health check IDs, each a UUID. That alert type requires check_id together with alert_trigger_preferences set to slo, a numeric alert_trigger_preferences_value, and selectors set to failures.`}).option(`filters-enabled`,{type:`string`,array:!0,description:`Used for configuring load_balancing_pool_enablement_alert`}).option(`filters-environment`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event-source`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-event-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-group-by`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-health-check-id`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-incident-impact`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-input-id`,{type:`string`,array:!0,description:`Used for configuring stream_live_notifications`}).option(`filters-insight-class`,{type:`string`,array:!0,description:`Used for configuring security_insights_alert`}).option(`filters-limit`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-logo-tag`,{type:`string`,array:!0,description:`Used for configuring logo_match_alert`}).option(`filters-megabits-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-new-health`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-new-status`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-packets-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-pool-id`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-pop-names`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-product`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-project-id`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-protocol`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-query-id`,{type:`string`,array:!0,description:`Used for configuring stakeout_saved_query_daily_digest_alert and stakeout_saved_query_immediate_alert, which require it. Takes exactly one value, the saved query ID.`}).option(`filters-query-tag`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-requests-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-selectors`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-services`,{type:`string`,array:!0,description:`Used for configuring clickhouse_alert_fw_ent_anomaly`}).option(`filters-slo`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-status`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-target-hostname`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-target-ip`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-target-zone-name`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-token-id`,{type:`string`,array:!0,description:`Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.`}).option(`filters-total-spend-dollars`,{type:`string`,array:!0,description:`Used for configuring billing_budget_alert. Takes exactly one value, the budget threshold in US dollars, as a string greater than zero.`}).option(`filters-traffic-exclusions`,{type:`string`,array:!0,description:`Used for configuring traffic_anomalies_alert`}).option(`filters-tunnel-id`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-tunnel-name`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-where`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-zones`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`mechanisms-email`,{type:`string`,description:`The mechanisms.email field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id"?: string}]. ? marks optional keys.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id"?: string}]. ? marks optional keys.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id"?: string}]. ? marks optional keys.`}).option(`name`,{type:`string`,description:`Name of the policy.`}).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 ke={command:`update <policy-id>`,describe:`Update a Notification policy`,builder:Oe,handler:async e=>c({command:`alerting policies update`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({alert_interval:h(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:h(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],check_id:e[`filters-check-id`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_id:e[`filters-query-id`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],total_spend_dollars:e[`filters-total-spend-dollars`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:f(e[`mechanisms-email`],`mechanisms-email`),pagerduty:f(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:f(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:h(e.name,`name`,`text`)}):p(e.body)});return}let c=e.body===void 0?void 0:p(e.body),l=await t(e),u=e.local?a:await i();if(e.accountId=u,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(Q,{body:t,account_id:u,policy_id:e[`policy-id`]}));o(n,{successLabel:`Updated`});return}let d=m({alert_interval:h(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:h(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],check_id:e[`filters-check-id`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_id:e[`filters-query-id`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],total_spend_dollars:e[`filters-total-spend-dollars`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:f(e[`mechanisms-email`],`mechanisms-email`),pagerduty:f(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:f(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:h(e.name,`name`,`text`)}),g=await s(`Updating`,async()=>l.send(Q,{body:d,account_id:u,policy_id:e[`policy-id`]}));o(g,{successLabel:`Updated`})})},Ae={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(de).command(me).command(Se).command(Te).command(De).command(ke).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences`,body:`json`};function Me(e){return e.usage(`$0 alerting silences create
|
|
43
|
+
|
|
44
|
+
Creates a new silence for an account.`).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 Ne={command:`create`,describe:`Create Silences`,builder:Me,handler:async e=>c({command:`alerting silences create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting silences create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:p(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let c=e.body===void 0?void 0:p(e.body),l=await t(e),u=e.local?a:await i();if(e.accountId=u,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(je,{body:e,account_id:u}));o(t,{successLabel:`Created`})}})};var Pe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences/${t.silence_id}`};function $(e){return e.usage(`$0 alerting silences delete <silence-id>
|
|
45
|
+
|
|
46
|
+
Deletes an existing silence for an account.`).positional(`silence-id`,{type:`string`,description:`Silence ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Fe={command:`delete <silence-id>`,describe:`Delete Silence`,builder:$,handler:async e=>c({command:`alerting silences delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting silences delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences/${e[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(e[`silence-id`]))}`,pathParams:{"silence-id":String(e[`silence-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await d({force:!!e.force,message:`This operation deletes the notification silence.`}))return;let u=await s(`Deleting`,async()=>c.send(Pe,{account_id:l,silence_id:e[`silence-id`]}));o(u,{successLabel:`Deleted`})})};var Ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences/${t.silence_id}`};function Le(e){return e.usage(`$0 alerting silences get <silence-id>
|
|
47
|
+
|
|
48
|
+
Gets a specific silence for an account.`).positional(`silence-id`,{type:`string`,description:`Silence ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`get <silence-id>`,describe:`Get Silence`,builder:Le,handler:async e=>c({command:`alerting silences get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting silences get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences/${e[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(e[`silence-id`]))}`,pathParams:{"silence-id":String(e[`silence-id`]??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ie,{account_id:l,silence_id:e[`silence-id`]}));o(u,{successLabel:`Loaded`})})};var ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences`};function Be(e){return e.usage(`$0 alerting silences list
|
|
49
|
+
|
|
50
|
+
Gets a list of silences for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ve={command:`list`,describe:`List Silences`,builder:Be,handler:async e=>c({command:`alerting silences list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf alerting silences list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ze,{account_id:l}));o(u,{successLabel:`Loaded`})})};var He={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences`,body:`json`};function Ue(e){return e.usage(`$0 alerting silences update
|
|
51
|
+
|
|
52
|
+
Updates existing silences for an account.`).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 We={command:`update`,describe:`Update Silences`,builder:Ue,handler:async e=>c({command:`alerting silences update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf alerting silences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:p(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let c=e.body===void 0?void 0:p(e.body),l=await t(e),u=e.local?a:await i();if(e.accountId=u,e.body!==void 0){let e=c,t=await s(`Updating`,async()=>l.send(He,{body:e,account_id:u}));o(t,{successLabel:`Updated`})}})},Ge={command:`silences`,describe:`Operations for silences`,builder:e=>e.command(Ne).command(Fe).command(Re).command(Ve).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ke={command:`alerting`,describe:`alerting`,builder:e=>e.command(ee).command(ae).command(le).command(Ae).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ke as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import{o as l,r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{t as p}from"./local-B3zt9PXR.mjs";import{a as m}from"./prompt-D274Im1O.mjs";var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency/colos`};function g(e){return e.usage(`$0 analytics latency colos get
|
|
3
|
+
|
|
4
|
+
Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:g,handler:async e=>c({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let c=await s(`Loading`,async()=>r.send(h,{zone_id:a}));o(c,{successLabel:`Loaded`})})},v={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency`,query:[`bins`]};function b(e){return e.usage(`$0 analytics latency get
|
|
5
|
+
|
|
6
|
+
Retrieves aggregate Argo Smart Routing analytics for a zone, including latency improvements, bandwidth savings, and routing statistics.`).option(`bins`,{type:`string`,description:`Bins`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Argo Analytics for a zone`,builder:b,handler:async e=>c({command:`analytics latency get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={bins:e.bins};if(e.dryRun){n({command:`cf analytics latency get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:r,bodyKind:`none`});return}let a=await t(e),c=await i({zone:e.zone},a,{quiet:e.quiet});e.zoneId=c;let l=await s(`Loading`,async()=>a.send(y,{zone_id:c,...r}));o(l,{successLabel:`Loaded`})})},S={command:`latency`,describe:`Argo Smart Routing latency analytics showing time-to-first-byte improvements`,builder:e=>e.command(x).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/content-findings/top-n`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function w(e){return e.usage(`$0 analytics query data-security content-findings top-n
|
|
7
|
+
|
|
8
|
+
Returns the top N integrations ranked by total content findings.`).option(`filters`,{type:`string`,description:'Filters to apply. `findingType = content` is applied automatically for CASB data. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "op": string, "values": [(string | boolean | number)]}].'}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`limit`,{type:`number`,description:`Maximum number of integrations to return.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Returns the top N integrations for content findings.`})}const T={command:`top-n`,describe:`Top integrations by content findings`,builder:w,handler:async e=>c({command:`analytics query data-security content-findings top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf analytics query data-security content-findings top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/content-findings/top-n`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),n:e.limit,to:f(e.to,`to`,`text`)}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),c=await t(e),h=e.local?p:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await s(`Creating`,async()=>c.send(C,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let g=d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),n:e.limit,to:f(e.to,`to`,`text`)}),_=await s(`Creating`,async()=>c.send(C,{body:g,account_id:h}));o(_,{successLabel:`Created`})})},E={command:`content-findings`,describe:`Operations for query.data-security.content-findings`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/findings/summary`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function O(e){return e.usage(`$0 analytics query data-security findings summary
|
|
9
|
+
|
|
10
|
+
Returns aggregate current-period and previous-period totals for CASB findings.`).option(`filters`,{type:`string`,description:`Filters to apply. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "op": string, "values": [(string | boolean | number)]}].`}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query for aggregate findings summary.`})}const k={command:`summary`,describe:`Data security findings summary`,builder:O,handler:async e=>c({command:`analytics query data-security findings summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf analytics query data-security findings summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/findings/summary`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),to:f(e.to,`to`,`text`)}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),c=await t(e),h=e.local?p:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await s(`Creating`,async()=>c.send(D,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let g=d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),to:f(e.to,`to`,`text`)}),_=await s(`Creating`,async()=>c.send(D,{body:g,account_id:h}));o(_,{successLabel:`Created`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/findings/timeseries`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function j(e){return e.usage(`$0 analytics query data-security findings timeseries
|
|
11
|
+
|
|
12
|
+
Returns merged time-bucketed CASB findings.`).option(`filters`,{type:`string`,description:`Filters to apply. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "op": string, "values": [(string | boolean | number)]}].`}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query for findings timeseries.`})}const M={command:`timeseries`,describe:`Data security findings timeseries`,builder:j,handler:async e=>c({command:`analytics query data-security findings timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf analytics query data-security findings timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/findings/timeseries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),to:f(e.to,`to`,`text`)}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),c=await t(e),h=e.local?p:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await s(`Creating`,async()=>c.send(A,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let g=d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),to:f(e.to,`to`,`text`)}),_=await s(`Creating`,async()=>c.send(A,{body:g,account_id:h}));o(_,{successLabel:`Created`})})},N={command:`findings`,describe:`Operations for query.data-security.findings`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`data-security`,describe:`Operations for query.data-security`,builder:e=>e.command(E).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/summary`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function I(e){return e.usage(`$0 analytics query summary <dataset>
|
|
13
|
+
|
|
14
|
+
Returns aggregate summary stats for a dataset. Includes current-period and previous-period totals for trend comparison.`).positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "op": string, "values": [(string | boolean | number)]}].`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`summary <dataset>`,describe:`Query analytics summary`,builder:I,handler:async e=>c({command:`analytics query summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf analytics query summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/summary`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:f(e.to,`to`,`text`)}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),c=await t(e),h=e.local?p:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await s(`Creating`,async()=>c.send(F,{body:t,account_id:h,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`));let g=d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:f(e.to,`to`,`text`)}),_=await s(`Creating`,async()=>c.send(F,{body:g,account_id:h,dataset:e.dataset}));o(_,{successLabel:`Created`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/timeseries`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function z(e){return e.usage("$0 analytics query timeseries <dataset>\n\nReturns time-bucketed analytics data for a dataset. Includes time slots, each containing the requested stats, group-by dimensions, and resolution-controlled bucket size (e.g. `hour`, `day`).").positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "op": string, "values": [(string | boolean | number)]}].`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`resolution`,{type:`string`,description:`Time bucket size for grouping results. Controls the granularity of the returned time slots.
|
|
15
|
+
`}).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 B={command:`timeseries <dataset>`,describe:`Query analytics timeseries`,builder:z,handler:async e=>c({command:`analytics query timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf analytics query timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/timeseries`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:f(e.to,`to`,`text`),resolution:f(e.resolution,`resolution`,`text`)}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),c=await t(e),h=e.local?p:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await s(`Creating`,async()=>c.send(R,{body:t,account_id:h,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),e.resolution===void 0&&(e.resolution=await m(`resolution`,`Time bucket size for grouping results. Controls the granularity of the returned time slots. `));let g=d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:f(e.to,`to`,`text`),resolution:f(e.resolution,`resolution`,`text`)}),_=await s(`Creating`,async()=>c.send(R,{body:g,account_id:h,dataset:e.dataset}));o(_,{successLabel:`Created`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/top-n`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function H(e){return e.usage(`$0 analytics query top-n <dataset>
|
|
16
|
+
|
|
17
|
+
Returns the top N results for a dataset by a specified stat. Includes an array of result rows, each containing the requested stats and group-by dimensions.`).positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "op": string, "values": [(string | boolean | number)]}].`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`order-by`,{type:`string`,description:`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`}).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 U={command:`top-n <dataset>`,describe:`Query analytics top-N`,builder:H,handler:async e=>c({command:`analytics query top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf analytics query top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/top-n`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:f(e.to,`to`,`text`),n:e.limit,orderBy:f(e[`order-by`],`order-by`,`text`)}):u(e.body)});return}let i=e.body===void 0?void 0:u(e.body),c=await t(e),h=e.local?p:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await s(`Creating`,async()=>c.send(V,{body:t,account_id:h,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);if(e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e[`order-by`]===void 0&&(e[`order-by`]=await m(`order-by`,`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`));let g=d({filters:l(e.filters,`filters`),from:f(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:f(e.to,`to`,`text`),n:e.limit,orderBy:f(e[`order-by`],`order-by`,`text`)}),_=await s(`Creating`,async()=>c.send(V,{body:g,account_id:h,dataset:e.dataset}));o(_,{successLabel:`Created`})})},W={command:`query`,describe:`Operations for query`,builder:e=>e.command(L).command(B).command(U).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`analytics`,describe:`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,builder:e=>e.command(S).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{n as a,t as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-hFMAotFl.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";function d(e){return e.usage(`$0 analytics-engine sql query
|
|
3
3
|
|
|
4
|
-
Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Plain-text request body (without JSON quotes)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>
|
|
4
|
+
Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Plain-text request body (without JSON quotes)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>l({command:`analytics-engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await r();n({command:`cf analytics-engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.file===void 0?d.body:{file:d.file}});return}if(d.body===void 0&&d.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let l=d.file===void 0?a(d.body,`body`,`binary`):void 0,f=await t(d),p=d.local?s:await i();if(d.accountId=p,d.file!==void 0){let t=o(d.file),n=await u(`Loading`,async()=>e(f,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));c(n,{successLabel:`Loaded`})}else if(d.body!==void 0){let t=l,n=await u(`Loading`,async()=>e(f,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));c(n,{successLabel:`Loaded`})}})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics-engine`,describe:`analytics-engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|