cf 1.0.0-beta.26 → 1.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +7373 -4926
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +11614 -4465
- package/dist/abuse-reports-D9edOyag.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
- package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/ai-search-BxyhS3X7.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/analytics-C6bfqm-W.mjs +17 -0
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/body-unions-DNs981Ia.mjs +2 -0
- package/dist/bot-management-CXHXgrQC.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
- package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
- package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
- package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/custom-nameservers-CapMDyly.mjs +12 -0
- package/dist/custom-pages-BVIniWfq.mjs +38 -0
- package/dist/d1-nJCOJZb8.mjs +50 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/email-domains-uL22-zRY.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
- package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/iam-LlGEzRCq.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
- package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/logpush-C5Gw7F_9.mjs +68 -0
- package/dist/logs-y3REfHbb.mjs +51 -0
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
- package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/o11y-ySxrnP1Z.mjs +88 -0
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/observability-C-KNh__y.mjs +4 -0
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/precursor-Dx8lN4UJ.mjs +4 -0
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
- package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/realtime-DMKHLYF4.mjs +170 -0
- package/dist/registrar-D23gfKBi.mjs +43 -0
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/rulesets-DmqwixUC.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-BZ6Fj3jQ.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/schema-flags-CXm9iIv6.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/security-insights-DMm0qg_m.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
- package/dist/{vectorize-D5qiggZU.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/workers-vpc-D8lefWDo.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
- package/dist/zaraz-BBKki5WS.mjs +22 -0
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
- package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +16 -16
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/analytics-CQ-Yt1mm.mjs +0 -17
- package/dist/analytics-engine-CdrY5-95.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-BiefH8wc.mjs +0 -14
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/auth-D5Yj9eYU.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/brand-protection-Byoa1hvj.mjs +0 -26
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/build-Dwd1_7o0.mjs +0 -2
- package/dist/cache-0xCdyNg9.mjs +0 -36
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/kv-CTyuvcAz.mjs +0 -12
- package/dist/load-balancers-DMTsh-9q.mjs +0 -72
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/logs-BSyyNwso.mjs +0 -35
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
- package/dist/o11y-DeNxXxcp.mjs +0 -86
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/organizations-p8Mgo8A7.mjs +0 -4
- package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/previews-B1mqjXaJ.mjs +0 -6
- package/dist/realtime-DWjdrDzv.mjs +0 -168
- package/dist/registrar-uYOU1U27.mjs +0 -43
- package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
- package/dist/zaraz-C8__FhOh.mjs +0 -22
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
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{n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
|
|
3
3
|
|
|
4
|
-
Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>c({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({token:d(e.token,`token`,`text`)}):l(e.body),sensitiveBodyPaths:[[`token`]]});return}let c=await n(e),
|
|
4
|
+
Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>c({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({token:d(e.token,`token`,`text`)}):l(e.body),sensitiveBodyPaths:[[`token`]]});return}let c=e.body===void 0?void 0:l(e.body),p=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>p.send(m,{body:t,account_id:h,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}e.token===void 0&&(e.token=await f(`token`,`Provides the Cloudflare API token for accessing R2.`,{kind:`secret`}));let g=u({token:d(e.token,`token`,`text`)}),_=await s(`Creating`,async()=>p.send(m,{body:g,account_id:h,bucket_name:e[`bucket-name`]}));a(_,{successLabel:`Created`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential/status`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
|
|
5
5
|
|
|
6
|
-
Check whether the configured catalog credentials are valid, invalid, or absent by probing authentication against the catalog.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
6
|
+
Check whether the configured catalog credentials are valid, invalid, or absent by probing authentication against the catalog.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`status <bucket-name>`,describe:`Get Basin Catalog credential status`,builder:v,handler:async e=>c({command:`basin-catalog credentials status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential/status`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})},ee={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/delete`,query:[`force`],response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 basin-catalog delete <bucket-name>
|
|
7
7
|
|
|
8
|
-
Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <bucket-name>`,describe:`Delete Basin Catalog metadata`,builder:
|
|
8
|
+
Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <bucket-name>`,describe:`Delete Basin Catalog metadata`,builder:ne,handler:async e=>c({command:`basin-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={force:e.cascade};if(e.dryRun){let t=await r();o({command:`cf basin-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force,message:`This removes catalog metadata. R2 bucket objects are retained.`}))return;let d=await s(`Processing`,async()=>l.send(te,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Done`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/disable`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 basin-catalog disable <bucket-name>
|
|
9
9
|
|
|
10
|
-
Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>c({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let u=await s(`
|
|
10
|
+
Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>c({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let u=await s(`Processing`,async()=>c.send(x,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Done`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/enable`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 basin-catalog enable <bucket-name>
|
|
11
11
|
|
|
12
|
-
Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "})
|
|
12
|
+
Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "})}const E={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:T,handler:async e=>c({command:`basin-catalog enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`credential`,`token`]]});return}let c=e.body===void 0?void 0:l(e.body),f=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()=>f.send(w,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let m=u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}),h=await s(`Creating`,async()=>f.send(w,{body:m,account_id:p,bucket_name:e[`bucket-name`]}));a(h,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 basin-catalog get <bucket-name>
|
|
13
13
|
|
|
14
14
|
Retrieve detailed information about a specific Basin Catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <bucket-name>`,describe:`Get Basin Catalog details`,builder:O,handler:async e=>c({command:`basin-catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 basin-catalog list
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs f
|
|
|
17
17
|
|
|
18
18
|
Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <bucket-name>`,describe:`Get catalog maintenance configuration`,builder:P,handler:async e=>c({command:`basin-catalog maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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(N,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function L(e){return e.usage(`$0 basin-catalog maintenance-configs update <bucket-name>
|
|
19
19
|
|
|
20
|
-
Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const R={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:L,handler:async e=>c({command:`basin-catalog maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=await n(e),
|
|
20
|
+
Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const R={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:L,handler:async e=>c({command:`basin-catalog maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=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()=>f.send(I,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let m=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),h=await s(`Creating`,async()=>f.send(I,{body:m,account_id:p,bucket_name:e[`bucket-name`]}));a(h,{successLabel:`Created`})})},z={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces`,query:[`page_token`,`page_size`,`parent`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function B(e){return e.usage(`$0 basin-catalog namespaces list
|
|
21
21
|
|
|
22
22
|
Returns a list of namespaces in the specified Basin Catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
|
|
23
23
|
Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of namespaces to return per page.
|
|
@@ -25,7 +25,7 @@ Defaults to 100, maximum 1000.`}).option(`parent`,{type:`string`,description:`Pa
|
|
|
25
25
|
For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").
|
|
26
26
|
Omit this parameter to list top-level namespaces.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include namespace UUIDs in the response.
|
|
27
27
|
Set to true to receive the namespace_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps).
|
|
28
|
-
When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List namespaces in catalog`,builder:B,handler:async e=>c({command:`basin-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let c={page_token:e[`page-token`],page_size:e[`page-size`],parent:e.parent,return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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(
|
|
28
|
+
When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List namespaces in catalog`,builder:B,handler:async e=>c({command:`basin-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let c={page_token:e[`page-token`],page_size:e[`page-size`],parent:e.parent,return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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(re,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function U(e){return e.usage("$0 basin-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
|
|
29
29
|
For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <table-name>`,describe:`Get table details`,builder:U,handler:async e=>c({command:`basin-catalog namespaces tables get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(H,{account_id:l,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(u,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables`,query:[`page_token`,`page_size`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function K(e){return e.usage(`$0 basin-catalog namespaces tables list
|
|
30
30
|
|
|
31
31
|
Returns a list of tables in the specified namespace within a Basin Catalog. Supports pagination for efficient traversal of large table collections.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
|
|
@@ -37,8 +37,8 @@ When true, response includes created_at, updated_at, metadata_locations, and loc
|
|
|
37
37
|
|
|
38
38
|
Retrieve the maintenance configuration for a specific table, including compaction settings.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <table-name>`,describe:`Get table maintenance configuration`,builder:Y,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(J,{account_id:l,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs/${t.configuration_type}/queue`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`}};function ie(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs queue <configuration-type>
|
|
39
39
|
|
|
40
|
-
Queue maintenance for normal polling. This request does not start a run.`).positional(`configuration-type`,{type:`string`,description:`Configuration type`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`request-id`,{type:`string`,description:`The request_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`queue <configuration-type>`,describe:`Queue table maintenance`,builder:ie,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs queue`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs queue`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs/${e[`configuration-type`]==null?`<configuration-type>`:encodeURIComponent(String(e[`configuration-type`]))}/queue`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``),"configuration-type":String(e[`configuration-type`]??``)},bodyKind:`json`,body:e.body===void 0?u({request_id:d(e[`request-id`],`request-id`,`text`)}):l(e.body)});return}let c=await n(e),
|
|
40
|
+
Queue maintenance for normal polling. This request does not start a run.`).positional(`configuration-type`,{type:`string`,description:`Configuration type`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`request-id`,{type:`string`,description:`The request_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`queue <configuration-type>`,describe:`Queue table maintenance`,builder:ie,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs queue`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs queue`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs/${e[`configuration-type`]==null?`<configuration-type>`:encodeURIComponent(String(e[`configuration-type`]))}/queue`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``),"configuration-type":String(e[`configuration-type`]??``)},bodyKind:`json`,body:e.body===void 0?u({request_id:d(e[`request-id`],`request-id`,`text`)}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=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()=>f.send(Z,{body:t,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],configuration_type:e[`configuration-type`]}));a(n,{successLabel:`Created`});return}let m=u({request_id:d(e[`request-id`],`request-id`,`text`)}),h=await s(`Creating`,async()=>f.send(Z,{body:m,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],configuration_type:e[`configuration-type`]}));a(h,{successLabel:`Created`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function oe(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs update <table-name>
|
|
41
41
|
|
|
42
|
-
Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const $={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:oe,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=await n(e),
|
|
42
|
+
Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const $={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:oe,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=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()=>f.send(Q,{body:t,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(n,{successLabel:`Created`});return}let m=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),h=await s(`Creating`,async()=>f.send(Q,{body:m,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(h,{successLabel:`Created`})})},se={command:`maintenance-configs`,describe:`Table-level maintenance configurations and operations`,builder:e=>e.command(X).command(ae).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-runs`,query:[`page_size`,`page_token`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function le(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-runs list
|
|
43
43
|
|
|
44
|
-
Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List table maintenance runs`,builder:le,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page_size:e[`page-size`],page_token:e[`page-token`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(ce,{account_id:u,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],...c}));a(d,{successLabel:`Loaded`})})},de={command:`maintenance-runs`,describe:`History of maintenance runs performed on tables`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`tables`,describe:`Tables within catalog namespaces`,builder:e=>e.command(W).command(q).command(se).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(V).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`basin-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(
|
|
44
|
+
Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List table maintenance runs`,builder:le,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page_size:e[`page-size`],page_token:e[`page-token`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(ce,{account_id:u,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],...c}));a(d,{successLabel:`Loaded`})})},de={command:`maintenance-runs`,describe:`History of maintenance runs performed on tables`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`tables`,describe:`Tables within catalog namespaces`,builder:e=>e.command(W).command(q).command(se).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(V).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`basin-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(ee).command(z).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{me as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
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{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as 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,s as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-CEpZ-lQZ.mjs";var v={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function y(e){return e.usage(`$0 billing addresses validate
|
|
3
|
+
|
|
4
|
+
Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).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:`validate`,describe:`Validate Billing Address`,builder:y,handler:async e=>l({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),city:m(e.city,`city`,`text`),country:m(e.country,`country`,`text`),state:m(e.state,`state`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),n=await r(e);if(e.body!==void 0){let e=t,r=await c(`Validating`,async()=>n.send(v,{body:e}));o(r,{successLabel:`Validated`});return}let i=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),city:m(e.city,`city`,`text`),country:m(e.country,`country`,`text`),state:m(e.state,`state`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),a=await c(`Validating`,async()=>n.send(v,{body:i}));o(a,{successLabel:`Validated`})})},ee={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile/payment-method`};function S(e){return e.usage(`$0 billing profiles create-payment-intent
|
|
5
|
+
|
|
6
|
+
Creates a Stripe payment intent for adding or updating a payment method on the account's billing profile. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`create-payment-intent`,describe:`Create Payment Intent for Billing Profile`,builder:S,handler:async e=>l({command:`billing profiles create-payment-intent`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles create-payment-intent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile/payment-method`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(x,{account_id:l}));o(u,{successLabel:`Created`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function te(e){return e.usage(`$0 billing profiles create
|
|
7
|
+
|
|
8
|
+
Creates a billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const ne={command:`create`,describe:`Create Billing Profile`,builder:te,handler:async e=>l({command:`billing profiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(w,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}let f=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),h=await c(`Creating`,async()=>l.send(w,{body:f,account_id:u}));o(h,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/billing/profile`,response:!1};function E(e){return e.usage(`$0 billing profiles delete
|
|
9
|
+
|
|
10
|
+
Deletes the billing profile for an 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 D={command:`delete`,describe:`Delete Billing Profile`,builder:E,handler:async e=>l({command:`billing profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(T,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/profile`};function k(e){return e.usage(`$0 billing profiles get
|
|
11
|
+
|
|
12
|
+
Gets the current billing profile for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get`,describe:`Get Billing Profile`,builder:k,handler:async e=>l({command:`billing profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(O,{account_id:l}));o(u,{successLabel:`Loaded`})})};var j={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function M(e){return e.usage(`$0 billing profiles update-email
|
|
13
|
+
|
|
14
|
+
Updates the billing email addresses and preferred locale for an account.`).option(`billing-email`,{type:`string`,description:`The billing_email field`}).option(`preferred-locale`,{type:`string`,description:`The preferred_locale field`}).option(`secondary-billing-email`,{type:`string`,description:`The secondary_billing_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update-email`,describe:`Update Billing Email`,builder:M,handler:async e=>l({command:`billing profiles update-email`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles update-email`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({billing_email:m(e[`billing-email`],`billing-email`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(j,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}let f=p({billing_email:m(e[`billing-email`],`billing-email`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}),h=await c(`Updating`,async()=>l.send(j,{body:f,account_id:u}));o(h,{successLabel:`Updated`})})};var P={method:`PUT`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function F(e){return e.usage(`$0 billing profiles update
|
|
15
|
+
|
|
16
|
+
Updates the billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const I={command:`update`,describe:`Update Billing Profile`,builder:F,handler:async e=>l({command:`billing profiles update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(P,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}let f=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),h=await c(`Updating`,async()=>l.send(P,{body:f,account_id:u}));o(h,{successLabel:`Updated`})})},L={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(ne).command(C).command(D).command(A).command(I).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`GET`,path:t=>e`/billing/rate_plans/${t.public_key}`};function z(e){return e.usage(`$0 billing rate-plans get <public-key>
|
|
17
|
+
|
|
18
|
+
Gets a rate plan's details by its public key (e.g., 'teams_free', 'cf_pro_20_20'). This is a public catalog endpoint, so authentication is not enforced and credentials are accepted but not required.`).positional(`public-key`,{type:`string`,description:`The public key identifier for the rate plan.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:z,handler:async e=>l({command:`billing rate-plans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf billing rate-plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/billing/rate_plans/${e[`public-key`]==null?`<public-key>`:encodeURIComponent(String(e[`public-key`]))}`,pathParams:{"public-key":String(e[`public-key`]??``)},bodyKind:`none`});return}let t=await r(e),n=await c(`Loading`,async()=>t.send(R,{public_key:e[`public-key`]}));o(n,{successLabel:`Loaded`})})},V={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/activity`,query:[`limit`,`period`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function U(e){return e.usage("$0 billing spend-policies activity list\n\nReturns configuration history from immutable policy revisions for the account, including deleted policies. Entries contain before/after values and verified actor attribution. Pages use descending revision IDs, not event or commit order; refresh the first page for new entries. This cursor is not an incremental consumer checkpoint. Defaults to `period=current_billing_cycle`: each revision's timestamp must be within its product's current subscription cycle (inclusive start, exclusive end). Each product's cycle is resolved independently from canonical aggregates, including for disabled or deleted policies. Set `period=all` for history across cycles. Filtering happens before pagination. No current cycles returns an empty page; unavailable or disabled cycle resolution returns `503` with code `1013`. Cursors pin resolved cycle bounds across pages and must be used with the same period selection. Cursors obtained before this filter was introduced must be refreshed.").option(`limit`,{type:`number`,description:`Maximum number of audit entries to return. Defaults to 50. Values above 100 are capped at 100 rather than rejected.`}).option(`period`,{type:`string`,description:`Select current subscription billing-cycle history or history across all cycles.`,choices:[`current_billing_cycle`,`all`]}).option(`cursor`,{type:`string`,description:`Opaque token from the preceding response's result_info.cursor. Pass it unchanged to retrieve older entries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Spend Policy Activity`,builder:U,handler:async e=>l({command:`billing spend-policies activity list`,classification:{safeFlags:[`period`,`dry-run`]}},e,async()=>{let n={limit:e.limit,period:e.period,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf billing spend-policies activity list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies/activity`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(H,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},G={command:`activity`,describe:`Operations for spend-policies.activity`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}/audit`,query:[`limit`,`period`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function q(e){return e.usage("$0 billing spend-policies audit list\n\nReturns the policy's evaluation history, newest first. At most one threshold-crossing entry (`limit_reached`) is recorded per policy version and billing period, so a policy update can record a new entry without any change in balance. Disabled policies still return their history; deleted policies return `404`. There is no pagination: use `limit` to set how many entries come back. Defaults to `period=current_billing_cycle`, resolved from the product's canonical aggregates, not calendar months. Crossings match their recorded billing-period bounds, even if recorded late. Set `period=all` for history across cycles. Filtering happens before LIMIT. No current cycle returns an empty array; unavailable or disabled cycle resolution returns `503` with code `1013`, never an empty success.").option(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of audit entries to return. Defaults to 50. Values above 100 are capped at 100 rather than rejected.`}).option(`period`,{type:`string`,description:`Select current subscription billing-cycle history or history across all cycles.`,choices:[`current_billing_cycle`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List Spend Policy Audit Entries`,builder:q,handler:async e=>l({command:`billing spend-policies audit list`,classification:{safeFlags:[`period`,`dry-run`]}},e,async()=>{let n={limit:e.limit,period:e.period};if(e.dryRun){let t=await i();s({command:`cf billing spend-policies audit list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/audit`,pathParams:{"policy-id":String(e[`policy-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(K,{account_id:u,policy_id:e[`policy-id`],...n}));o(d,{successLabel:`Loaded`})})},Y={command:`audit`,describe:`Operations for spend-policies.audit`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function Z(e){return e.usage("$0 billing spend-policies create\n\nCreates a spend policy. Each account can have only one enabled `usage_block` policy per product. A second one returns `409`. There is no limit on `notification` policies.").option(`action`,{type:`string`,description:"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",choices:[`notification`,`usage_block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`enabled`,{type:`boolean`,description:`Whether the policy is evaluated.`}).option(`name`,{type:`string`,description:`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`}).option(`notification-email`,{type:`string`,description:"Email address that receives notifications. Required when `action` is `notification`. When set, it must be a bare address (`user@example.com`); display-name forms such as `Name <user@example.com>` are rejected."}).option(`product-id`,{type:`string`,description:"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",choices:[`workers`,`durable_objects`]}).coerce(`product-id`,e=>m(e,`product-id`,`text`)).option(`threshold-cents`,{type:`number`,description:`The spend threshold for the current billing period, in US cents. Must be greater than zero.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A spend policy as sent on create and on full replacement. Unknown fields and trailing JSON are rejected. Only the first 1 MiB of the body is read.`})}const re={command:`create`,describe:`Create Spend Policy`,builder:Z,handler:async e=>l({command:`billing spend-policies create`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing spend-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(X,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`action`,"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",[`notification`,`usage_block`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`)),e[`product-id`]===void 0&&(e[`product-id`]=await g(`product-id`,"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",[`workers`,`durable_objects`])),e[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let f=p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}),_=await c(`Creating`,async()=>l.send(X,{body:f,account_id:u}));o(_,{successLabel:`Created`})})};function ie(e){return e.usage("$0 billing spend-policies delete <policy-id>\n\nSoft-deletes the spend policy. The policy is disabled and no longer appears in list, get or audit responses. The `If-Match` header must equal the policy's current `version`.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`if-match`,{type:`string`,description:'The policy `version` the change is based on, as returned in `ETag`. Quoted (`"3"`) and bare (`3`) values are both accepted. Weak ETags (`W/"3"`) and `*` are not.',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 ae={command:`delete <policy-id>`,describe:`Delete Spend Policy`,builder:ie,handler:async e=>l({command:`billing spend-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`if-match`]!==void 0&&(l[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=await i();s({command:`cf billing spend-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await _({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function se(e){return e.usage("$0 billing spend-policies get <policy-id>\n\nReturns one spend policy. The `ETag` response header holds the current `version`; send it as `If-Match` on a later update or delete.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <policy-id>`,describe:`Get Spend Policy`,builder:se,handler:async e=>l({command:`billing spend-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing spend-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(oe,{account_id:l,policy_id:e[`policy-id`]}));o(u,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function ue(e){return e.usage("$0 billing spend-policies list\n\nReturns every spend policy on the account that has not been deleted, including disabled ones. Results are sorted by `name`, then `id`. There is no pagination.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List Spend Policies`,builder:ue,handler:async e=>l({command:`billing spend-policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing spend-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(le,{account_id:l}));o(u,{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 billing spend-policies update <policy-id>\n\nReplaces the whole spend policy. Every field is required, as on create; there are no partial updates and `PATCH` is not supported. The `If-Match` header must equal the policy's current `version`. On success, `version` goes up by one and the new value is returned in `ETag`.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`if-match`,{type:`string`,description:'The policy `version` the change is based on, as returned in `ETag`. Quoted (`"3"`) and bare (`3`) values are both accepted. Weak ETags (`W/"3"`) and `*` are not.',demandOption:!0}).option(`action`,{type:`string`,description:"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",choices:[`notification`,`usage_block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`enabled`,{type:`boolean`,description:`Whether the policy is evaluated.`}).option(`name`,{type:`string`,description:`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`}).option(`notification-email`,{type:`string`,description:"Email address that receives notifications. Required when `action` is `notification`. When set, it must be a bare address (`user@example.com`); display-name forms such as `Name <user@example.com>` are rejected."}).option(`product-id`,{type:`string`,description:"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",choices:[`workers`,`durable_objects`]}).coerce(`product-id`,e=>m(e,`product-id`,`text`)).option(`threshold-cents`,{type:`number`,description:`The spend threshold for the current billing period, in US cents. Must be greater than zero.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A spend policy as sent on create and on full replacement. Unknown fields and trailing JSON are rejected. Only the first 1 MiB of the body is read.`})}const pe={command:`update <policy-id>`,describe:`Update Spend Policy`,builder:fe,handler:async e=>l({command:`billing spend-policies update`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{let l={};if(e[`if-match`]!==void 0&&(l[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=await i();s({command:`cf billing spend-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-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?p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),_=await r(e),v=e.local?t:await a();if(e.accountId=v,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(_,`PUT`,`/accounts/${v}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.action===void 0&&(e.action=await g(`action`,"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",[`notification`,`usage_block`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`)),e[`product-id`]===void 0&&(e[`product-id`]=await g(`product-id`,"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",[`workers`,`durable_objects`])),e[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let y={};e.action!==void 0&&f(y,[`action`],e.action),e.enabled!==void 0&&f(y,[`enabled`],e.enabled),e.name!==void 0&&f(y,[`name`],m(e.name,`name`,`text`)),e[`notification-email`]!==void 0&&f(y,[`notification_email`],m(e[`notification-email`],`notification-email`,`text`)),e[`product-id`]!==void 0&&f(y,[`product_id`],e[`product-id`]),e[`threshold-cents`]!==void 0&&f(y,[`threshold_cents`],e[`threshold-cents`]);let b=await c(`Updating`,async()=>n(_,`PUT`,`/accounts/${v}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:y,headers:Object.keys(l).length>0?l:void 0}));o(b,{successLabel:`Updated`})})},me={command:`spend-policies`,describe:`Operations for spend-policies`,builder:e=>e.command(re).command(ae).command(ce).command(de).command(pe).command(G).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage/billable-metrics`,query:[`from`,`to`]};function ge(e){return e.usage("$0 billing usage get-account-billable-metrics\n\nLists billable metrics available to the account through contracts and subscriptions that overlap the requested period. Results are deduplicated and ordered. If no qualifying contract exists, the result is an empty array. When `from` and `to` are omitted, the period defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get-account-billable-metrics`,describe:`List Account Billable Metrics (Version 2, Alpha, Restricted)`,builder:ge,handler:async e=>l({command:`billing usage get-account-billable-metrics`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-account-billable-metrics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage/billable-metrics`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(he,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage`,query:[`from`,`to`]};function ye(e){return e.usage("$0 billing usage get-account-usage-v2\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. To retrieve rated costs, use `POST` on the same path with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get-account-usage-v2`,describe:`Get Account Usage (Version 2, Alpha, Restricted)`,builder:ye,handler:async e=>l({command:`billing usage get-account-usage-v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-account-usage-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ve,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage/info`};function Q(e){return e.usage(`$0 billing usage get-info-v1
|
|
19
|
+
|
|
20
|
+
Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-info-v1`,describe:`Get Account Billable Usage Info (Version 1, Alpha)`,builder:Q,handler:async e=>l({command:`billing usage get-info-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing usage get-info-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage/info`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(xe,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage`,query:[`from`,`to`]};function we(e){return e.usage(`$0 billing usage get-v1
|
|
21
|
+
|
|
22
|
+
Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-v1`,describe:`Get Account Billable Usage (Version 1, Alpha)`,builder:we,handler:async e=>l({command:`billing usage get-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ce,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/billable/usage`,body:`json`};function Ee(e){return e.usage("$0 billing usage query\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. This is the filterable counterpart to `GET` on the same path. It is a read-only operation and requires only the `#billing:read` permission; `POST` is used so that filter criteria can be supplied in a request body rather than in the query string. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** Cost and pricing fields are populated only when `Metric` is `cost`; otherwise they are absent from responses. The request body is optional. When it is omitted, or when `TimePeriod` is omitted, the range defaults to the start of the current month through today. The maximum date range is 31 days. Filters of different kinds are combined with AND. Values within one tag filter are combined with OR. Filter values that do not match usage produce an empty result set. Results can be grouped by up to two groups, in any combination of dimension keys and resource-tag keys. Tag groups are returned in the `Tags` field. Usage without a requested tag remains in an untagged group, with that key omitted from `Tags`. Requests that use tag filtering or tag grouping return HTTP 400 when the underlying usage data source does not support tags. Requests that use dimension grouping return HTTP 400 when the underlying usage data source does not support dimensions.").option(`filter-by-billable-metric-ids`,{type:`string`,array:!0,description:"Restrict results to rows whose `x_BillableMetricId` matches one of these billable metric ids (e.g. `workers_standard_requests`). Values must be unique."}).option(`filter-by-product-family-ids`,{type:`string`,array:!0,description:`Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs.`}).option(`filter-by-tags`,{type:`string`,description:`Restrict results by resource tags. Filters for different keys are combined with AND, while values within one filter are combined with OR. Keys must be unique and are case-sensitive. Provide as a JSON array of objects or @path/to/file.json.`}).option(`group-by`,{type:`string`,description:`Grouping definitions used to split result rows. At most two unique keys may be supplied. Provide as a JSON array of objects or @path/to/file.json.`}).option(`metric`,{type:`string`,description:"Type of cost/usage records to retrieve. `usage` returns unrated usage quantities. `cost` returns rated usage with cost and pricing fields; it is available only on `POST` account usage and only when the underlying usage data source is ClickHouse (other sources return an empty result set). Requests that combine `cost` with `GroupBy` or `FilterBy.Tags` return HTTP 400. Unrelated to `FilterBy.BillableMetricIds`. Defaults to `usage` when omitted.",choices:[`usage`,`cost`],default:`usage`}).coerce(`metric`,e=>m(e,`metric`,`text`)).option(`time-period-from`,{type:`string`,description:"Start of the range (ISO 8601). Required if `To` is set."}).option(`time-period-to`,{type:`string`,description:"End of the range (ISO 8601). Required if `From` is set. Must be after `From` and no more than 31 days after it."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter criteria for a usage query. Every field is optional; an empty object is equivalent to omitting the body entirely. Unknown fields are rejected.`})}const De={command:`query`,describe:`Query Account Usage (Version 2, Alpha, Restricted)`,builder:Ee,handler:async e=>l({command:`billing usage query`,classification:{safeFlags:[`metric`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing usage query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billable/usage`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:u(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:u(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:m(e[`time-period-from`],`time-period-from`,`text`),To:m(e[`time-period-to`],`time-period-to`,`text`)}}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let e=n,t=await c(`Loading`,async()=>l.send($,{body:e,account_id:f}));o(t,{successLabel:`Loaded`});return}let h=p({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:u(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:u(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:m(e[`time-period-from`],`time-period-from`,`text`),To:m(e[`time-period-to`],`time-period-to`,`text`)}}),g=await c(`Loading`,async()=>l.send($,{body:h,account_id:f}));o(g,{successLabel:`Loaded`})})},Oe={command:`usage`,describe:`Metered usage data for billed services — requests, bandwidth, and feature consumption`,builder:e=>e.command(_e).command(be).command(Se).command(Te).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ke={command:`billing`,describe:`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,builder:e=>e.command(ee).command(L).command(V).command(me).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ke as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-
|
|
2
|
+
import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-CcL6RoGw.mjs";import{stripVTControlCharacters as n}from"node:util";function r(n){return`${t.success(e.success)} ${n}`}function i(n){return`${t.warning(e.warning)} ${n}`}function a(n){return`${t.muted(e.arrow)} ${t.muted(n)}`}function o(e,r){let a=process.env.CF_DELEGATION?` ${t.muted(`·`)} ${t.muted(`local version`)}`:``,o=r?` ${t.muted(`·`)} ${t.warning(`update available: v${r.latestVersion}`)}`:``,s=`🍊☁️ ${t.brand(t.bold(`cf`))} ${t.muted(`·`)} ${t.muted(`v${e}`)}${a}${o}`,c=n(s).length,l=`─`.repeat(c);return`${s}\n${t.brand(l)}${r?.isMajor?`\n${i(`A new major version of cf is available. Updating is recommended.`)}`:``}`}const s={bar:`│`,top:`┌`,bottom:`└`};function c(e,n,r){let i=r?.title??`Error`,a=t.error(s.bar),o=t.error(s.top),c=t.error(s.bottom),u=Math.max(20,(process.stderr.columns||80)-2),d=[];if(d.push(``),d.push(`${o} ${t.error(t.bold(i))}`),r?.rawMessage)for(let t of e.split(`
|
|
3
3
|
`))d.push(t.length>0?`${a} ${t}`:a);else for(let n of l(e,u))d.push(n.length>0?`${a} ${t.error(t.bold(n))}`:a);if(n){d.push(a);for(let e of l(n,u))d.push(e.length>0?`${a} ${t.muted(e)}`:a)}return d.push(c),d.join(`
|
|
4
4
|
`)}function l(e,t){let n=[];for(let r of e.split(`
|
|
5
5
|
`)){if(r.length<=t){n.push(r);continue}let e=r.split(/\s+/),i=``;for(let r of e)i?i.length+1+r.length<=t?i+=` `+r:(n.push(i),i=r):i=r;i&&n.push(i)}return n}export{r as a,a as i,l as n,i as o,o as r,c as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{d as e}from"./schema-flags-CXm9iIv6.mjs";function t(t,n){for(let r of n){let n=t;for(let e of r.path)n=typeof n==`object`&&n&&Object.hasOwn(n,e)?n[e]:void 0;if(n===void 0)continue;let i;if(`schema`in r)i=r.schema;else{let e=typeof n==`object`&&n?n[r.selector]:void 0;i=r.variants.find(t=>t.values.some(t=>t===e))?.schema??{oneOf:r.variants.map(e=>e.schema)}}let a=e(i,n);if(a.length>0)throw Error(`Invalid ${r.path.join(`.`)||`request body`}: ${a.join(`; `)}. Pass --body with a complete request body if it cannot be supplied as flags.`)}return t}export{t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,r as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f}from"./prompt-CEpZ-lQZ.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`,body:`json`,response:!1};function m(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`requests-by-attribute`,{type:`string`,description:`Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. Provide as a JSON object or @path/to/file.json.`}).option(`requests-by-score`,{type:`string`,description:"Map of bot scores (1-99) to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`requests-by-score-src`,{type:`string`,description:"Map of score source to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Submit a feedback report`,builder:m,handler:async e=>o({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]):s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}])});return}let o=e.body===void 0?void 0:s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}]),m=await t(e),h=await n({zone:e.zone},m,{quiet:e.quiet});if(e.zoneId=h,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>m.send(p,{body:e,zone_id:h}));r(t,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await d(`description`,`The description field`)),e.expression===void 0&&(e.expression=await d(`expression`,`Wirefilter expression describing the traffic being reported.`)),e[`first-request-seen-at`]===void 0&&(e[`first-request-seen-at`]=await d(`first-request-seen-at`,`The first_request_seen_at field`)),e[`last-request-seen-at`]===void 0&&(e[`last-request-seen-at`]=await d(`last-request-seen-at`,`The last_request_seen_at field`)),e.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);if(e[`requests-by-attribute`]===void 0)throw Error(`--requests-by-attribute is required (or pass --body with this field set).`);if(e[`requests-by-score`]===void 0)throw Error(`--requests-by-score is required (or pass --body with this field set).`);if(e[`requests-by-score-src`]===void 0)throw Error(`--requests-by-score-src is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await f(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let g=l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]),_=await a(`Creating`,async()=>m.send(p,{body:g,zone_id:h}));r(_,{successLabel:`Created`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`};function _(e){return e.usage(`$0 bot-management feedback list
|
|
3
|
+
|
|
4
|
+
Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List zone feedback reports`,builder:_,handler:async e=>o({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(g,{zone_id:s}));r(c,{successLabel:`Loaded`})})},y={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(h).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management`};function x(e){return e.usage(`$0 bot-management get
|
|
5
|
+
|
|
6
|
+
Retrieve a zone's Bot Management Config`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get Zone Bot Management Config`,builder:x,handler:async e=>o({command:`bot-management get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(b,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var C={method:`PUT`,path:t=>e`/zones/${t.zone_id}/bot_management`,body:`json`};function w(e){return e.usage('$0 bot-management update\n\nUpdates the Bot Management configuration for a zone. This API is used to update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise** See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \\ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan. #### Clean up configuration for Bot Fight Mode plan ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "suppress_session_score": false } ``` #### Clean up configuration for SBFM Pro plan ```json { "sbfm_likely_automated": "allow", "fight_mode": false } ``` #### Clean up configuration for SBFM Biz plan ```json { "fight_mode": false } ``` #### Clean up configuration for BM Enterprise Subscription plan It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks. ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "fight_mode": false } ```').option(`ai-agents-anthropic-agent`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-anthropic-agent`,e=>u(e,`ai-agents-anthropic-agent`,`text`)).option(`ai-agents-google-agent`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-google-agent`,e=>u(e,`ai-agents-google-agent`,`text`)).option(`ai-agents-instinct`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-instinct`,e=>u(e,`ai-agents-instinct`,`text`)).option(`ai-agents-muse`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-muse`,e=>u(e,`ai-agents-muse`,`text`)).option(`ai-agents-openai-agent`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-openai-agent`,e=>u(e,`ai-agents-openai-agent`,`text`)).option(`ai-bots-migration-opt-out`,{type:`boolean`,description:`Temporary migration flag tracking zones opted out of AI bots managed-rule updates.`}).option(`ai-bots-protection`,{type:`string`,description:`Enable rule to block AI Scrapers and Crawlers.`,choices:[`block`,`disabled`,`only_on_ad_pages`]}).coerce(`ai-bots-protection`,e=>u(e,`ai-bots-protection`,`text`)).option(`ai-search`,{type:`string`,description:`Configure robots.txt policy for AI search bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-search`,e=>u(e,`ai-search`,`text`)).option(`ai-training`,{type:`string`,description:`Configure robots.txt policy for AI model training bots.`,choices:[`disabled`,`disallow`,`block`,`only_on_ad_pages`]}).coerce(`ai-training`,e=>u(e,`ai-training`,`text`)).option(`ai-user`,{type:`string`,description:`Configure robots.txt policy for AI assistant and agent bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-user`,e=>u(e,`ai-user`,`text`)).option(`bot-preference-sync-enabled`,{type:`boolean`,description:`Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone's AI Search, AI User, and AI Training preferences.`}).option(`cf-robots-variant`,{type:`string`,description:`Specifies the Robots Access Control License variant to use.`,choices:[`off`,`policy_only`]}).coerce(`cf-robots-variant`,e=>u(e,`cf-robots-variant`,`text`)).option(`content-bots-protection`,{type:`string`,description:`Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.`,choices:[`block`,`disabled`]}).coerce(`content-bots-protection`,e=>u(e,`content-bots-protection`,`text`)).option(`crawler-protection`,{type:`string`,description:`Enable rule to punish AI Scrapers and Crawlers via a link maze.`,choices:[`enabled`,`disabled`]}).coerce(`crawler-protection`,e=>u(e,`crawler-protection`,`text`)).option(`enable-js`,{type:`boolean`,description:`Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).`}).option(`is-robots-txt-managed`,{type:`boolean`,description:`Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.`}).option(`jsd-api-results-enabled`,{type:`boolean`,description:`Whether to use JavaScript Detection results submitted through the API for this zone.`}).option(`fight-mode`,{type:`boolean`,description:`Whether to enable Bot Fight Mode.`}).option(`stale-zone-configuration-optimize-wordpress`,{type:`boolean`,description:`Indicates that the zone's wordpress optimization for SBFM is turned on.`}).option(`stale-zone-configuration-sbfm-definitely-automated`,{type:`string`,description:`Indicates that the zone's definitely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-likely-automated`,{type:`string`,description:`Indicates that the zone's likely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-static-resource-protection`,{type:`string`,description:`Indicates that the zone's static resource protection is turned on.`}).option(`stale-zone-configuration-sbfm-verified-bots`,{type:`string`,description:`Indicates that the zone's verified bot requests are being blocked.`}).option(`stale-zone-configuration-suppress-session-score`,{type:`boolean`,description:`Indicates that the zone's session score tracking is disabled.`}).option(`stale-zone-configuration-fight-mode`,{type:`boolean`,description:`Indicates that the zone's Bot Fight Mode is turned on.`}).option(`optimize-wordpress`,{type:`boolean`,description:`Whether to optimize Super Bot Fight Mode protections for Wordpress.`}).option(`sbfm-definitely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on definitely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).coerce(`sbfm-definitely-automated`,e=>u(e,`sbfm-definitely-automated`,`text`)).option(`sbfm-static-resource-protection`,{type:`boolean`,description:`Super Bot Fight Mode (SBFM) to enable static resource protection.
|
|
7
|
+
Enable if static resources on your application need bot protection.
|
|
8
|
+
Note: Static resource protection can also result in legitimate traffic being blocked.
|
|
9
|
+
`}).option(`sbfm-verified-bots`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on verified bots requests.`,choices:[`allow`,`block`]}).coerce(`sbfm-verified-bots`,e=>u(e,`sbfm-verified-bots`,`text`)).option(`sbfm-likely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on likely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).coerce(`sbfm-likely-automated`,e=>u(e,`sbfm-likely-automated`,`text`)).option(`auto-update-model`,{type:`boolean`,description:`Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)`}).option(`bm-cookie-enabled`,{type:`boolean`,description:`Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true`}).option(`suppress-session-score`,{type:`boolean`,description:`Whether to disable tracking the highest bot score for a session in the Bot Management cookie.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`update`,describe:`Update Zone Bot Management Config`,builder:w,handler:async e=>o({command:`bot-management update`,classification:{safeFlags:/* @__PURE__ */ `ai-agents-anthropic-agent.ai-agents-google-agent.ai-agents-instinct.ai-agents-muse.ai-agents-openai-agent.ai-bots-migration-opt-out.ai-bots-protection.ai-search.ai-training.ai-user.bot-preference-sync-enabled.cf-robots-variant.content-bots-protection.crawler-protection.enable-js.is-robots-txt-managed.jsd-api-results-enabled.fight-mode.stale-zone-configuration-optimize-wordpress.stale-zone-configuration-suppress-session-score.stale-zone-configuration-fight-mode.optimize-wordpress.sbfm-definitely-automated.sbfm-static-resource-protection.sbfm-verified-bots.sbfm-likely-automated.auto-update-model.bm-cookie-enabled.suppress-session-score.dry-run`.split(`.`)}},e,async()=>{if(e.dryRun){i({command:`cf bot-management update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({ai_agents:{anthropic_agent:e[`ai-agents-anthropic-agent`],google_agent:e[`ai-agents-google-agent`],instinct:e[`ai-agents-instinct`],muse:e[`ai-agents-muse`],openai_agent:e[`ai-agents-openai-agent`]},ai_bots_migration_opt_out:e[`ai-bots-migration-opt-out`],ai_bots_protection:e[`ai-bots-protection`],ai_search:e[`ai-search`],ai_training:e[`ai-training`],ai_user:e[`ai-user`],bot_preference_sync_enabled:e[`bot-preference-sync-enabled`],cf_robots_variant:e[`cf-robots-variant`],content_bots_protection:e[`content-bots-protection`],crawler_protection:e[`crawler-protection`],enable_js:e[`enable-js`],is_robots_txt_managed:e[`is-robots-txt-managed`],jsd_api_results_enabled:e[`jsd-api-results-enabled`],fight_mode:e[`fight-mode`],stale_zone_configuration:{optimize_wordpress:e[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:u(e[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:u(e[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:u(e[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:u(e[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:e[`stale-zone-configuration-suppress-session-score`],fight_mode:e[`stale-zone-configuration-fight-mode`]},optimize_wordpress:e[`optimize-wordpress`],sbfm_definitely_automated:e[`sbfm-definitely-automated`],sbfm_static_resource_protection:e[`sbfm-static-resource-protection`],sbfm_verified_bots:e[`sbfm-verified-bots`],sbfm_likely_automated:e[`sbfm-likely-automated`],auto_update_model:e[`auto-update-model`],bm_cookie_enabled:e[`bm-cookie-enabled`],suppress_session_score:e[`suppress-session-score`]}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),d=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>c.send(C,{body:e,zone_id:d}));r(t,{successLabel:`Updated`});return}let f=l({ai_agents:{anthropic_agent:e[`ai-agents-anthropic-agent`],google_agent:e[`ai-agents-google-agent`],instinct:e[`ai-agents-instinct`],muse:e[`ai-agents-muse`],openai_agent:e[`ai-agents-openai-agent`]},ai_bots_migration_opt_out:e[`ai-bots-migration-opt-out`],ai_bots_protection:e[`ai-bots-protection`],ai_search:e[`ai-search`],ai_training:e[`ai-training`],ai_user:e[`ai-user`],bot_preference_sync_enabled:e[`bot-preference-sync-enabled`],cf_robots_variant:e[`cf-robots-variant`],content_bots_protection:e[`content-bots-protection`],crawler_protection:e[`crawler-protection`],enable_js:e[`enable-js`],is_robots_txt_managed:e[`is-robots-txt-managed`],jsd_api_results_enabled:e[`jsd-api-results-enabled`],fight_mode:e[`fight-mode`],stale_zone_configuration:{optimize_wordpress:e[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:u(e[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:u(e[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:u(e[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:u(e[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:e[`stale-zone-configuration-suppress-session-score`],fight_mode:e[`stale-zone-configuration-fight-mode`]},optimize_wordpress:e[`optimize-wordpress`],sbfm_definitely_automated:e[`sbfm-definitely-automated`],sbfm_static_resource_protection:e[`sbfm-static-resource-protection`],sbfm_verified_bots:e[`sbfm-verified-bots`],sbfm_likely_automated:e[`sbfm-likely-automated`],auto_update_model:e[`auto-update-model`],bm_cookie_enabled:e[`bm-cookie-enabled`],suppress_session_score:e[`suppress-session-score`]}),p=await a(`Updating`,async()=>c.send(C,{body:f,zone_id:d}));r(p,{successLabel:`Updated`})})},E={command:`bot-management`,describe:`bot-management`,builder:e=>e.command(S).command(T).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{E as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
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{n as l}from"./prompt-CEpZ-lQZ.mjs";var u={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/day_report`,query:[`date`]};function d(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
|
|
3
3
|
|
|
4
4
|
Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`date`,{type:`string`,description:`Date`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`day-report <asn-id>`,describe:`Get daily report`,builder:d,handler:async e=>c({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={date:e.date};if(e.dryRun){let t=await r();o({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/botnet_feed/asn/${e[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(e[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(e[`asn-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>l.send(u,{account_id:d,asn_id:e[`asn-id`],...c}));a(f,{successLabel:`Loaded`})})};var p={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/full_report`};function m(e){return e.usage(`$0 botnet-feed asn full-report <asn-id>
|
|
5
5
|
|
|
@@ -0,0 +1,14 @@
|
|
|
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};
|