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
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-CEpZ-lQZ.mjs";import{n as g,t as _}from"./raw-fetch-Cl5spWC3.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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(v,{account_id:l}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(x,{account_id:l}));a(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();o({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 n(e),l=e.local?t:await i();if(e.accountId=l,!await h({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}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(A,{account_id:l,token_id:e[`token-id`]}));a(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();o({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?d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}):u(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(P,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`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 p(`url`,`The POST endpoint to call when dispatching a notification.`));let h=d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}),g=await s(`Creating`,async()=>l.send(P,{body:h,account_id:m}));a(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();o({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 n(e),l=e.local?t:await i();if(e.accountId=l,!await h({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`]}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(B,{account_id:l,webhook_id:e[`webhook-id`]}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(U,{account_id:l}));a(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();o({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?d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}):u(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(K,{body:t,account_id:m,webhook_id:e[`webhook-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await p(`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 p(`url`,`The POST endpoint to call when dispatching a notification.`));let h=d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}),g=await s(`Updating`,async()=>l.send(K,{body:h,account_id:m,webhook_id:e[`webhook-id`]}));a(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();o({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 n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(oe,{account_id:u,...c}));a(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.`,choices:/* @__PURE__ */ `abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.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.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.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.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.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.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.zone_aop_custom_certificate_expiration_type`.split(`.`)}).coerce(`alert-type`,e=>f(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-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-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-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.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json.`}).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();o({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?d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(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`],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_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`],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:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),h=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>h.send(X,{body:e,account_id:g}));a(t,{successLabel:`Created`});return}if(e[`alert-type`]===void 0&&(e[`alert-type`]=await m(`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.`,/* @__PURE__ */ `abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.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.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.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.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.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.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.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 p(`name`,`Name of the policy.`));let _=d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(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`],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_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`],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:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}),v=await s(`Creating`,async()=>h.send(X,{body:_,account_id:g}));a(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();o({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 n(e),l=e.local?t:await i();if(e.accountId=l,!await h({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`]}));a(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 a={email:e.email,token:e.token};if(e.dryRun){let t=await r();o({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:a,bodyKind:`none`});return}await n(e);let c=e.local?t:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(a).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 a={email:e.email,token:e.token};if(e.dryRun){let t=await r();o({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:a,bodyKind:`none`});return}await n(e);let c=e.local?t:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(a).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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(be,{account_id:l,policy_id:e[`policy-id`]}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ce,{account_id:l}));a(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();o({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?d({severity:e.severity,source:f(e.source,`source`,`text`),state_correlation_id:f(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>l.send(Z,{body:t,account_id:p,policy_id:e[`policy-id`]}));a(n,{successLabel:`Created`});return}let m=d({severity:e.severity,source:f(e.source,`source`,`text`),state_correlation_id:f(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}),h=await s(`Creating`,async()=>l.send(Z,{body:m,account_id:p,policy_id:e[`policy-id`]}));a(h,{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.`,choices:/* @__PURE__ */ `abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.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.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.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.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.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.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.zone_aop_custom_certificate_expiration_type`.split(`.`)}).coerce(`alert-type`,e=>f(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-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-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-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.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json.`}).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();o({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?d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(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`],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_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`],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:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),p=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>p.send(Q,{body:t,account_id:m,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let h=d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(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`],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_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`],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:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}),g=await s(`Updating`,async()=>p.send(Q,{body:h,account_id:m,policy_id:e[`policy-id`]}));a(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();o({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:u(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:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(je,{body:e,account_id:d}));a(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();o({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 n(e),l=e.local?t:await i();if(e.accountId=l,!await h({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`]}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ie,{account_id:l,silence_id:e[`silence-id`]}));a(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();o({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 n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ze,{account_id:l}));a(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();o({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:u(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:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Updating`,async()=>l.send(He,{body:e,account_id:d}));a(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};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m}from"./prompt-CEpZ-lQZ.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=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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 t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(h,{zone_id:r}));o(a,{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=>l({command:`analytics latency get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={bins:e.bins};if(e.dryRun){s({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:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.send(y,{zone_id:a,...t}));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."}).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=>l({command:`analytics query data-security content-findings top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({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?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),n:e.limit,to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.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=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),n:e.limit,to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.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.`}).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=>l({command:`analytics query data-security findings summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({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?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.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=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.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.`}).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=>l({command:`analytics query data-security findings timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({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?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.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=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.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.`}).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=>l({command:`analytics query summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({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?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.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=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.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.`}).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=>l({command:`analytics query timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({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?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),resolution:p(e.resolution,`resolution`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.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=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),resolution:p(e.resolution,`resolution`,`text`)}),_=await c(`Creating`,async()=>l.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.`}).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=>l({command:`analytics query top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({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?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),n:e.limit,orderBy:p(e[`order-by`],`order-by`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.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=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),n:e.limit,orderBy:p(e[`order-by`],`order-by`,`text`)}),_=await c(`Creating`,async()=>l.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};
|
package/dist/auth-B-h0BHg7.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{K as e}from"./dist-D-ihn_mV.mjs";import{i as t,r as n,t as r}from"./api-Dnt6lRJG.mjs";import{a as i,n as a}from"./context-BY1Eh_Qe.mjs";import{l as o}from"./oauth-CFVUl-Wv.mjs";import{t as s}from"./auth-token-DW4dJVdj.mjs";import{n as c}from"./request-headers-C0FpeBhz.mjs";const l=6e4;function u(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var d={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},f={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function p(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function m(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function h(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function g(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)g(e,t,r);else e.append(t,String(n))}}function _(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))g(t,n,r);return t.toString()}function v(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=_(n??{});return a&&(i.search=a),i.toString()}const y=/* @__PURE__ */ new WeakMap,b=/* @__PURE__ */ new WeakMap;async function x(e,r,i,a={}){let o=e.baseUrl,s=v(i,o,a.query),c={...a.headers},l;a.body!==void 0&&(p(a.body)||typeof a.body==`string`&&m(c)?l=a.body:(c[`Content-Type`]??=`application/json`,l=JSON.stringify(a.body)));let d=a.timeout===void 0&&u(l)?b.get(e):void 0,f=a.timeout??y.get(e)??6e4,g;try{g=await(d??e).fetch(s,{method:r,headers:c,body:l,signal:a.signal},{timeoutInSeconds:a.timeout===void 0?void 0:a.timeout/1e3,abortSignal:a.signal})}catch(e){throw a.signal?.aborted?Error(`Request aborted`):e===`timeout`||e instanceof Error&&e.name===`AbortError`?Error(d?`Request timed out`:`Request timed out after ${f}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!g.ok)throw new t({statusCode:g.status,body:await h(g),rawResponse:{status:g.status,statusText:g.statusText,url:g.url||s,headers:g.headers,redirected:g.redirected,type:g.type}});if(g.status===204)return null;let _=g.headers.get(`content-type`)??``;if(!_.includes(`application/json`)&&a.preserveNonJsonBytes)return Buffer.from(await g.arrayBuffer());let x=await g.text();if(x===``)return null;if(!_.includes(`application/json`))return x;let S=JSON.parse(x);if(S.success===!1){let e=S.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new t({message:`API error: ${e}`,statusCode:g.status,body:S})}return`result`in S?n(S.result,S.result_info):S}function S(e){let t={baseUrl:e.baseURL??`https://api.cloudflare.com/client/v4`,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??6e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch},n=new r(t);return y.set(n,e.timeout??6e4),e.timeout===void 0&&b.set(n,new r({...t,timeoutInSeconds:void 0})),n}async function C(t){if(o())return;let n=await i();if(n)return n;try{let n=await s(),r=e({compliance_region:await a()}),i=t-Date.now();if(i<=0)return;let o=S({apiToken:n,baseURL:r,defaultHeaders:c()}),l={timeoutInSeconds:i/1e3,maxRetries:0},[u,p]=await Promise.allSettled([o.send(d,{per_page:50},l),o.send(f,{per_page:50},l)]);if(u.status===`rejected`)return;let m=u.value;if((m.result_info?.total_count??m.result.length)>m.result.length)return;let h=m.result;if(p.status===`fulfilled`){let e=p.value.result??[];if((p.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));h=h.filter(e=>t.has(e.id))}return h.length===1?h[0]?.id:void 0}catch{return}}async function w(t){if(t.dryRun&&o())throw Error(`This command's dry run cannot be used with --temporary-account. Remove --dry-run to run the command for real.`);let n=e({compliance_region:await a()});if(t.local){let{createLocalFetch:e}=await import(`./local-D5Vq6ooZ.mjs`);return S({apiToken:`cf-local-mode-no-auth`,baseURL:n,defaultHeaders:c(),fetch:e({persistTo:t.persistTo,apiBaseUrl:n})})}return S({apiToken:await s(),baseURL:n,defaultHeaders:c()})}export{C as a,u as c,x as i,l,w as n,f as o,_ as r,d as s,S as t};
|
package/dist/auth-B6tswVxH.mjs
DELETED
package/dist/auth-clmqFEWU.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./agent-context-Dtyy4aKL.mjs";import{c as n}from"./chunk-SOBRPAPT-QTjnHSNs.mjs";import{i as r}from"./blocks-BFulF68V.mjs";import"./ui-xjCox-gU.mjs";import{t as i}from"./cf-BQ_LRiut.mjs";import{t as a}from"./log-BWdaOGOW.mjs";import{d as o,f as s,i as c,r as l,t as u}from"./oauth-CFVUl-Wv.mjs";import{t as d}from"./auth-token-DW4dJVdj.mjs";import{t as f}from"./output-BZQEl3mK.mjs";import{n as p}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as m,o as h,s as g}from"./schema-cache-5NkOj7Y3.mjs";import{a as _,c as v,i as y,n as b,o as x,r as S,s as C,t as w}from"./login-DG5ebyab.mjs";const T={command:`logout`,describe:`Log out and remove stored credentials`,handler:async t=>{y(t,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let n=l();n!=="default"&&a.warn(`This directory has profile "${n}" active. ${e.code(`cf auth logout`)} removes the default profile's token, not "${n}". To delete "${n}", run:`,`cf auth delete ${n}`),await o(`default`)}},E=`oauth-scopes`;function D(e){if(!Array.isArray(e))return;let t=[];for(let n of e){let{id:e,name:r,category:i}=n??{};typeof e==`string`&&t.push({id:e,name:typeof r==`string`?r:e,...typeof i==`string`&&{category:i}})}return t.length>0?t:void 0}function O(e){return new Map(e.map(e=>[e.id,e]))}async function k(e){let t=h(E,[],864e5,D);if(t)return O(t);let[n,{default:r}]=await Promise.all([e(),import(`./list-4MfEFwJN.mjs`)]),i=await n.send(r),a=D(typeof i==`object`&&i&&`result`in i?i.result:i);if(!a)throw Error(`the API returned an unexpected scope catalogue`);return g(E,[],a),O(a)}const A={account_and_billing:`Account & Billing`,ai_and_machine_learning:`AI & Machine Learning`,analytics_and_logs:`Analytics & Logs`,app_security:`App Security`,cache_and_performance:`Cache & Performance`,cloudflare_one_and_zero_trust:`Cloudflare One / Zero Trust`,developer_platform:`Developer Platform`,dns_and_zones:`DNS & Zones`,email_and_messaging:`Email & Messaging`,media:`Media`,network_services:`Network Services`,other:`Other`,rules_and_configuration:`Rules & Configuration`},j=`Uncategorized`,M=[`Other`,j],N=new Set(i),P=/* @__PURE__ */ new Set([`read`,`metadata_read`]),F=/^(.+)([.:])([^.:]+)$/;function I(e){return A[e]??e.split(`_`).map(e=>e===`and`?`&`:e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function L(e,t){return M.indexOf(e)-M.indexOf(t)||e.localeCompare(t)}function R(e){return e.some(e=>F.test(e))}function z(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=F.exec(r);if(!e?.[1]||!e[3])continue;let i=t.get(r),a=i?.category?I(i.category):j,o=n.get(a)??[];o.push({scope:r,resource:e[1],action:e[3]}),n.set(a,o)}return n}function B(e,t,n){let r=t.get(e)??[],i=n.get(e)?.length??0,a=r.filter(({scope:e})=>N.has(e)).length,o=r.length-a,s=i>0?[`${a}/${i}`]:[];return o>0&&s.push(`${o} custom`),s.join(` + `)}function V(t,n){let r=z(t,n),a=z(i,n),o=[...r.keys()].sort(L);if(o.length===0)return``;let s=Math.max(...o.map(e=>e.length));return o.map(t=>`${e.bold(e.info(t.padEnd(s)))} ${e.muted(B(t,r,a))}`).join(`
|
|
3
|
-
`)}const H=e=>` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `)}`,U=e=>e.toLowerCase().replaceAll(`_`,`-`);function W(e,t){return H(e).includes(H(t).trimEnd())}function G(e){let t=/* @__PURE__ */ new Set([j]);for(let{category:n}of e.values())n&&t.add(I(n));return[...t].sort(L)}function K(t,n,{product:r=``,filter:a=``}={}){let o=z(t,n),s=z(i,n),c=[];for(let t of[...o.keys()].sort(L)){if(!W(t,r))continue;let n=(o.get(t)??[]).filter(({scope:e})=>U(e).includes(U(a)));if(n.length===0)continue;let i=[`${e.bold(e.info(t))} ${e.muted(`(${B(t,o,s)})`)}`],l=/* @__PURE__ */ new Map,u=[...n].sort((e,t)=>Number(!P.has(e.action))-Number(!P.has(t.action))||e.action.localeCompare(t.action));for(let{scope:t,resource:n,action:r}of u){let i=(P.has(r)?e.muted(r):e.warning(r))+(N.has(t)?``:e.muted(` (custom)`));l.set(n,(l.get(n)??/* @__PURE__ */ new Set).add(i))}let d=Math.max(...[...l.keys()].map(e=>e.length));for(let[e,t]of[...l].sort(([e],[t])=>e.localeCompare(t)))i.push(` ${e.padEnd(d)} ${[...t].join(`, `)}`);c.push(i.join(`
|
|
4
|
-
`))}return c.join(`
|
|
5
|
-
|
|
6
|
-
`)}function q(e){let t=l();return t==="default"?e?`cf auth login --force`:`cf auth login`:`cf auth create ${t}`}function J(t){let n=t?.statusCode;return n===401||n===403?`your login was rejected; run ${e.code(q(!0))} to log in again`:m(t)}const Y={command:`scopes [product]`,describe:`Show the OAuth scopes granted to the current login, by product`,builder:e=>e.positional(`product`,{type:`string`,description:`Show the granted permissions in product areas matching this name, such as dns or developer`}).option(`all`,{type:`boolean`,description:`Show every granted permission, grouped by product`,default:!1}).option(`filter`,{type:`string`,description:`Show the granted permissions whose scope contains this term`}),handler:async t=>{if(t[`temporary-account`]||t[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth scopes.`);if(n({allowGlobalAuthKey:!1})!==void 0){a.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set, so its own permissions apply rather than OAuth scopes.`);return}let r=s();if(r?.oauth_token===void 0){a.info(`Not logged in. Run ${e.code(q(!1))} to log in.`);return}let{scopes:i}=r;if(!i){a.info(`This login didn't record its scopes. Run ${e.code(q(!0))} to log in again.`);return}if(!R(i)){a.info(`No product scopes granted. Run ${e.code(q(!0))} to log in with the default scopes.`);return}let o;try{o=await k(async()=>{let{createCommandClient:e}=await import(`./auth-B6tswVxH.mjs`);return e(t)})}catch(e){a.warn(`Couldn't load Cloudflare's scope catalogue (${J(e)}), so scopes are listed without product groups.`),console.log(i.join(`
|
|
7
|
-
`));return}if(t.product===void 0&&!t.all&&t.filter===void 0){console.log(V(i,o)),a.info(`Run ${e.code(`cf auth scopes <product>`)} to see a product's permissions, or ${e.code(`cf auth scopes --all`)} for every granted product.`);return}let{product:c}=t;c!==void 0&&!G(o).some(e=>W(e,c))?a.info(`No product area matches "${c}". Run ${e.code(`cf auth scopes --filter ${c}`)} to search scope names instead.`):console.log(K(i,o,{product:t.product,filter:t.filter})||e.muted(`No granted scopes match.`))}},X={command:`whoami`,describe:`Show current user and authentication status`,handler:async e=>{if(e[`temporary-account`]||e[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth whoami.`);let n=process.env.CLOUDFLARE_API_TOKEN,i=s(),a;a=n?`CLOUDFLARE_API_TOKEN environment variable`:i?.oauth_token?`OAuth token from ${c()}`:`none`;try{await d()}catch{f({authenticated:!1,error:`Not logged in`}),a===`none`&&t().isAgentic&&console.error(r('Ask the user: "I can put this online for 60 minutes without you signing in. To keep it, complete the temporary-account claim before it expires. Would you like me to deploy it that way?" (https://developers.cloudflare.com/workers/platform/claim-deployments/) If they agree, run `cf deploy --temporary-account`.'));return}let{createCommandClient:o}=await import(`./auth-B6tswVxH.mjs`),{default:l}=await import(`./get-BTisquA3.mjs`),{default:p}=await import(`./verify-B9ILCohg.mjs`),m=await o(e),h,g=[],[_,v,y]=await Promise.allSettled([n?m.send(p):Promise.resolve(void 0),m.send(l),u()]);if(_.status===`rejected`&&process.env.DEBUG&&console.error(`Token verification error:`,_.reason),v.status===`fulfilled`){let e=v.value;e&&`email`in e&&typeof e.email==`string`&&(h=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,v.reason);y.status===`fulfilled`?g=y.value:process.env.DEBUG&&console.error(`Account lookup error:`,y.reason);let b=null;_.status===`fulfilled`&&[`active`,`disabled`,`expired`].includes(_.value?.status??``)?b=_.value?.status===`active`:(v.status===`fulfilled`||y.status===`fulfilled`)&&(b=!0);let x={authenticated:!0,authSource:a,tokenValid:b,...h&&{email:h},accounts:g};i?.oauth_token&&(x.scopes=i.scopes,x.expiresAt=i.expiration_time),f(x)}},Z={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(p(w,{command:`auth login`,classification:b})).command(Q(T,`auth logout`)).command(Q(X,`auth whoami`)).command(Q(Y,`auth scopes`,[`all`])).command(Q(_,`auth create`,[`browser`,`device`])).command(Q(C,`auth delete`)).command(Q(S,`auth activate`)).command(Q(x,`auth deactivate`)).command(Q(v,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e,t,n=[],r){return p(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{Z as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{readFileSync as e}from"node:fs";import{resolve as t}from"node:path";function n(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e]??``;r[n]&&typeof r[n]==`object`||(r[n]={}),r=r[n]}let i=t[t.length-1]??``;r[i]=n}function r(e,t=[]){let n=(e,r)=>{if(Array.isArray(e)||typeof e!=`object`||!e)return e;let i=Object.entries(e).flatMap(([e,i])=>{let a=[...r,e],o=t.some(e=>e.length===a.length&&e.every((e,t)=>e===a[t])),s=o?i:n(i,a);return s===void 0||!o&&typeof s==`object`&&s&&!Array.isArray(s)&&Object.keys(s).length===0?[]:[[e,s]]});return Object.fromEntries(i)};return n(e,[])}function i(n,r){let i=r.startsWith(`--`)?r:`--${r}`,a=n;if(n.startsWith(`@`)){let r=n.slice(1);if(r.length===0)throw Error(`${i} '@' must be followed by a file path (got empty path)`);let o=t(r);try{a=e(o,`utf-8`)}catch(e){let t=e instanceof Error?e.message:`unknown read error`;throw Error(`${i}: cannot read file at '${r}': ${t}`)}}try{return JSON.parse(a)}catch{throw Error(`Invalid JSON in ${i}. Expected valid JSON.`)}}function a(e,t=[],n){let r=i(e,`body`);if(n!==void 0&&Array.isArray(r)&&r.length>n)throw Error(`--body must contain at most ${n} items (received ${r.length}).`);for(let{path:e,flag:n}of t){let t=r;for(let n of e)t=o(t)&&Object.hasOwn(t,n)?t[n]:void 0;if(!o(t))throw Error(`--body must include a JSON object at ${e.join(`.`)} (for --${n}).`)}return r}function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(n,r){if(n===void 0)return;let i=r.startsWith(`--`)?r:`--${r}`;if(typeof n!=`string`)throw Error(`${i} must be provided once as a scalar value.`);let a=n;if(n.startsWith(`@`)){let r=n.slice(1);if(r.length===0)throw Error(`${i} '@' must be followed by a file path (got empty path)`);try{a=e(t(r),`utf-8`)}catch(e){let t=e instanceof Error?e.message:`unknown read error`;throw Error(`${i}: cannot read file at '${r}': ${t}`)}}let o;try{o=JSON.parse(a)}catch{return a}if(typeof o!=`string`&&typeof o!=`number`&&typeof o!=`boolean`)throw Error(`${i} must be a JSON scalar or plain string.`);return o}function c(e,t,n=!1){let r=t.startsWith(`--`)?t:`--${t}`;if(e===void 0){if(n)throw Error(`${r} is required (or pass --body with this field set).`);return}if(typeof e!=`string`)throw Error(`${r} must be provided once as a JSON object.`);let a=i(e,t);if(!o(a))throw Error(`${r} must be a JSON object.`);return a}function l(e,t){return d(e,t,`objects`)}function u(e,t){return d(e,t,`arrays`)}function d(e,t,n){if(e===void 0)return;let r=t.startsWith(`--`)?t:`--${t}`;if(typeof e!=`string`)throw Error(`${r} must be provided once as a JSON array of ${n}.`);let a=i(e,t);if(!Array.isArray(a)||a.some(e=>n===`arrays`?!Array.isArray(e):!o(e)))throw Error(`${r} must be a JSON array of ${n}.`);return a}export{l as a,u as i,a as n,s as o,c as r,n as s,r as t};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-CEpZ-lQZ.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/matches`,query:[`offset`,`limit`,`query_id`,`download`,`orderBy`,`order`]};function _(e){return e.usage(`$0 brand-protection logo-matches get
|
|
3
|
-
|
|
4
|
-
Lists images that matched a saved logo query, most recently matched first by default. Set \`download=true\` to include each matched image as base64 data.`).option(`offset`,{type:`string`,description:`Number of matches to skip, for pagination. Defaults to 0.`}).option(`limit`,{type:`string`,description:`Maximum number of matches to return. Defaults to 50.`}).option(`query-id`,{type:`string`,description:`ID of the logo query whose matches to list.`,demandOption:!0}).option(`download`,{type:`string`,description:"Set to `true` to include each matched image as base64 data in `image_data`, with its MIME type in `content_type`."}).option(`order-by`,{type:`string`,description:"Field to sort by: `matchedAt`, `domain`, `similarityScore`, or `registrar`. Defaults to `matchedAt`.",choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:"Sort direction: `asc` or `desc`. Defaults to `desc`.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`List logo matches`,builder:_,handler:async e=>c({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],download:e.download,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},y={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries`,body:`json`};function x(e){return e.usage(`$0 brand-protection logos create
|
|
5
|
-
|
|
6
|
-
Uploads a logo and creates a saved logo query that finds visually similar images on scanned websites. The tag must be unique among the account's logo queries. By default, the new query also searches previously scanned images (see \`search_lookback\`). Creation fails when the account has reached its Brand Protection query limit, which counts domain and logo queries together.`).option(`image-data`,{type:`string`,description:"Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string. Supported formats: PNG, JPEG, GIF, WebP, BMP, and SVG. ICO is also accepted when the data includes a `data:image/x-icon;base64,` prefix."}).option(`search-lookback`,{type:`boolean`,description:"If true, also search previously scanned images for matches above the similarity threshold. Defaults to `true`.",default:!0}).option(`similarity-threshold`,{type:`number`,description:`Minimum similarity score (0-1) required for visual matches`}).option(`tag`,{type:`string`,description:`Name of the logo query. Must be unique among the account's logo queries.`}).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 S={command:`create`,describe:`Create logo query`,builder:x,handler:async e=>c({command:`brand-protection logos create`,classification:{safeFlags:[`search-lookback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({image_data:f(e[`image-data`],`image-data`,`text`),search_lookback:e[`search-lookback`],similarity_threshold:e[`similarity-threshold`],tag:f(e.tag,`tag`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(b,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}if(e[`image-data`]===void 0&&(e[`image-data`]=await p(`image-data`,"Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string. Supported formats: PNG, JPEG, GIF, WebP, BMP, and SVG. ICO is also accepted when the data includes a `data:image/x-icon;base64,` prefix.")),e[`similarity-threshold`]===void 0)throw Error(`--similarity-threshold is required (or pass --body with this field set).`);e.tag===void 0&&(e.tag=await p(`tag`,`Name of the logo query. Must be unique among the account's logo queries.`));let h=d({image_data:f(e[`image-data`],`image-data`,`text`),search_lookback:e[`search-lookback`],similarity_threshold:e[`similarity-threshold`],tag:f(e.tag,`tag`,`text`)}),g=await s(`Creating`,async()=>l.send(b,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries/${t.query_id}`};function w(e){return e.usage(`$0 brand-protection logos delete <query-id>
|
|
7
|
-
|
|
8
|
-
Permanently deletes a saved logo query and all of its matches. If the query does not exist in this account, the request fails with error code 404.`).positional(`query-id`,{type:`string`,description:`ID of the logo query.`,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 T={command:`delete <query-id>`,describe:`Delete logo query`,builder:w,handler:async e=>c({command:`brand-protection logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(C,{account_id:l,query_id:e[`query-id`]}));a(u,{successLabel:`Deleted`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries`,query:[`id`,`download`]};function D(e){return e.usage("$0 brand-protection logos get\n\nLists the account's saved logo queries. Set `id` to return a single query object instead of an array. Set `download=true` to include each logo image as base64 data.").option(`id`,{type:`string`,description:"ID of a logo query. When set, `result` is that single query object instead of an array."}).option(`download`,{type:`string`,description:"Set to `true` to include each logo image as base64 data in `image_data`, with its MIME type in `content_type`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`List logo queries`,builder:D,handler:async e=>c({command:`brand-protection logos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,download:e.download};if(e.dryRun){let e=await r();o({command:`cf brand-protection logos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(E,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},k={command:`logos`,describe:`Operations for logos`,builder:e=>e.command(S).command(T).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`,body:`json`};function j(e){return e.usage("$0 brand-protection matches bulk-dismiss\n\nDismisses or undismisses up to 100 domain matches in one request and returns a result for each item. Send `matches` as (`query_id`, `domain_id`) pairs to change each match for one query. The legacy `match_ids` format is still accepted, but it changes each match for every query that shares it; prefer `matches`.").option(`action`,{type:`string`,description:"`dismiss` to dismiss the matches, or `undismiss` to restore them.",choices:[`dismiss`,`undismiss`]}).coerce(`action`,e=>f(e,`action`,`text`)).option(`match-ids`,{type:`string`,array:!0,description:"Legacy format; prefer `matches`. Match IDs to update. Each ID changes the match for every query that shares it, not just one query. 1 to 100 items; duplicate IDs are rejected."}).option(`matches`,{type:`string`,description:"Matches to update, as (`query_id`, `domain_id`) pairs. Each pair changes the match for that query only. 1 to 100 items; duplicate pairs are rejected. Send only one format. If both are supplied, `match_ids` takes precedence and `matches` is ignored. Provide as a JSON array of objects or @path/to/file.json."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`bulk-dismiss`,describe:`Bulk dismiss or undismiss matches`,builder:j,handler:async e=>c({command:`brand-protection matches bulk-dismiss`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection matches bulk-dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({action:e.action,match_ids:e[`match-ids`],matches:l(e.matches,`matches`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>f.send(A,{body:e,account_id:p}));a(t,{successLabel:`Created`});return}e.action===void 0&&(e.action=await m(`action`,"`dismiss` to dismiss the matches, or `undismiss` to restore them.",[`dismiss`,`undismiss`]));let h=d({action:e.action,match_ids:e[`match-ids`],matches:l(e.matches,`matches`)}),g=await s(`Creating`,async()=>f.send(A,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/matches`,query:[`offset`,`limit`,`query_id`,`include_domain_id`,`include_dismissed`,`domain_search`,`orderBy`,`order`]};function P(e){return e.usage("$0 brand-protection matches get\n\nLists domains that matched one or more saved domain queries, most recently matched first by default. When you pass several comma-separated `query_id` values, matches are deduplicated by domain and each match includes a `match_details` array with per-query dismissed state. Set `include_domain_id=true` to get the `domain_id` needed to dismiss or undismiss a match.").option(`offset`,{type:`string`,description:`Number of matches to skip, for pagination. Defaults to 0.`}).option(`limit`,{type:`string`,description:`Maximum number of matches to return. Defaults to 50.`}).option(`query-id`,{type:`string`,array:!0,description:"ID of a domain query, or a comma-separated list of domain query IDs. When you pass several IDs, matches are deduplicated by domain and each match includes a `match_details` array with per-query metadata and dismissed state.",demandOption:!0}).option(`include-domain-id`,{type:`string`,description:"Set to `true` to include `domain_id` on each match. Required to dismiss or undismiss a match. Defaults to `false`."}).option(`include-dismissed`,{type:`string`,description:"Set to `false` to exclude dismissed matches. Dismissed matches are included when this is omitted or `true`."}).option(`domain-search`,{type:`string`,description:`Return only matches whose domain contains this text (case-insensitive).`}).option(`order-by`,{type:`string`,description:"Field to sort by: `domain`, `first_seen`, or `registrar`. Defaults to `first_seen`.",choices:[`domain`,`first_seen`,`registrar`]}).option(`order`,{type:`string`,description:"Sort direction: `asc` or `desc`. Defaults to `desc`. For single-query requests, `asc` applies only when `orderBy` is set.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get`,describe:`List domain matches`,builder:P,handler:async e=>c({command:`brand-protection matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],include_domain_id:e[`include-domain-id`],include_dismissed:e[`include-dismissed`],domain_search:e[`domain-search`],orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(N,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},I={command:`matches`,describe:`Operations for matches`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/queries/${t.query_id}/matches/${t.domain_id}/dismiss`};function R(e){return e.usage("$0 brand-protection queries dismiss <domain-id>\n\nMarks a matched domain as dismissed for one domain query. Dismissals are per query: dismissing a domain in one query does not affect other queries. Get `domain_id` from List domain matches with `include_domain_id=true`. Dismissing an already dismissed match succeeds. If the query or match does not exist, the request fails with error code 404.").positional(`domain-id`,{type:`string`,description:"ID of the matched domain, as returned in `domain_id` by List domain matches with `include_domain_id=true`.",demandOption:!0}).option(`query-id`,{type:`string`,description:`ID of the domain query that the match belongs to.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`dismiss <domain-id>`,describe:`Dismiss a domain match`,builder:R,handler:async e=>c({command:`brand-protection queries dismiss`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection queries dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}/matches/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}/dismiss`,pathParams:{"query-id":String(e[`query-id`]??``),"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(L,{account_id:l,query_id:e[`query-id`],domain_id:e[`domain-id`]}));a(u,{successLabel:`Created`})})};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/queries`,query:[`id`,`page`,`per_page`]};function B(e){return e.usage("$0 brand-protection queries get\n\nLists the account's saved domain queries, most recently updated first. Set `id` to return a single query object instead of an array. Set `page` or `per_page` to paginate the list; the response then includes `result_info`. Without them, every query is returned.").option(`id`,{type:`string`,description:"ID of a domain query. When set, `result` is that single query object instead of an array, and `page` and `per_page` are ignored."}).option(`page`,{type:`number`,description:`Page number for paginated list requests. Defaults to 1 when only per_page is supplied. Omit page and per_page to return every query.`}).option(`per-page`,{type:`number`,description:`Number of queries per page for paginated list requests. Defaults to 100 when only page is supplied. Maximum 100. Omit page and per_page to return every query.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get`,describe:`List domain queries`,builder:B,handler:async e=>c({command:`brand-protection queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf brand-protection queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/queries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(z,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/queries/${t.query_id}/matches/${t.domain_id}/undismiss`};function U(e){return e.usage("$0 brand-protection queries undismiss <domain-id>\n\nRemoves the dismissed status from a matched domain for one domain query. Undismissing a domain in one query does not affect other queries. Get `domain_id` from List domain matches with `include_domain_id=true`. Undismissing a match that is not dismissed succeeds. If the query or match does not exist, the request fails with error code 404.").positional(`domain-id`,{type:`string`,description:"ID of the matched domain, as returned in `domain_id` by List domain matches with `include_domain_id=true`.",demandOption:!0}).option(`query-id`,{type:`string`,description:`ID of the domain query that the match belongs to.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`undismiss <domain-id>`,describe:`Undismiss a domain match`,builder:U,handler:async e=>c({command:`brand-protection queries undismiss`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection queries undismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}/matches/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}/undismiss`,pathParams:{"query-id":String(e[`query-id`]??``),"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(H,{account_id:l,query_id:e[`query-id`],domain_id:e[`domain-id`]}));a(u,{successLabel:`Created`})})},G={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(ee).command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/search`,query:[`showHistoric`,`download`],body:`json`};function q(e){return e.usage(`$0 brand-protection submit
|
|
9
|
-
|
|
10
|
-
Submit an image and find the n closest matches from the scanned images index without creating any match records. Returns similarity scores and metadata for each match.`).option(`show-historic`,{type:`string`,description:`Include scanned images without domain metadata (historic data). Default: false (only show images with domain)`}).option(`download`,{type:`string`,description:`If true, include base64-encoded image data in the response`}).option(`image-data`,{type:`string`,description:`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`}).option(`score-threshold`,{type:`number`,description:`Minimum similarity score threshold for matches (0-1, default: 0)`,default:0}).option(`top-k`,{type:`number`,description:`Number of closest matches to return. Defaults to 10. Accepts 1 to 100, but values above 50 are treated as 50.`,default:10}).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:`submit`,describe:`Search scanned images`,builder:q,handler:async e=>c({command:`brand-protection submit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={showHistoric:e[`show-historic`],download:e.download};if(e.dryRun){let t=await r();o({command:`cf brand-protection submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/search`,pathParams:{},query:c,bodyKind:`json`,body:e.body===void 0?d({image_data:f(e[`image-data`],`image-data`,`text`),score_threshold:e[`score-threshold`],top_k:e[`top-k`]}):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),m=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let e=l;new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await s(`Creating`,async()=>m.send(K,{body:e,account_id:h,...c}));a(t,{successLabel:`Created`});return}e[`image-data`]===void 0&&(e[`image-data`]=await p(`image-data`,`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`));let g=d({image_data:f(e[`image-data`],`image-data`,`text`),score_threshold:e[`score-threshold`],top_k:e[`top-k`]});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await s(`Creating`,async()=>m.send(K,{body:g,account_id:h,...c}));a(_,{successLabel:`Created`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/trial`,body:`json`,errors:{403:`ForbiddenError`,502:`BadGatewayError`,503:`ServiceUnavailableError`}};function X(e){return e.usage(`$0 brand-protection trial create
|
|
11
|
-
|
|
12
|
-
Uses AI to scan all domains in the lookback table and identify potential phishing or impersonation attempts against the given brand string.`).option(`brand`,{type:`string`,description:`The brand field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Analyze domains for brand impersonation`,builder:X,handler:async e=>c({command:`brand-protection trial create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection trial create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/trial`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({brand:f(e.brand,`brand`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(Y,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}e.brand===void 0&&(e.brand=await p(`brand`,`The brand field`));let h=d({brand:f(e.brand,`brand`,`text`)}),g=await s(`Creating`,async()=>l.send(Y,{body:h,account_id:m}));a(g,{successLabel:`Created`})})},Q={command:`trial`,describe:`Operations for trial`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/total-queries`};function te(e){return e.usage(`$0 brand-protection url-info
|
|
13
|
-
|
|
14
|
-
Returns the number of saved domain and logo queries in the account. This is the count checked against the account's Brand Protection query limit.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`url-info`,describe:`Get total query count`,builder:te,handler:async e=>c({command:`brand-protection url-info`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf brand-protection url-info`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/total-queries`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send($,{account_id:l}));a(u,{successLabel:`Loaded`})})},re={command:`brand-protection`,describe:`brand-protection`,builder:e=>e.command(J).command(ne).command(y).command(k).command(I).command(G).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{re as default};
|