cf 1.0.0-beta.21 → 1.0.0-beta.22
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 +5080 -4931
- package/dist/_meta/schemas.json +3051 -3055
- package/dist/{abuse-reports-CbUAnJxd.mjs → abuse-reports-GF9V-_qH.mjs} +1 -1
- package/dist/{access-C-78DlxL.mjs → access-dWdATy_5.mjs} +1 -1
- package/dist/{accounts-DEqQPxCz.mjs → accounts-CNpiDgQ-.mjs} +50 -52
- package/dist/{acm-jmhCq3Yh.mjs → acm-BXOuZNqO.mjs} +1 -1
- package/dist/{addressing-BeYFpQvC.mjs → addressing-BE4KpVHp.mjs} +1 -1
- package/dist/agent-context-Dtyy4aKL.mjs +2 -0
- package/dist/{agent-memory-Chlovb7j.mjs → agent-memory-WOFBlqfc.mjs} +1 -1
- package/dist/{ai-BndH3HYN.mjs → ai-2syYes5a.mjs} +1 -1
- package/dist/{ai-audit-BUJ-70O_.mjs → ai-audit-DBZnZtSH.mjs} +1 -1
- package/dist/{ai-gateway-CCk7VKhL.mjs → ai-gateway-BL8uRjav.mjs} +1 -1
- package/dist/{ai-search-BexET_wp.mjs → ai-search-xKyrECHJ.mjs} +1 -1
- package/dist/{ai-security-D4MxRlxX.mjs → ai-security-D-o76TBI.mjs} +1 -1
- package/dist/{alerting-rw8Oi3x7.mjs → alerting-D0Hh3IxQ.mjs} +1 -1
- package/dist/{analytics-q-guNEOK.mjs → analytics-BS_HDYYE.mjs} +1 -1
- package/dist/{analytics-engine-Bk7dQLcm.mjs → analytics-engine-B8J0AASh.mjs} +1 -1
- package/dist/api-X3wKppsT.mjs +3 -0
- package/dist/{api-security-BDc6gkf1.mjs → api-security-Dm-_J64v.mjs} +1 -1
- package/dist/{argo-CnLIqm0i.mjs → argo-DLLQUUEp.mjs} +1 -1
- package/dist/{artifacts-Cil33dzV.mjs → artifacts-B-ILiKwb.mjs} +1 -1
- package/dist/{audit-logs--E2Eclb7.mjs → audit-logs-B6f7Yyqb.mjs} +1 -1
- package/dist/{auth-BcNLQji1.mjs → auth-BlWCu-YH.mjs} +1 -1
- package/dist/auth-C0-WtqBw.mjs +2 -0
- package/dist/{auth-BtZmY6sE.mjs → auth-CENmPoCB.mjs} +1 -1
- package/dist/{auth-token-aF5AVLlH.mjs → auth-token-7Gn0n5N_.mjs} +1 -1
- package/dist/{autoconfig-Dbp6J25P.mjs → autoconfig-Bjb97Onj.mjs} +1 -1
- package/dist/{basin-catalog-dnVyzopm.mjs → basin-catalog-C61jbxPf.mjs} +1 -1
- package/dist/{billing-Fqp3jB2V.mjs → billing-CpbtioM3.mjs} +1 -1
- package/dist/blocks-DDNRRYxu.mjs +5 -0
- package/dist/{bot-management-SEDgo1Xg.mjs → bot-management-iYrqBG7K.mjs} +1 -1
- package/dist/{botnet-feed-DPqR4M0Y.mjs → botnet-feed-CiCwJ6Oe.mjs} +1 -1
- package/dist/{brand-protection-B8vwKfM9.mjs → brand-protection-D25yQ6cQ.mjs} +1 -1
- package/dist/{browser-run-BybYDq3I.mjs → browser-run-CC3fAKEB.mjs} +1 -1
- package/dist/build-CovoviZW.mjs +2 -0
- package/dist/{build-CWlpWVBf.mjs → build-DKFvtSB_.mjs} +1 -1
- package/dist/{builds-CvtOG-Gk.mjs → builds-AFdd5qia.mjs} +1 -1
- package/dist/{cache-Bme_d2Wx.mjs → cache-BI3Oyz-Z.mjs} +1 -1
- package/dist/{cli-CIKDqm-u.mjs → cli-Dji5-s1V.mjs} +1 -1
- package/dist/{client-side-security-ZQeRoo1t.mjs → client-side-security-rknn53xw.mjs} +1 -1
- package/dist/{cloud-connector-BeunZlNV.mjs → cloud-connector-BTc3qgHz.mjs} +1 -1
- package/dist/cloudforce-one-BoFYTYsT.mjs +316 -0
- package/dist/{command-CkZkTjIj.mjs → command-6vX_Ie2o.mjs} +1 -1
- package/dist/{command-DWWuXQV8.mjs → command-BDFf54JB.mjs} +1 -1
- package/dist/{command-C9CNvZi_.mjs → command-B_C1I0aq.mjs} +1 -1
- package/dist/{command-CzWWQv8j.mjs → command-BpmbvQqK.mjs} +1 -1
- package/dist/{command-BGRucANI.mjs → command-CKEmPXtc.mjs} +1 -1
- package/dist/{command-CQ5qHE7n.mjs → command-CiBygnsK.mjs} +1 -1
- package/dist/{command-B3uWlw57.mjs → command-KuJJ2WEe.mjs} +1 -1
- package/dist/{command-prWMAJbg.mjs → command-WlIhTGN6.mjs} +1 -1
- package/dist/{command-DkwmylF2.mjs → command-leDr72L4.mjs} +1 -1
- package/dist/{command-CtlD6MEi.mjs → command-ukMoR-tT.mjs} +1 -1
- package/dist/{completions-2Otv0HMd.mjs → completions-DGe2alry.mjs} +1 -1
- package/dist/{connector-interrupts-Dfhxupmg.mjs → connector-interrupts-DZyCZta-.mjs} +1 -1
- package/dist/{connector-telemetry-events-CLVpDTIa.mjs → connector-telemetry-events-BP5GTJuQ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-E_1tmNmQ.mjs → connector-telemetry-snapshots-Q9y68rU7.mjs} +1 -1
- package/dist/{connectors-ChJpQFSl.mjs → connectors-C6wEHhyM.mjs} +1 -1
- package/dist/{containers-Cj5-9nUg.mjs → containers-DcR44W-a.mjs} +2 -2
- package/dist/{containers-CzAZfmnj.mjs → containers-f3DbMCIO.mjs} +1 -1
- package/dist/{content-scan-CIA_9PV8.mjs → content-scan-cQbQH1Ko.mjs} +1 -1
- package/dist/{context-DVh8Wyfs.mjs → context-CSjTAJ8s.mjs} +1 -1
- package/dist/{cps-hJkqdsHx.mjs → cps-aDZte41c.mjs} +1 -1
- package/dist/create-BtmuVqVL.mjs +2 -0
- package/dist/{csam-scanner-cCVO3lNF.mjs → csam-scanner-cRaGDmR_.mjs} +1 -1
- package/dist/{custom-csrs-BrTWUZ0c.mjs → custom-csrs-DoAFlLRn.mjs} +1 -1
- package/dist/{custom-hostnames-C4ft77oC.mjs → custom-hostnames-5vHNAJo7.mjs} +1 -1
- package/dist/{custom-nameservers-BWfrZhD1.mjs → custom-nameservers-B7dTZfCW.mjs} +1 -1
- package/dist/{custom-pages-DqTMKtRc.mjs → custom-pages-DsXlaGqQ.mjs} +1 -1
- package/dist/{d1-B58AA9PA.mjs → d1-DZ2JyfdZ.mjs} +3 -3
- package/dist/{delegate-D7yYckA4.mjs → delegate-DzeuzE99.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CEROLAdh.mjs → deploy-CPFnQQOk.mjs} +1 -1
- package/dist/{deploy-context-Do89WayB.mjs → deploy-context-C_YUdUN-.mjs} +1 -1
- package/dist/{deploy-input-DyMuMsi5.mjs → deploy-input-CKQOolPd.mjs} +1 -1
- package/dist/{dev-BaFS7kOM.mjs → dev-rRWAGDV_.mjs} +1 -1
- package/dist/{diagnostics-4gfYj7Pf.mjs → diagnostics-BIuJQRjU.mjs} +1 -1
- package/dist/{dls-ClWVxTBg.mjs → dls-BurMhzEE.mjs} +1 -1
- package/dist/{dns-CML-wxIt.mjs → dns-Dl1VSmFf.mjs} +1 -1
- package/dist/{dns-firewall-CL0b3dJ1.mjs → dns-firewall-BykvgGT1.mjs} +1 -1
- package/dist/{docs-BeYBHwUN.mjs → docs-FllOac9a.mjs} +1 -1
- package/dist/{durable-objects-uZECeq_f.mjs → durable-objects-BNCJA3NE.mjs} +1 -1
- package/dist/{email-auth-CCNW798I.mjs → email-auth-BYvR29qP.mjs} +1 -1
- package/dist/{email-domains-1rD1d84O.mjs → email-domains-C3jG7o39.mjs} +1 -1
- package/dist/{email-routing-CYv-LrbV.mjs → email-routing-BQ7b2KAy.mjs} +1 -1
- package/dist/{email-security-CWEUYPYo.mjs → email-security-CsoNcUfp.mjs} +1 -1
- package/dist/{email-sending-DHSzCfJx.mjs → email-sending-d_b9vyge.mjs} +3 -3
- package/dist/{error-sanitization-DWJ5ka7h.mjs → error-sanitization-ahuAGEjT.mjs} +1 -1
- package/dist/error-sanitization-rodO1WCL.mjs +2 -0
- package/dist/{errors-ol9sMqSe.mjs → errors-DFSWbpd6.mjs} +5 -5
- package/dist/{field-extractors-CuBM_uO4.mjs → field-extractors-Be4UTSz-.mjs} +1 -1
- package/dist/{firewall-SMIUSypF.mjs → firewall-DYGPUErP.mjs} +1 -1
- package/dist/{flagship-D3v6iDdw.mjs → flagship-HIikhoYo.mjs} +1 -1
- package/dist/{fraud-B2f7O15X.mjs → fraud-DNAOkNU5.mjs} +1 -1
- package/dist/get-Be821dio.mjs +2 -0
- package/dist/{google-tag-gateway-BwOc62Gy.mjs → google-tag-gateway-DHvhuTYu.mjs} +1 -1
- package/dist/{healthchecks-BQXHnihB.mjs → healthchecks-BKtoWgF2.mjs} +1 -1
- package/dist/{hyperdrive-Bd6Yfje3.mjs → hyperdrive-DQrmkuSh.mjs} +1 -1
- package/dist/{iam-qJPI1_aZ.mjs → iam-BEs1Geob.mjs} +1 -1
- package/dist/{images-goHZJOxy.mjs → images-D55kUS0m.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-CVx0Ya1E.mjs → init-BTXSeUaj.mjs} +1 -1
- package/dist/{intel-CwiqwJI9.mjs → intel-BDbanlya.mjs} +1 -1
- package/dist/{internal-5cnlw9mH.mjs → internal-Cj_Wo6sr.mjs} +1 -1
- package/dist/{ips-KBxmXhvO.mjs → ips-CHrG3mwW.mjs} +1 -1
- package/dist/{k2-KhIP5NFT.mjs → k2-CJzI3dVt.mjs} +1 -1
- package/dist/{kv-CCem2sEY.mjs → kv-BjfDMxOg.mjs} +1 -1
- package/dist/{lazy-command-BMhD5ffF.mjs → lazy-command-DkI_21Dt.mjs} +1 -1
- package/dist/{leaked-credential-checks-BkPZiwE2.mjs → leaked-credential-checks-BHe-erAg.mjs} +1 -1
- package/dist/{live-BhHzxFna.mjs → live-DSwOLngp.mjs} +1 -1
- package/dist/{load-balancers-17GBXdju.mjs → load-balancers-CWNEVfum.mjs} +1 -1
- package/dist/{login-Buhvx6Fi.mjs → login-CJYJE6Ae.mjs} +1 -1
- package/dist/login-D2Bf_HMY.mjs +2 -0
- package/dist/{logpush-BCCUxa4J.mjs → logpush-BQhzhkBY.mjs} +1 -1
- package/dist/{logs-4CwupKRG.mjs → logs-DndNcbrR.mjs} +1 -1
- package/dist/{magic-cloud-networking-Xy6SC-V-.mjs → magic-cloud-networking-XmIKU6F1.mjs} +1 -1
- package/dist/{magic-network-monitoring-B8pRZp2g.mjs → magic-network-monitoring-BgPLcQzT.mjs} +1 -1
- package/dist/{magic-transit-CwfO3OOX.mjs → magic-transit-C2kLj1Hd.mjs} +1 -1
- package/dist/{managed-defense-CtFLuvuB.mjs → managed-defense-Bq63Exyv.mjs} +1 -1
- package/dist/{managed-transforms-Hto8OCBS.mjs → managed-transforms-Bz3Q6vSk.mjs} +1 -1
- package/dist/{mcp-SQ0MAVUJ.mjs → mcp-IiegTI5c.mjs} +1 -1
- package/dist/{mesh-C8A6tVqA.mjs → mesh-C7sj3FL4.mjs} +1 -1
- package/dist/{migrate-Dufxsb_F.mjs → migrate-D7pH9_Y8.mjs} +1 -1
- package/dist/{monetization-CYVaCAe9.mjs → monetization-DvfqZhGk.mjs} +1 -1
- package/dist/{network-CJBTdEM3.mjs → network-CnqNYoOf.mjs} +1 -1
- package/dist/{network-interconnects-CKlNFj3i.mjs → network-interconnects-BXftLikd.mjs} +1 -1
- package/dist/{o11y-5x2Q8CWm.mjs → o11y-1Qku543b.mjs} +1 -1
- package/dist/{oauth-BN6_FpYp.mjs → oauth-B-SYl8nR.mjs} +1 -1
- package/dist/{oauth-D_A8AcIS.mjs → oauth-C6uYSFM5.mjs} +1 -1
- package/dist/{oauth-clients-qKXg8ZH3.mjs → oauth-clients-DXNO-K_e.mjs} +1 -1
- package/dist/{oauth-scopes-Ct1jDyC5.mjs → oauth-scopes-WxoyDblU.mjs} +1 -1
- package/dist/{organization-lBQSeqS1.mjs → organization-HBQnzh8z.mjs} +1 -1
- package/dist/{organizations-DEX8Er3g.mjs → organizations-DvS-ENN2.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DUsxVGCs.mjs → origin-post-quantum-encryption-BnjX0dCp.mjs} +1 -1
- package/dist/package-DAB8HAGn.mjs +2 -0
- package/dist/{page-rules-BMt6nt03.mjs → page-rules-CypVq1Wb.mjs} +1 -1
- package/dist/{pages-Jxa92ECz.mjs → pages-BxLbPYIf.mjs} +1 -1
- package/dist/{pay-per-crawl-Cv0044CZ.mjs → pay-per-crawl-KidGhWnn.mjs} +1 -1
- package/dist/{pay-per-use-DGEeG-dC.mjs → pay-per-use-DcsdwXr7.mjs} +1 -1
- package/dist/{pipelines-CEC78A3w.mjs → pipelines-CX7esgh3.mjs} +1 -1
- package/dist/{precursor-Ba0Ejhzt.mjs → precursor-BzDcAmUT.mjs} +1 -1
- package/dist/{previews-DnZbUTym.mjs → previews-B7MZKZK6.mjs} +1 -1
- package/dist/{progress-CtGsPOpV.mjs → progress-BcjUdm_B.mjs} +1 -1
- package/dist/{prompt-YrI7ltMa.mjs → prompt-BFRinxR0.mjs} +1 -1
- package/dist/{queues-Chq997uj.mjs → queues-mSjNdJNl.mjs} +1 -1
- package/dist/{r2-BFgZDs-F.mjs → r2-ClBc0jT0.mjs} +1 -1
- package/dist/{radar-DJdDzLJw.mjs → radar-C9GwykGn.mjs} +1 -1
- package/dist/{raw-fetch-BE3QgdTE.mjs → raw-fetch-BO0VqOVx.mjs} +1 -1
- package/dist/{ready-Cok0aqke.mjs → ready-DhdeN4ga.mjs} +1 -1
- package/dist/{realtime-BHWWCiKp.mjs → realtime-9V5zWcij.mjs} +73 -71
- package/dist/{registrar-9Y-1IQ0n.mjs → registrar-DsI2A62h.mjs} +1 -1
- package/dist/{registrar-sandbox-DTS1kRnb.mjs → registrar-sandbox-DcjFW26g.mjs} +1 -1
- package/dist/{reporting-D5RbKQJf.mjs → reporting-pAQ3jvEO.mjs} +1 -1
- package/dist/{request-headers-KhW_hy36.mjs → request-headers-DFPlTFRf.mjs} +1 -1
- package/dist/{request-tracers-wxWCjmHo.mjs → request-tracers-CQqdbHj8.mjs} +1 -1
- package/dist/{resource-sharing-BGoaVvJa.mjs → resource-sharing-BJraifhD.mjs} +1 -1
- package/dist/{rules-Cd3EjhdF.mjs → rules-B_Mopjel.mjs} +1 -1
- package/dist/{rulesets-Bnz3rSBT.mjs → rulesets-DRV0HtYz.mjs} +1 -1
- package/dist/{rum-CK9HEe3O.mjs → rum-D5dYq2Uy.mjs} +1 -1
- package/dist/{run-DnZGQbq_.mjs → run--9dxcon4.mjs} +1 -1
- package/dist/run-BUebYPOn.mjs +2 -0
- package/dist/{schema-flags-BrDlFwLv.mjs → schema-flags-blYVIAUK.mjs} +1 -1
- package/dist/{scim-UdqaWnOu.mjs → scim-C91WGj_g.mjs} +1 -1
- package/dist/{secrets-store-Bf5v96LC.mjs → secrets-store-D4Zr-fuz.mjs} +3 -3
- package/dist/{security-insights-BAGySlGu.mjs → security-insights-DJWdVax5.mjs} +1 -1
- package/dist/{security-txt-D0fMmjHs.mjs → security-txt-B0NLFJNk.mjs} +1 -1
- package/dist/{session-6xqrJWXy.mjs → session-Bafy81hj.mjs} +1 -1
- package/dist/{shared-DYRRG9A-.mjs → shared-rCcn7D66.mjs} +1 -1
- package/dist/{signed-url-Ce0muRem.mjs → signed-url-DBf_p7Wf.mjs} +1 -1
- package/dist/{smart-shield-CCy7_M3j.mjs → smart-shield-BufLvdU3.mjs} +1 -1
- package/dist/{snippets-Bc8m3HSV.mjs → snippets-DA2Gk50m.mjs} +1 -1
- package/dist/{spawn-BAEdy9kS.mjs → spawn-hrdbxnm1.mjs} +1 -1
- package/dist/{spectrum-DtNX8WBX.mjs → spectrum-DlI8qtVo.mjs} +1 -1
- package/dist/{speed-TbkeWV_x.mjs → speed-DNwm5gYl.mjs} +1 -1
- package/dist/{sql-DI319y25.mjs → sql-aBDdRWdd.mjs} +1 -1
- package/dist/{src-Dc6ojwUW.mjs → src-4-uZcDN_.mjs} +5 -5
- package/dist/{ssl-D0MIzFl2.mjs → ssl-DEDucWlo.mjs} +1 -1
- package/dist/{stream-4Mrb8HEo.mjs → stream-DGv9Bssl.mjs} +1 -1
- package/dist/{tags-BP25qydR.mjs → tags-CNBA4Pf1.mjs} +1 -1
- package/dist/telemetry-THz8wtoW.mjs +2 -0
- package/dist/{telemetry-DKSJSLtq.mjs → telemetry-klBrZrC7.mjs} +1 -1
- package/dist/{tenant-jmfZqEZ4.mjs → tenant-DVtqafWB.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BzVP85Tq.mjs → tenant-custom-nameservers-CtrqQc_i.mjs} +1 -1
- package/dist/{tunnels-BNswR1Dj.mjs → tunnels-Bc_r--ln.mjs} +2 -2
- package/dist/{turnstile-BgsTP2fz.mjs → turnstile-Cr2cTE0C.mjs} +1 -1
- package/dist/ui-DvC7Qa0H.mjs +2 -0
- package/dist/{update-check-BOF1hn_I.mjs → update-check-B5V9BBM7.mjs} +1 -1
- package/dist/{update-check-C7mfEeQ7.mjs → update-check-C5bJ4-Ef.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-Bqrs4-2F.mjs → url-normalization-D6r0sLRj.mjs} +1 -1
- package/dist/{url-scanner-Dm4Fps5T.mjs → url-scanner-D4u7jbzf.mjs} +1 -1
- package/dist/{user-u_LxzLM4.mjs → user-DhWPKWo0.mjs} +1 -1
- package/dist/{vectorize-DLGiOyd4.mjs → vectorize-CB9IjpC3.mjs} +1 -1
- package/dist/version-Dp7G_dM6.mjs +2 -0
- package/dist/{waiting-rooms-DmgJgJXb.mjs → waiting-rooms-BYlwhzgD.mjs} +1 -1
- package/dist/{web-assets-rNhZWP-6.mjs → web-assets-Nn2HArqh.mjs} +1 -1
- package/dist/{web3-BVBdFt8E.mjs → web3-DpJNkFNQ.mjs} +1 -1
- package/dist/{workers-CjUKJvH8.mjs → workers-BkNt1wSN.mjs} +2 -2
- package/dist/{workers-builds-D3Q97l7X.mjs → workers-builds-BL3dK2R3.mjs} +1 -1
- package/dist/{workers-for-platforms-C_fcw30y.mjs → workers-for-platforms-CAQLG6dE.mjs} +1 -1
- package/dist/{workers-vpc-CnRO3Stc.mjs → workers-vpc-WnRec8oo.mjs} +1 -1
- package/dist/{workflows-cpHFe5v6.mjs → workflows-DpXBMizW.mjs} +1 -1
- package/dist/{wrangler-migration-DQehjmoh.mjs → wrangler-migration-__jrVjrp.mjs} +1 -1
- package/dist/{zaraz-BRj0J7vK.mjs → zaraz-hWisKRaN.mjs} +1 -1
- package/dist/{zero-trust-CVZKDLCB.mjs → zero-trust-DiZhiSa4.mjs} +37 -37
- package/dist/{zone-N6ccK70C.mjs → zone-D7b949er.mjs} +1 -1
- package/dist/{zones-C4S_kpGz.mjs → zones-giCZ0LO8.mjs} +1 -1
- package/package.json +1 -1
- package/dist/agent-context-DFEgYjEQ.mjs +0 -2
- package/dist/api-eMuS5GI1.mjs +0 -3
- package/dist/auth-B0lEsD_1.mjs +0 -2
- package/dist/blocks-BOQH-Won.mjs +0 -5
- package/dist/build-BqGmiORA.mjs +0 -2
- package/dist/cloudforce-one-D20t9ojD.mjs +0 -370
- package/dist/create-OXylMu6m.mjs +0 -2
- package/dist/error-sanitization-Byb-_IS9.mjs +0 -2
- package/dist/get-iPUHxD1r.mjs +0 -2
- package/dist/login-BTiflOun.mjs +0 -2
- package/dist/package-BqSbnt6u.mjs +0 -2
- package/dist/run-Be6Js7D6.mjs +0 -2
- package/dist/telemetry-CvZean4s.mjs +0 -2
- package/dist/ui-Bo6DCvbS.mjs +0 -2
- package/dist/version-DmTuWNZ5.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,i as a,t as o}from"./context-CSjTAJ8s.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-BcjUdm_B.mjs";import{t as u}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as d,n as f,o as p,r as m,s as h,t as g}from"./body-parser-ChnyBsfm.mjs";import{n as _,t as v}from"./input-validation-D7z60HJH.mjs";import{a as y,i as b,n as x}from"./prompt-BFRinxR0.mjs";import{n as ee,t as te}from"./raw-fetch-BO0VqOVx.mjs";var ne={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps`,body:`json`};function re(e){return e.usage(`$0 zero-trust access applications create
|
|
3
3
|
|
|
4
4
|
Adds a new application to Access.`).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 ie={command:`create`,describe:`Add an Access application`,builder:re,handler:async e=>u({command:`zero-trust access applications create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust access applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(ne,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var ae={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`};function oe(e){return e.usage(`$0 zero-trust access applications delete <app-id>
|
|
5
5
|
|
|
@@ -214,56 +214,56 @@ Returns available auth methods for the specified vendor, including credential sc
|
|
|
214
214
|
|
|
215
215
|
Returns full application details including auth methods, use cases, and permissions.`).positional(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Va={command:`get <application-id>`,describe:`Get application details`,builder:Ba,handler:async e=>u({command:`zero-trust casb applications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(za,{account_id:a,application_id:e[`application-id`]}));s(u,{successLabel:`Loaded`})})};var Ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/applications`,query:[`environment`,`page`,`page_size`],errors:{400:`BadRequestError`}};function Ua(e){return e.usage(`$0 zero-trust casb applications list
|
|
216
216
|
|
|
217
|
-
Returns a list of available applications with use cases and permissions.`).option(`environment`,{type:`string`,description:`Filter by supported environment (standard, fedramp).`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wa={command:`list`,describe:`List applications`,builder:Ua,handler:async e=>u({command:`zero-trust casb applications list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={environment:e.environment,page:e.page,page_size:e[`page-size`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/one/applications`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ha,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Ga={command:`applications`,describe:`Operations for casb.applications`,builder:e=>e.command(Va).command(Wa).command(Ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ka={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/asset_schemas/${t.asset_class}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function qa(e){return e.usage(`$0 zero-trust casb asset-schemas get <asset-class>
|
|
217
|
+
Returns a list of available applications with use cases and permissions.`).option(`environment`,{type:`string`,description:`Filter by supported environment (standard, fedramp).`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wa={command:`list`,describe:`List applications`,builder:Ua,handler:async e=>u({command:`zero-trust casb applications list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={environment:e.environment,page:e.page,page_size:e[`page-size`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/one/applications`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ha,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Ga={command:`applications`,describe:`Operations for casb.applications`,builder:e=>e.command(Va).command(Wa).command(Ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ka={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/asset_schemas/${t.asset_class}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function qa(e){return e.usage(`$0 zero-trust casb asset-schemas get <asset-class>
|
|
218
218
|
|
|
219
|
-
Returns the fields and related attributes a custom finding type may reference for the given asset class (JSON Schema). Used by the custom finding types builder.`).positional(`asset-class`,{type:`string`,description:`Asset class identifier (PascalCase), e.g. AnthropicApiKey.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ja={command:`get <asset-class>`,describe:`Get asset schema by asset class`,builder:qa,handler:async e=>u({command:`zero-trust casb asset-schemas get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb asset-schemas get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/asset_schemas/${e[`asset-class`]==null?`<asset-class>`:encodeURIComponent(String(e[`asset-class`]))}`,pathParams:{"asset-class":String(e[`asset-class`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ka,{account_id:a,asset_class:e[`asset-class`]}));s(u,{successLabel:`Loaded`})})};var Ya={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/asset_schemas`,query:[`vendor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Xa(e){return e.usage(`$0 zero-trust casb asset-schemas list
|
|
219
|
+
Returns the fields and related attributes a custom finding type may reference for the given asset class (JSON Schema). Used by the custom finding types builder.`).positional(`asset-class`,{type:`string`,description:`Asset class identifier (PascalCase), e.g. AnthropicApiKey.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ja={command:`get <asset-class>`,describe:`Get asset schema by asset class`,builder:qa,handler:async e=>u({command:`zero-trust casb asset-schemas get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb asset-schemas get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/asset_schemas/${e[`asset-class`]==null?`<asset-class>`:encodeURIComponent(String(e[`asset-class`]))}`,pathParams:{"asset-class":String(e[`asset-class`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ka,{account_id:a,asset_class:e[`asset-class`]}));s(u,{successLabel:`Loaded`})})};var Ya={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/asset_schemas`,query:[`vendor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Xa(e){return e.usage(`$0 zero-trust casb asset-schemas list
|
|
220
220
|
|
|
221
|
-
Returns the catalog of asset classes available when authoring custom findings, grouped by vendor. Optionally filter to a single vendor with the \`vendor\` query parameter.`).option(`vendor`,{type:`string`,description:`Restrict the result to a single vendor. Unknown values return 400.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`WORKDAY`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Za={command:`list`,describe:`List asset schemas`,builder:Xa,handler:async e=>u({command:`zero-trust casb asset-schemas list`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{let n={vendor:e.vendor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb asset-schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/asset_schemas`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ya,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Qa={command:`asset-schemas`,describe:`Operations for casb.asset-schemas`,builder:e=>e.command(Ja).command(Za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/content/export`,body:`json`,errors:{400:`BadRequestError`}};function $a(e){return e.usage(`$0 zero-trust casb content export
|
|
221
|
+
Returns the catalog of asset classes available when authoring custom findings, grouped by vendor. Optionally filter to a single vendor with the \`vendor\` query parameter.`).option(`vendor`,{type:`string`,description:`Restrict the result to a single vendor. Unknown values return 400.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`WORKDAY`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Za={command:`list`,describe:`List asset schemas`,builder:Xa,handler:async e=>u({command:`zero-trust casb asset-schemas list`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{let n={vendor:e.vendor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb asset-schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/asset_schemas`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ya,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Qa={command:`asset-schemas`,describe:`Operations for casb.asset-schemas`,builder:e=>e.command(Ja).command(Za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/content/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function $a(e){return e.usage(`$0 zero-trust casb content export
|
|
222
222
|
|
|
223
223
|
Creates a CSV export for content and accepts optional filters in the payload.`).option(`dlp-profile-id`,{type:`string`,array:!0,description:`Filter by DLP profile IDs.`}).option(`dlp-profile-information`,{type:`string`,description:`DLP profile metadata for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view content flagged on or before this date.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view content flagged on or after this date.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`Search term to filter content.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).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 content exports.`})}const eo={command:`export`,describe:`Create a content export`,builder:$a,handler:async e=>u({command:`zero-trust casb content export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb content export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/content/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({dlp_profile_id:e[`dlp-profile-id`],dlp_profile_information:d(e[`dlp-profile-information`],`dlp-profile-information`),integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),vendors:e.vendors}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(K,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}if(e[`dlp-profile-information`]===void 0)throw Error(`--dlp-profile-information is required (or pass --body with this field set).`);let u=g({dlp_profile_id:e[`dlp-profile-id`],dlp_profile_information:d(e[`dlp-profile-information`],`dlp-profile-information`),integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),vendors:e.vendors}),p=await l(`Loading`,async()=>n.send(K,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var to={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/content`,query:[`direction`,`dlp_profile_id`,`integration_id`,`max_affliction_date`,`min_affliction_date`,`order`,`page`,`per_page`,`search`,`vendor`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function no(e){return e.usage(`$0 zero-trust casb content list
|
|
224
224
|
|
|
225
|
-
List DLP content findings`).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-profile-id`,{type:`string`,description:`Filter by an DLP profile ID`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering content assets.`,choices:[`asset_name`,`dlp_profile_count`,`integration_name`,`latest_affliction_date`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ro={command:`list`,describe:`List DLP content findings`,builder:no,handler:async e=>u({command:`zero-trust casb content list`,classification:{safeFlags:[`direction`,`order`,`vendor`,`dry-run`]}},e,async()=>{let n={direction:e.direction,dlp_profile_id:e[`dlp-profile-id`],integration_id:e[`integration-id`],max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],order:e.order,page:e.page,per_page:e[`per-page`],search:e.search,vendor:e.vendor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb content list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/content`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(to,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},io={command:`content`,describe:`Operations for casb.content`,builder:e=>e.command(eo).command(ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ao={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/exports/${t.id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function oo(e){return e.usage(`$0 zero-trust casb exports get <id>
|
|
225
|
+
List DLP content findings`).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-profile-id`,{type:`string`,description:`Filter by an DLP profile ID`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering content assets.`,choices:[`asset_name`,`dlp_profile_count`,`integration_name`,`latest_affliction_date`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ro={command:`list`,describe:`List DLP content findings`,builder:no,handler:async e=>u({command:`zero-trust casb content list`,classification:{safeFlags:[`direction`,`order`,`vendor`,`dry-run`]}},e,async()=>{let n={direction:e.direction,dlp_profile_id:e[`dlp-profile-id`],integration_id:e[`integration-id`],max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],order:e.order,page:e.page,per_page:e[`per-page`],search:e.search,vendor:e.vendor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb content list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/content`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(to,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},io={command:`content`,describe:`Operations for casb.content`,builder:e=>e.command(eo).command(ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ao={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/exports/${t.id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function oo(e){return e.usage(`$0 zero-trust casb exports get <id>
|
|
226
226
|
|
|
227
|
-
Retrieves a single export job by its unique identifier`).positional(`id`,{type:`string`,description:`Unique identifier for the export job`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const so={command:`get <id>`,describe:`Get a single export job`,builder:oo,handler:async e=>u({command:`zero-trust casb exports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb exports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/exports/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ao,{account_id:a,id:e.id}));s(u,{successLabel:`Loaded`})})};var co={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/exports`,query:[`page`,`per_page`,`status`],errors:{400:`BadRequestError`}};function lo(e){return e.usage(`$0 zero-trust casb exports list
|
|
227
|
+
Retrieves a single export job by its unique identifier`).positional(`id`,{type:`string`,description:`Unique identifier for the export job`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const so={command:`get <id>`,describe:`Get a single export job`,builder:oo,handler:async e=>u({command:`zero-trust casb exports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb exports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/exports/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ao,{account_id:a,id:e.id}));s(u,{successLabel:`Loaded`})})};var co={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/exports`,query:[`page`,`per_page`,`status`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function lo(e){return e.usage(`$0 zero-trust casb exports list
|
|
228
228
|
|
|
229
|
-
List all export jobs for a given requestor's organization`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`status`,{type:`string`,description:`Filter on export job's status`,choices:[`Pending`,`Success`,`Failure`,`Rescheduled`,`In-Progress`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uo={command:`list`,describe:`List all export jobs`,builder:lo,handler:async e=>u({command:`zero-trust casb exports list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb exports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/exports`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(co,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},fo={command:`exports`,describe:`Operations for casb.exports`,builder:e=>e.command(so).command(uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function po(e){return e.usage(`$0 zero-trust casb finding-types create
|
|
229
|
+
List all export jobs for a given requestor's organization`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`status`,{type:`string`,description:`Filter on export job's status`,choices:[`Pending`,`Success`,`Failure`,`Rescheduled`,`In-Progress`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uo={command:`list`,describe:`List all export jobs`,builder:lo,handler:async e=>u({command:`zero-trust casb exports list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb exports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/exports`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(co,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},fo={command:`exports`,describe:`Operations for casb.exports`,builder:e=>e.command(so).command(uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function po(e){return e.usage(`$0 zero-trust casb finding-types create
|
|
230
230
|
|
|
231
|
-
Create a new custom finding type with policy definition.`).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`asset-class`,{type:`string`,description:`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`}).option(`asset-vendor`,{type:`string`,description:`Vendors whose assets a finding type can evaluate.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`asset-vendor`,e=>_(e,`asset-vendor`,`text`)).option(`description`,{type:`string`,description:`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`}).option(`expression`,{type:`string`,description:"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters."}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 mo={command:`create`,describe:`Create a custom finding type`,builder:po,handler:async e=>u({command:`zero-trust casb finding-types create`,classification:{safeFlags:[`applies-to-all-integrations`,`asset-vendor`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(q,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);e[`asset-class`]===void 0&&(e[`asset-class`]=await y(`asset-class`,`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`)),e[`asset-vendor`]===void 0&&(e[`asset-vendor`]=await b(`asset-vendor`,`Vendors whose assets a finding type can evaluate.`,[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.description===void 0&&(e.description=await y(`description`,`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`)),e.expression===void 0&&(e.expression=await y(`expression`,"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters.")),e.name===void 0&&(e.name=await y(`name`,`Human-readable name for the finding type. Maximum 256 characters.`)),e.severity===void 0&&(e.severity=await b(`severity`,`The severity level of a finding.`,[`Critical`,`High`,`Medium`,`Low`]));let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Creating`,async()=>n.send(q,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ho={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function go(e){return e.usage(`$0 zero-trust casb finding-types delete <finding-type-id>
|
|
231
|
+
Create a new custom finding type with policy definition.`).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`asset-class`,{type:`string`,description:`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`}).option(`asset-vendor`,{type:`string`,description:`Vendors whose assets a finding type can evaluate.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`asset-vendor`,e=>_(e,`asset-vendor`,`text`)).option(`description`,{type:`string`,description:`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`}).option(`expression`,{type:`string`,description:"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters."}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 mo={command:`create`,describe:`Create a custom finding type`,builder:po,handler:async e=>u({command:`zero-trust casb finding-types create`,classification:{safeFlags:[`applies-to-all-integrations`,`asset-vendor`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(q,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);e[`asset-class`]===void 0&&(e[`asset-class`]=await y(`asset-class`,`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`)),e[`asset-vendor`]===void 0&&(e[`asset-vendor`]=await b(`asset-vendor`,`Vendors whose assets a finding type can evaluate.`,[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.description===void 0&&(e.description=await y(`description`,`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`)),e.expression===void 0&&(e.expression=await y(`expression`,"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters.")),e.name===void 0&&(e.name=await y(`name`,`Human-readable name for the finding type. Maximum 256 characters.`)),e.severity===void 0&&(e.severity=await b(`severity`,`The severity level of a finding.`,[`Critical`,`High`,`Medium`,`Low`]));let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Creating`,async()=>n.send(q,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ho={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function go(e){return e.usage(`$0 zero-trust casb finding-types delete <finding-type-id>
|
|
232
232
|
|
|
233
|
-
Delete an existing custom finding type. **Security**: Only custom finding types (not system-managed) can be deleted.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,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 _o={command:`delete <finding-type-id>`,describe:`Delete a custom finding type`,builder:go,handler:async e=>u({command:`zero-trust casb finding-types delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(ho,{account_id:a,finding_type_id:e[`finding-type-id`]}));s(u,{successLabel:`Deleted`})})};var vo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function yo(e){return e.usage(`$0 zero-trust casb finding-types get <finding-type-id>
|
|
233
|
+
Delete an existing custom finding type. **Security**: Only custom finding types (not system-managed) can be deleted.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,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 _o={command:`delete <finding-type-id>`,describe:`Delete a custom finding type`,builder:go,handler:async e=>u({command:`zero-trust casb finding-types delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(ho,{account_id:a,finding_type_id:e[`finding-type-id`]}));s(u,{successLabel:`Deleted`})})};var vo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function yo(e){return e.usage(`$0 zero-trust casb finding-types get <finding-type-id>
|
|
234
234
|
|
|
235
|
-
Retrieve a specific finding type by its unique identifier.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bo={command:`get <finding-type-id>`,describe:`Get finding by ID`,builder:yo,handler:async e=>u({command:`zero-trust casb finding-types get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vo,{account_id:a,finding_type_id:e[`finding-type-id`]}));s(u,{successLabel:`Loaded`})})};var xo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types`,query:[`page`,`per_page`,`vendors`,`types`,`origins`,`severities`,`search`,`quarantined`,`min_updated_at`,`max_updated_at`,`order`,`direction`],joined:[`vendors`,`types`,`origins`,`severities`],errors:{400:`BadRequestError`,403:`ForbiddenError`}};function So(e){return e.usage(`$0 zero-trust casb finding-types list
|
|
235
|
+
Retrieve a specific finding type by its unique identifier.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bo={command:`get <finding-type-id>`,describe:`Get finding by ID`,builder:yo,handler:async e=>u({command:`zero-trust casb finding-types get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vo,{account_id:a,finding_type_id:e[`finding-type-id`]}));s(u,{successLabel:`Loaded`})})};var xo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types`,query:[`page`,`per_page`,`vendors`,`types`,`origins`,`severities`,`search`,`quarantined`,`min_updated_at`,`max_updated_at`,`order`,`direction`],joined:[`vendors`,`types`,`origins`,`severities`],errors:{400:`BadRequestError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function So(e){return e.usage(`$0 zero-trust casb finding-types list
|
|
236
236
|
|
|
237
237
|
List all available finding types with pagination support.`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`vendors`,{type:`string`,description:`Filter finding types by vendor. Supports multiple comma-separated values. Each value may be either the vendor enum (GOOGLE_WORKSPACE) or the friendly name returned by the read routes (Google Workspace).`}).option(`types`,{type:`string`,description:`Filter finding types by category type. Supports multiple comma-separated, case-insensitive values.`}).option(`origins`,{type:`string`,description:`Filter finding types by origin. Supports multiple comma-separated, case-insensitive values.`}).option(`severities`,{type:`string`,description:`Filter finding types by severity. Supports multiple comma-separated, case-insensitive values.`}).option(`search`,{type:`string`,description:`Filter finding types by name or ID (case-insensitive substring match).`}).option(`quarantined`,{type:`boolean`,description:`When true, return only quarantined finding types; when false, return only non-quarantined finding types. Omit to return both.`}).option(`min-updated-at`,{type:`string`,description:`Return only finding types updated at or after this RFC 3339 timestamp (inclusive).`}).option(`max-updated-at`,{type:`string`,description:`Return only finding types updated at or before this RFC 3339 timestamp (inclusive).`}).option(`order`,{type:`string`,description:`Field to sort by (case-insensitive). Defaults to 'created'.
|
|
238
238
|
Name and vendor sorting is case-insensitive; vendor uses friendly provider names.
|
|
239
239
|
Ascending order: type Content then Posture; origin custom then system;
|
|
240
240
|
severity Low, Medium, High, Critical.`,choices:[`created`,`updated`,`match_count`,`name`,`vendor`,`type`,`origin`,`severity`]}).option(`direction`,{type:`string`,description:`Sort direction for the primary field. Defaults to 'desc'.
|
|
241
|
-
Ties are resolved by case-insensitive name, then ID, both ascending regardless of direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Co={command:`list`,describe:`List all finding types`,builder:So,handler:async e=>u({command:`zero-trust casb finding-types list`,classification:{safeFlags:[`quarantined`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],vendors:e.vendors,types:e.types,origins:e.origins,severities:e.severities,search:e.search,quarantined:e.quarantined,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb finding-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/finding_types`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(xo,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var wo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}/remediation_types`,query:[`integration_id`,`cursor`,`page`,`per_page`],errors:{400:`BadRequestError`,404:`NotFoundError`}};function To(e){return e.usage("$0 zero-trust casb finding-types remediation-types list\n\nList all remediation types for a given finding type. This endpoint supports both cursor and offset pagination. Note that `cursor` and `page` are mutually exclusive.").option(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Eo={command:`list`,describe:`List remediation types for a finding type`,builder:To,handler:async e=>u({command:`zero-trust casb finding-types remediation-types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={integration_id:e[`integration-id`],cursor:e.cursor,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types remediation-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}/remediation_types`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(wo,{account_id:u,finding_type_id:e[`finding-type-id`],...n}));s(d,{successLabel:`Loaded`})})},Do={command:`remediation-types`,describe:`Operations for casb.finding-types.remediation-types`,builder:e=>e.command(Eo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Oo(e){return e.usage(`$0 zero-trust casb finding-types update <finding-type-id>
|
|
241
|
+
Ties are resolved by case-insensitive name, then ID, both ascending regardless of direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Co={command:`list`,describe:`List all finding types`,builder:So,handler:async e=>u({command:`zero-trust casb finding-types list`,classification:{safeFlags:[`quarantined`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],vendors:e.vendors,types:e.types,origins:e.origins,severities:e.severities,search:e.search,quarantined:e.quarantined,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb finding-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/finding_types`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(xo,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var wo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}/remediation_types`,query:[`integration_id`,`cursor`,`page`,`per_page`],errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function To(e){return e.usage("$0 zero-trust casb finding-types remediation-types list\n\nList all remediation types for a given finding type. This endpoint supports both cursor and offset pagination. Note that `cursor` and `page` are mutually exclusive.").option(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Eo={command:`list`,describe:`List remediation types for a finding type`,builder:To,handler:async e=>u({command:`zero-trust casb finding-types remediation-types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={integration_id:e[`integration-id`],cursor:e.cursor,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types remediation-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}/remediation_types`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(wo,{account_id:u,finding_type_id:e[`finding-type-id`],...n}));s(d,{successLabel:`Loaded`})})},Do={command:`remediation-types`,describe:`Operations for casb.finding-types.remediation-types`,builder:e=>e.command(Eo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Oo(e){return e.usage(`$0 zero-trust casb finding-types update <finding-type-id>
|
|
242
242
|
|
|
243
|
-
Update an existing custom finding type. **Immutable fields**: asset_vendor, asset_class, expression, and category cannot be changed after creation. **Security**: Only custom finding types (not system-managed) can be updated.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`description`,{type:`string`,description:`Optional description of the finding type. Cannot be empty if provided. Maximum 4096 characters.`}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Cannot be empty if provided. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 ko={command:`update <finding-type-id>`,describe:`Update a custom finding type`,builder:Oo,handler:async e=>u({command:`zero-trust casb finding-types update`,classification:{safeFlags:[`applies-to-all-integrations`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(J,{body:t,account_id:a,finding_type_id:e[`finding-type-id`]}));s(r,{successLabel:`Updated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Updating`,async()=>n.send(J,{body:u,account_id:a,finding_type_id:e[`finding-type-id`]}));s(d,{successLabel:`Updated`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/validate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Ao(e){return e.usage("$0 zero-trust casb finding-types validate\n\nCheck a candidate custom finding type without creating it, so problems can be corrected before publishing. The request body is the same shape as `CreateFindingType`, and the candidate is checked against the same rules, so a valid result means the definition itself is sound. It is not a reservation: a create can still be rejected for a reason that does not belong to the definition, such as the account already holding the maximum number of custom finding types. A candidate that fails validation is still a **200** with `result.valid: false` and one entry in `result.errors` per problem — that is the answer this endpoint exists to give. `4xx` is reserved for a request that could not be processed at all, such as a body that will not parse.").option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`asset-class`,{type:`string`,description:`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`}).option(`asset-vendor`,{type:`string`,description:`Vendors whose assets a finding type can evaluate.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`asset-vendor`,e=>_(e,`asset-vendor`,`text`)).option(`description`,{type:`string`,description:`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`}).option(`expression`,{type:`string`,description:"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters."}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 jo={command:`validate`,describe:`Validate a custom finding type`,builder:Ao,handler:async e=>u({command:`zero-trust casb finding-types validate`,classification:{safeFlags:[`applies-to-all-integrations`,`asset-vendor`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Validating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Validated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);e[`asset-class`]===void 0&&(e[`asset-class`]=await y(`asset-class`,`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`)),e[`asset-vendor`]===void 0&&(e[`asset-vendor`]=await b(`asset-vendor`,`Vendors whose assets a finding type can evaluate.`,[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.description===void 0&&(e.description=await y(`description`,`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`)),e.expression===void 0&&(e.expression=await y(`expression`,"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters.")),e.name===void 0&&(e.name=await y(`name`,`Human-readable name for the finding type. Maximum 256 characters.`)),e.severity===void 0&&(e.severity=await b(`severity`,`The severity level of a finding.`,[`Critical`,`High`,`Medium`,`Low`]));let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Validating`,async()=>n.send(Y,{body:u,account_id:a}));s(d,{successLabel:`Validated`})})},Mo={command:`finding-types`,describe:`Operations for casb.finding-types`,builder:e=>e.command(mo).command(_o).command(bo).command(Co).command(ko).command(jo).command(Do).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/export`,body:`json`,errors:{400:`BadRequestError`}};function No(e){return e.usage(`$0 zero-trust casb findings export
|
|
243
|
+
Update an existing custom finding type. **Immutable fields**: asset_vendor, asset_class, expression, and category cannot be changed after creation. **Security**: Only custom finding types (not system-managed) can be updated.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`description`,{type:`string`,description:`Optional description of the finding type. Cannot be empty if provided. Maximum 4096 characters.`}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Cannot be empty if provided. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 ko={command:`update <finding-type-id>`,describe:`Update a custom finding type`,builder:Oo,handler:async e=>u({command:`zero-trust casb finding-types update`,classification:{safeFlags:[`applies-to-all-integrations`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(J,{body:t,account_id:a,finding_type_id:e[`finding-type-id`]}));s(r,{successLabel:`Updated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Updating`,async()=>n.send(J,{body:u,account_id:a,finding_type_id:e[`finding-type-id`]}));s(d,{successLabel:`Updated`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/validate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Ao(e){return e.usage("$0 zero-trust casb finding-types validate\n\nCheck a candidate custom finding type without creating it, so problems can be corrected before publishing. The request body is the same shape as `CreateFindingType`, and the candidate is checked against the same rules, so a valid result means the definition itself is sound. It is not a reservation: a create can still be rejected for a reason that does not belong to the definition, such as the account already holding the maximum number of custom finding types. A candidate that fails validation is still a **200** with `result.valid: false` and one entry in `result.errors` per problem — that is the answer this endpoint exists to give. `4xx` is reserved for a request that could not be processed at all, such as a body that will not parse.").option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`asset-class`,{type:`string`,description:`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`}).option(`asset-vendor`,{type:`string`,description:`Vendors whose assets a finding type can evaluate.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`asset-vendor`,e=>_(e,`asset-vendor`,`text`)).option(`description`,{type:`string`,description:`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`}).option(`expression`,{type:`string`,description:"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters."}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 jo={command:`validate`,describe:`Validate a custom finding type`,builder:Ao,handler:async e=>u({command:`zero-trust casb finding-types validate`,classification:{safeFlags:[`applies-to-all-integrations`,`asset-vendor`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Validating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Validated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);e[`asset-class`]===void 0&&(e[`asset-class`]=await y(`asset-class`,`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`)),e[`asset-vendor`]===void 0&&(e[`asset-vendor`]=await b(`asset-vendor`,`Vendors whose assets a finding type can evaluate.`,[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.description===void 0&&(e.description=await y(`description`,`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`)),e.expression===void 0&&(e.expression=await y(`expression`,"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters.")),e.name===void 0&&(e.name=await y(`name`,`Human-readable name for the finding type. Maximum 256 characters.`)),e.severity===void 0&&(e.severity=await b(`severity`,`The severity level of a finding.`,[`Critical`,`High`,`Medium`,`Low`]));let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Validating`,async()=>n.send(Y,{body:u,account_id:a}));s(d,{successLabel:`Validated`})})},Mo={command:`finding-types`,describe:`Operations for casb.finding-types`,builder:e=>e.command(mo).command(_o).command(bo).command(Co).command(ko).command(jo).command(Do).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function No(e){return e.usage(`$0 zero-trust casb findings export
|
|
244
244
|
|
|
245
|
-
Creates a CSV export for findings and accepts optional filters in the payload.`).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see active items.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`severities`,{type:`string`,array:!0,description:`Filter by severity levels.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for findings export jobs.`})}const Po={command:`export`,describe:`Create new findings export request`,builder:No,handler:async e=>u({command:`zero-trust casb findings export`,classification:{safeFlags:[`ignored`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),severities:e.severities,vendors:e.vendors}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(X,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),severities:e.severities,vendors:e.vendors}),p=await l(`Loading`,async()=>n.send(X,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var Fo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function Io(e){return e.usage(`$0 zero-trust casb findings get <finding-id>
|
|
245
|
+
Creates a CSV export for findings and accepts optional filters in the payload.`).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see active items.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`product`,{type:`string`,description:`Filter by finding's category product.`,choices:[`SaaS`,`Cloud`]}).coerce(`product`,e=>_(e,`product`,`text`)).option(`search`,{type:`string`,description:`A search term.`}).option(`severities`,{type:`string`,array:!0,description:`Filter by severity levels.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for findings export jobs.`})}const Po={command:`export`,describe:`Create new findings export request`,builder:No,handler:async e=>u({command:`zero-trust casb findings export`,classification:{safeFlags:[`ignored`,`product`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),product:e.product,search:_(e.search,`search`,`text`),severities:e.severities,vendors:e.vendors}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(X,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),product:e.product,search:_(e.search,`search`,`text`),severities:e.severities,vendors:e.vendors}),p=await l(`Loading`,async()=>n.send(X,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var Fo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Io(e){return e.usage(`$0 zero-trust casb findings get <finding-id>
|
|
246
246
|
|
|
247
|
-
Gets a security Finding that has been identified as being problematic.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lo={command:`get <finding-id>`,describe:`Get a posture finding`,builder:Io,handler:async e=>u({command:`zero-trust casb findings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Fo,{account_id:a,finding_id:e[`finding-id`]}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/ignore`,body:`json`,errors:{400:`BadRequestError`}};function Ro(e){return e.usage(`$0 zero-trust casb findings ignore
|
|
247
|
+
Gets a security Finding that has been identified as being problematic.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lo={command:`get <finding-id>`,describe:`Get a posture finding`,builder:Io,handler:async e=>u({command:`zero-trust casb findings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Fo,{account_id:a,finding_id:e[`finding-id`]}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/ignore`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function Ro(e){return e.usage(`$0 zero-trust casb findings ignore
|
|
248
248
|
|
|
249
|
-
Given a list of findings, mark as ignored. Does nothing if Finding is already ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const zo={command:`ignore`,describe:`Mark a finding as ignored`,builder:Ro,handler:async e=>u({command:`zero-trust casb findings ignore`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings ignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/ignore`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({checks:e.checks}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=g({checks:e.checks}),d=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/archive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Bo(e){return e.usage(`$0 zero-trust casb findings instances archive <finding-id>
|
|
249
|
+
Given a list of findings, mark as ignored. Does nothing if Finding is already ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const zo={command:`ignore`,describe:`Mark a finding as ignored`,builder:Ro,handler:async e=>u({command:`zero-trust casb findings ignore`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings ignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/ignore`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({checks:e.checks}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=g({checks:e.checks}),d=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/archive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Bo(e){return e.usage(`$0 zero-trust casb findings instances archive <finding-id>
|
|
250
250
|
|
|
251
|
-
Archive one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Vo={command:`archive <finding-id>`,describe:`Archive a finding`,builder:Bo,handler:async e=>u({command:`zero-trust casb findings instances archive`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances archive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/archive`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({check_instances:e[`check-instances`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Q,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=g({check_instances:e[`check-instances`]}),d=await l(`Creating`,async()=>n.send(Q,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})};function Ho(e){return e.usage("$0 zero-trust casb findings instances export <finding-namespace-id>\n\nCreates a CSV export for Finding instances and accepts optional filters in the payload. Identify the finding as `<integration_id>-<finding_type_id>`: join the `integration.id` and `finding.id` of the finding (from the List posture findings response) with a hyphen.").positional(`finding-namespace-id`,{type:`string`,description:"Identifies the finding whose instances to export, in the form `<integration_id>-<finding_type_id>`. Take `integration.id` and `finding.id` from the finding in the List posture findings response and join them with a hyphen.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Filter for archived status.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for finding instance exports.`})}const Uo={command:`export <finding-namespace-id>`,describe:`Create a finding instances export`,builder:Ho,handler:async e=>u({command:`zero-trust casb findings instances export`,classification:{safeFlags:[`archived`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-namespace-id`]==null?`<finding-namespace-id>`:encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,pathParams:{"finding-namespace-id":String(e[`finding-namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({archived:e.archived,max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`)}):f(e.body)});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n(a,`POST`,`/accounts/${u}/data-security/posture/findings/${encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,{body:t}));s(r,{successLabel:`Loaded`});return}let p={};e.archived!==void 0&&h(p,[`archived`],e.archived),e[`max-affliction-date`]!==void 0&&h(p,[`max_affliction_date`],_(e[`max-affliction-date`],`max-affliction-date`,`text`)),e[`min-affliction-date`]!==void 0&&h(p,[`min_affliction_date`],_(e[`min-affliction-date`],`min-affliction-date`,`text`)),e.orders!==void 0&&h(p,[`orders`],d(e.orders,`orders`)),e.search!==void 0&&h(p,[`search`],_(e.search,`search`,`text`));let m=await l(`Loading`,async()=>n(a,`POST`,`/accounts/${u}/data-security/posture/findings/${encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,{body:p}));s(m,{successLabel:`Loaded`})})};var Wo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/${t.instance_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Go(e){return e.usage(`$0 zero-trust casb findings instances get <instance-id>
|
|
251
|
+
Archive one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Vo={command:`archive <finding-id>`,describe:`Archive a finding`,builder:Bo,handler:async e=>u({command:`zero-trust casb findings instances archive`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances archive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/archive`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({check_instances:e[`check-instances`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Q,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=g({check_instances:e[`check-instances`]}),d=await l(`Creating`,async()=>n.send(Q,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})};function Ho(e){return e.usage("$0 zero-trust casb findings instances export <finding-namespace-id>\n\nCreates a CSV export for Finding instances and accepts optional filters in the payload. Identify the finding as `<integration_id>-<finding_type_id>`: join the `integration.id` and `finding.id` of the finding (from the List posture findings response) with a hyphen.").positional(`finding-namespace-id`,{type:`string`,description:"Identifies the finding whose instances to export, in the form `<integration_id>-<finding_type_id>`. Take `integration.id` and `finding.id` from the finding in the List posture findings response and join them with a hyphen.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Filter for archived status.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for finding instance exports.`})}const Uo={command:`export <finding-namespace-id>`,describe:`Create a finding instances export`,builder:Ho,handler:async e=>u({command:`zero-trust casb findings instances export`,classification:{safeFlags:[`archived`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-namespace-id`]==null?`<finding-namespace-id>`:encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,pathParams:{"finding-namespace-id":String(e[`finding-namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({archived:e.archived,max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`)}):f(e.body)});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n(a,`POST`,`/accounts/${u}/data-security/posture/findings/${encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,{body:t}));s(r,{successLabel:`Loaded`});return}let p={};e.archived!==void 0&&h(p,[`archived`],e.archived),e[`max-affliction-date`]!==void 0&&h(p,[`max_affliction_date`],_(e[`max-affliction-date`],`max-affliction-date`,`text`)),e[`min-affliction-date`]!==void 0&&h(p,[`min_affliction_date`],_(e[`min-affliction-date`],`min-affliction-date`,`text`)),e.orders!==void 0&&h(p,[`orders`],d(e.orders,`orders`)),e.search!==void 0&&h(p,[`search`],_(e.search,`search`,`text`));let m=await l(`Loading`,async()=>n(a,`POST`,`/accounts/${u}/data-security/posture/findings/${encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,{body:p}));s(m,{successLabel:`Loaded`})})};var Wo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/${t.instance_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Go(e){return e.usage(`$0 zero-trust casb findings instances get <instance-id>
|
|
252
252
|
|
|
253
|
-
Gets a security Finding instance by id.`).positional(`instance-id`,{type:`string`,description:`A uuid ID identifying this Finding instance.`,demandOption:!0}).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ko={command:`get <instance-id>`,describe:`Get a finding instance using an instance ID`,builder:Go,handler:async e=>u({command:`zero-trust casb findings instances get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}`,pathParams:{"finding-id":String(e[`finding-id`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Wo,{account_id:a,finding_id:e[`finding-id`],instance_id:e[`instance-id`]}));s(u,{successLabel:`Loaded`})})};var qo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances`,query:[`archived`,`cursor`,`direction`,`max_affliction_date`,`min_affliction_date`,`order`,`page`,`per_page`,`search`,`remediation_statuses`,`finding_instance_ids`,`asset_ids`],joined:[`remediation_statuses`],errors:{400:`BadRequestError`,404:`NotFoundError`}};function Jo(e){return e.usage(`$0 zero-trust casb findings instances list
|
|
253
|
+
Gets a security Finding instance by id.`).positional(`instance-id`,{type:`string`,description:`A uuid ID identifying this Finding instance.`,demandOption:!0}).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ko={command:`get <instance-id>`,describe:`Get a finding instance using an instance ID`,builder:Go,handler:async e=>u({command:`zero-trust casb findings instances get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}`,pathParams:{"finding-id":String(e[`finding-id`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Wo,{account_id:a,finding_id:e[`finding-id`],instance_id:e[`instance-id`]}));s(u,{successLabel:`Loaded`})})};var qo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances`,query:[`archived`,`cursor`,`direction`,`max_affliction_date`,`min_affliction_date`,`order`,`page`,`per_page`,`search`,`remediation_statuses`,`finding_instance_ids`,`asset_ids`],joined:[`remediation_statuses`],errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Jo(e){return e.usage(`$0 zero-trust casb findings instances list
|
|
254
254
|
|
|
255
255
|
Lists all security finding instances for a given security finding.`).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Archived`}).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering the Finding's instances.
|
|
256
256
|
When ordering by 'remediation.status', only the most recent non-stale remediation job is considered. Stale jobs (created before the instance's affliction_date) are treated as having no status for ordering purposes.`,choices:[`affliction_date`,`asset.name`,`remediation.status`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`remediation-statuses`,{type:`string`,description:`Filter finding instances by most recent remediation job status. Supports multiple comma-separated values.
|
|
257
257
|
Use 'none' to filter instances with no remediation jobs or instances where the most recent job is stale.
|
|
258
|
-
Note: Stale jobs (created before the instance's affliction_date) are ignored for filtering purposes, but are still included in the 'remediations' array with stale=true.`}).option(`finding-instance-ids`,{type:`string`,description:`Filter finding instances by an array of finding instance IDs. Supports multiple comma-separated values.`}).option(`asset-ids`,{type:`string`,description:`Filter finding instances by an array of asset IDs. Supports multiple comma-separated values.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yo={command:`list`,describe:`List instances of a finding`,builder:Jo,handler:async e=>u({command:`zero-trust casb findings instances list`,classification:{safeFlags:[`archived`,`direction`,`order`,`dry-run`]}},e,async()=>{let n={archived:e.archived,cursor:e.cursor,direction:e.direction,max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],order:e.order,page:e.page,per_page:e[`per-page`],search:e.search,remediation_statuses:e[`remediation-statuses`],finding_instance_ids:e[`finding-instance-ids`],asset_ids:e[`asset-ids`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances`,pathParams:{"finding-id":String(e[`finding-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(qo,{account_id:u,finding_id:e[`finding-id`],...n}));s(d,{successLabel:`Loaded`})})};var Xo={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/unarchive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Zo(e){return e.usage(`$0 zero-trust casb findings instances unarchive <finding-id>
|
|
258
|
+
Note: Stale jobs (created before the instance's affliction_date) are ignored for filtering purposes, but are still included in the 'remediations' array with stale=true.`}).option(`finding-instance-ids`,{type:`string`,description:`Filter finding instances by an array of finding instance IDs. Supports multiple comma-separated values.`}).option(`asset-ids`,{type:`string`,description:`Filter finding instances by an array of asset IDs. Supports multiple comma-separated values.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yo={command:`list`,describe:`List instances of a finding`,builder:Jo,handler:async e=>u({command:`zero-trust casb findings instances list`,classification:{safeFlags:[`archived`,`direction`,`order`,`dry-run`]}},e,async()=>{let n={archived:e.archived,cursor:e.cursor,direction:e.direction,max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],order:e.order,page:e.page,per_page:e[`per-page`],search:e.search,remediation_statuses:e[`remediation-statuses`],finding_instance_ids:e[`finding-instance-ids`],asset_ids:e[`asset-ids`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances`,pathParams:{"finding-id":String(e[`finding-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(qo,{account_id:u,finding_id:e[`finding-id`],...n}));s(d,{successLabel:`Loaded`})})};var Xo={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/unarchive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Zo(e){return e.usage(`$0 zero-trust casb findings instances unarchive <finding-id>
|
|
259
259
|
|
|
260
|
-
Remove the archive marking from one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Qo={command:`unarchive <finding-id>`,describe:`Remove the archive marking from a finding instance`,builder:Zo,handler:async e=>u({command:`zero-trust casb findings instances unarchive`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances unarchive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/unarchive`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({check_instances:e[`check-instances`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Xo,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=g({check_instances:e[`check-instances`]}),d=await l(`Creating`,async()=>n.send(Xo,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})},$o={command:`instances`,describe:`Operations for casb.findings.instances`,builder:e=>e.command(Vo).command(Uo).command(Ko).command(Yo).command(Qo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var es={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings`,query:[`cursor`,`direction`,`ignored`,`integration_id`,`max_affliction_date`,`min_affliction_date`,`observation`,`order`,`page`,`per_page`,`product`,`search`,`severity`,`type`,`vendor`,`finding_type_ids`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function ts(e){return e.usage(`$0 zero-trust casb findings list
|
|
260
|
+
Remove the archive marking from one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Qo={command:`unarchive <finding-id>`,describe:`Remove the archive marking from a finding instance`,builder:Zo,handler:async e=>u({command:`zero-trust casb findings instances unarchive`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances unarchive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/unarchive`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({check_instances:e[`check-instances`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Xo,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=g({check_instances:e[`check-instances`]}),d=await l(`Creating`,async()=>n.send(Xo,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})},$o={command:`instances`,describe:`Operations for casb.findings.instances`,builder:e=>e.command(Vo).command(Uo).command(Ko).command(Yo).command(Qo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var es={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings`,query:[`cursor`,`direction`,`ignored`,`integration_id`,`max_affliction_date`,`min_affliction_date`,`observation`,`order`,`page`,`per_page`,`product`,`search`,`severity`,`type`,`vendor`,`finding_type_ids`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function ts(e){return e.usage(`$0 zero-trust casb findings list
|
|
261
261
|
|
|
262
|
-
List all security findings that have been identified as being problematic. This will return a list of findings regardless if they have been ignored or not.`).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see "active" items`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`observation`,{type:`string`,description:`Filter by observation type of the finding`,choices:[`Activity`,`Insight`,`Issue`]}).option(`order`,{type:`string`,description:`Which field to use when ordering the findings.`,choices:[`finding.name`,`instance_count`,`integration.name`,`latest_affliction_date`,`severity`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`product`,{type:`string`,description:`Filter by product category of the finding`,choices:[`Cloud`,`Saas`]}).option(`search`,{type:`string`,description:`A search term.`}).option(`severity`,{type:`string`,description:`Filter by severity`,choices:[`Critical`,`High`,`Medium`,`Low`]}).option(`type`,{type:`string`,description:`Filter by type of the finding`,choices:[`Content`,`Posture`]}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`finding-type-ids`,{type:`string`,description:`A comma separated list of UUIDs identifying the finding type(s).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ns={command:`list`,describe:`List posture findings`,builder:ts,handler:async e=>u({command:`zero-trust casb findings list`,classification:{safeFlags:[`direction`,`ignored`,`observation`,`order`,`product`,`severity`,`type`,`vendor`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,direction:e.direction,ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],observation:e.observation,order:e.order,page:e.page,per_page:e[`per-page`],product:e.product,search:e.search,severity:e.severity,type:e.type,vendor:e.vendor,finding_type_ids:e[`finding-type-ids`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb findings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/findings`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(es,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var rs={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/reset_finding_severity`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function is(e){return e.usage(`$0 zero-trust casb findings reset-severity <finding-id>
|
|
262
|
+
List all security findings that have been identified as being problematic. This will return a list of findings regardless if they have been ignored or not.`).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see "active" items`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`observation`,{type:`string`,description:`Filter by observation type of the finding`,choices:[`Activity`,`Insight`,`Issue`]}).option(`order`,{type:`string`,description:`Which field to use when ordering the findings.`,choices:[`finding.name`,`instance_count`,`integration.name`,`latest_affliction_date`,`severity`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`product`,{type:`string`,description:`Filter by product category of the finding`,choices:[`Cloud`,`Saas`]}).option(`search`,{type:`string`,description:`A search term.`}).option(`severity`,{type:`string`,description:`Filter by severity`,choices:[`Critical`,`High`,`Medium`,`Low`]}).option(`type`,{type:`string`,description:`Filter by type of the finding`,choices:[`Content`,`Posture`]}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`finding-type-ids`,{type:`string`,description:`A comma separated list of UUIDs identifying the finding type(s).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ns={command:`list`,describe:`List posture findings`,builder:ts,handler:async e=>u({command:`zero-trust casb findings list`,classification:{safeFlags:[`direction`,`ignored`,`observation`,`order`,`product`,`severity`,`type`,`vendor`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,direction:e.direction,ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],observation:e.observation,order:e.order,page:e.page,per_page:e[`per-page`],product:e.product,search:e.search,severity:e.severity,type:e.type,vendor:e.vendor,finding_type_ids:e[`finding-type-ids`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb findings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/findings`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(es,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var rs={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/reset_finding_severity`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function is(e){return e.usage(`$0 zero-trust casb findings reset-severity <finding-id>
|
|
263
263
|
|
|
264
|
-
If a Finding's severity has been changed, reset it back to default value. Does nothing if no override exists.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const as={command:`reset-severity <finding-id>`,describe:`Reset severity for a finding back to the default`,builder:is,handler:async e=>u({command:`zero-trust casb findings reset-severity`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings reset-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/reset_finding_severity`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(rs,{account_id:a,finding_id:e[`finding-id`]}));s(u,{successLabel:`Created`})})};var os={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/tune_finding_severity`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ss(e){return e.usage(`$0 zero-trust casb findings tune-severity <finding-id>
|
|
264
|
+
If a Finding's severity has been changed, reset it back to default value. Does nothing if no override exists.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const as={command:`reset-severity <finding-id>`,describe:`Reset severity for a finding back to the default`,builder:is,handler:async e=>u({command:`zero-trust casb findings reset-severity`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings reset-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/reset_finding_severity`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(rs,{account_id:a,finding_id:e[`finding-id`]}));s(u,{successLabel:`Created`})})};var os={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/tune_finding_severity`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ss(e){return e.usage(`$0 zero-trust casb findings tune-severity <finding-id>
|
|
265
265
|
|
|
266
|
-
Update the severity of a Finding. This will update the \`severity_override\` field on the Finding payload with the new severity value.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`new-severity`,{type:`number`,description:`The numeric severity value to apply to the finding.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a finding's severity.`})}const cs={command:`tune-severity <finding-id>`,describe:`Update the severity for a finding`,builder:ss,handler:async e=>u({command:`zero-trust casb findings tune-severity`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings tune-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/tune_finding_severity`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({new_severity:e[`new-severity`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(os,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`new-severity`]===void 0)throw Error(`--new-severity is required (or pass --body with this field set).`);let u=g({new_severity:e[`new-severity`]}),d=await l(`Creating`,async()=>n.send(os,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})};var ls={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/unignore`,body:`json`,errors:{400:`BadRequestError`}};function us(e){return e.usage(`$0 zero-trust casb findings unignore
|
|
266
|
+
Update the severity of a Finding. This will update the \`severity_override\` field on the Finding payload with the new severity value.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`new-severity`,{type:`number`,description:`The numeric severity value to apply to the finding.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a finding's severity.`})}const cs={command:`tune-severity <finding-id>`,describe:`Update the severity for a finding`,builder:ss,handler:async e=>u({command:`zero-trust casb findings tune-severity`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings tune-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/tune_finding_severity`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({new_severity:e[`new-severity`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(os,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`new-severity`]===void 0)throw Error(`--new-severity is required (or pass --body with this field set).`);let u=g({new_severity:e[`new-severity`]}),d=await l(`Creating`,async()=>n.send(os,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})};var ls={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/unignore`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function us(e){return e.usage(`$0 zero-trust casb findings unignore
|
|
267
267
|
|
|
268
268
|
Ability to un-ignore a Finding if it's previously been ignored. Does nothing if the Finding is not ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const ds={command:`unignore`,describe:`Remove ignore marker from a finding`,builder:us,handler:async e=>u({command:`zero-trust casb findings unignore`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings unignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/unignore`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({checks:e.checks}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(ls,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=g({checks:e.checks}),d=await l(`Creating`,async()=>n.send(ls,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},fs={command:`findings`,describe:`Operations for casb.findings`,builder:e=>e.command(Po).command(Lo).command(zo).command(ns).command(as).command(cs).command(ds).command($o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ps(e){return e.usage(`$0 zero-trust casb integrations create
|
|
269
269
|
|
|
@@ -279,35 +279,35 @@ Pauses an integration, stopping all crawlers.`).positional(`id`,{type:`string`,d
|
|
|
279
279
|
|
|
280
280
|
Resumes a paused integration, restarting crawlers.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ks={command:`resume <id>`,describe:`Resume integration`,builder:Os,handler:async e=>u({command:`zero-trust casb integrations resume`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations resume`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resume`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(Ds,{account_id:a,id:e.id}));s(u,{successLabel:`Created`})})};function As(e){return e.usage(`$0 zero-trust casb integrations update <id>
|
|
281
281
|
|
|
282
|
-
Updates an integration's name, permissions, DLP profiles, use cases, or credentials.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`credentials`,{type:`string`,description:`Partial credential fields to merge with existing. Provide as a JSON object or @path/to/file.json.`}).option(`dlp-profiles`,{type:`string`,array:!0,description:`List of DLP profile IDs to associate with the integration.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes granted to the integration.`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll (e.g., ['casb', 'ces', 'auto_remediation']).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Serializer for v2 integration PATCH requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const js={command:`update <id>`,describe:`Update integration`,builder:As,handler:async e=>u({command:`zero-trust casb integrations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({credentials:m(e.credentials,`credentials`),dlp_profiles:e[`dlp-profiles`],name:_(e.name,`name`,`text`),permissions:e.permissions,use_cases:e[`use-cases`]},[[`credentials`]]):f(e.body):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:t,headers:{"Content-Type":`text/plain;charset=UTF-8`}}));s(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:t}));s(r,{successLabel:`Updated`});return}let d={};e.credentials!==void 0&&h(d,[`credentials`],m(e.credentials,`credentials`)),e[`dlp-profiles`]!==void 0&&h(d,[`dlp_profiles`],e[`dlp-profiles`]),e.name!==void 0&&h(d,[`name`],_(e.name,`name`,`text`)),e.permissions!==void 0&&h(d,[`permissions`],e.permissions),e[`use-cases`]!==void 0&&h(d,[`use_cases`],e[`use-cases`]);let p=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:d}));s(p,{successLabel:`Updated`})})},Ms={command:`integrations`,describe:`Operations for casb.integrations`,builder:e=>e.command(ms).command(_s).command(bs).command(Cs).command(Es).command(ks).command(js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ns={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function Ps(e){return e.usage(`$0 zero-trust casb policies create
|
|
282
|
+
Updates an integration's name, permissions, DLP profiles, use cases, or credentials.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`credentials`,{type:`string`,description:`Partial credential fields to merge with existing. Provide as a JSON object or @path/to/file.json.`}).option(`dlp-profiles`,{type:`string`,array:!0,description:`List of DLP profile IDs to associate with the integration.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes granted to the integration.`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll (e.g., ['casb', 'ces', 'auto_remediation']).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Serializer for v2 integration PATCH requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const js={command:`update <id>`,describe:`Update integration`,builder:As,handler:async e=>u({command:`zero-trust casb integrations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({credentials:m(e.credentials,`credentials`),dlp_profiles:e[`dlp-profiles`],name:_(e.name,`name`,`text`),permissions:e.permissions,use_cases:e[`use-cases`]},[[`credentials`]]):f(e.body):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:t,headers:{"Content-Type":`text/plain;charset=UTF-8`}}));s(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:t}));s(r,{successLabel:`Updated`});return}let d={};e.credentials!==void 0&&h(d,[`credentials`],m(e.credentials,`credentials`)),e[`dlp-profiles`]!==void 0&&h(d,[`dlp_profiles`],e[`dlp-profiles`]),e.name!==void 0&&h(d,[`name`],_(e.name,`name`,`text`)),e.permissions!==void 0&&h(d,[`permissions`],e.permissions),e[`use-cases`]!==void 0&&h(d,[`use_cases`],e[`use-cases`]);let p=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:d}));s(p,{successLabel:`Updated`})})},Ms={command:`integrations`,describe:`Operations for casb.integrations`,builder:e=>e.command(ms).command(_s).command(bs).command(Cs).command(Es).command(ks).command(js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ns={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Ps(e){return e.usage(`$0 zero-trust casb policies create
|
|
283
283
|
|
|
284
|
-
Creates a new policy configuration that defines automated actions to be executed when security findings are detected. A policy can include multiple remediation and/or webhook actions that will be triggered automatically.`).option(`actions-remediation-types`,{type:`string`,description:`Remediation actions to execute (at most one). Provide as a JSON array of objects or @path/to/file.json.`}).option(`actions-webhook-configs`,{type:`string`,description:`Webhook actions to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`finding-type-id`,{type:`string`,description:`The finding type this policy is associated with. All remediation actions must match this finding type.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).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 a new policy configuration.`})}const Fs={command:`create`,describe:`Create a new policy configuration`,builder:Ps,handler:async e=>u({command:`zero-trust casb policies create`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,finding_type_id:_(e[`finding-type-id`],`finding-type-id`,`text`),integration_ids:e[`integration-ids`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Ns,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(e[`display-name`]===void 0&&(e[`display-name`]=await y(`display-name`,`Display name for the policy configuration.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e[`finding-type-id`]===void 0&&(e[`finding-type-id`]=await y(`finding-type-id`,`The finding type this policy is associated with. All remediation actions must match this finding type.`));let u=g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,finding_type_id:_(e[`finding-type-id`],`finding-type-id`,`text`),integration_ids:e[`integration-ids`]}),p=await l(`Creating`,async()=>n.send(Ns,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Is={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function Ls(e){return e.usage(`$0 zero-trust casb policies delete <policy-id>
|
|
284
|
+
Creates a new policy configuration that defines automated actions to be executed when security findings are detected. A policy can include multiple remediation and/or webhook actions that will be triggered automatically.`).option(`actions-remediation-types`,{type:`string`,description:`Remediation actions to execute (at most one). Provide as a JSON array of objects or @path/to/file.json.`}).option(`actions-webhook-configs`,{type:`string`,description:`Webhook actions to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`finding-type-id`,{type:`string`,description:`The finding type this policy is associated with. All remediation actions must match this finding type.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).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 a new policy configuration.`})}const Fs={command:`create`,describe:`Create a new policy configuration`,builder:Ps,handler:async e=>u({command:`zero-trust casb policies create`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,finding_type_id:_(e[`finding-type-id`],`finding-type-id`,`text`),integration_ids:e[`integration-ids`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Ns,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(e[`display-name`]===void 0&&(e[`display-name`]=await y(`display-name`,`Display name for the policy configuration.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e[`finding-type-id`]===void 0&&(e[`finding-type-id`]=await y(`finding-type-id`,`The finding type this policy is associated with. All remediation actions must match this finding type.`));let u=g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,finding_type_id:_(e[`finding-type-id`],`finding-type-id`,`text`),integration_ids:e[`integration-ids`]}),p=await l(`Creating`,async()=>n.send(Ns,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Is={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Ls(e){return e.usage(`$0 zero-trust casb policies delete <policy-id>
|
|
285
285
|
|
|
286
|
-
Deletes a policy configuration.`).positional(`policy-id`,{type:`string`,description:`A UUID identifying the policy.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Rs={command:`delete <policy-id>`,describe:`Delete a policy configuration`,builder:Ls,handler:async e=>u({command:`zero-trust casb policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(Is,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var zs={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function Bs(e){return e.usage(`$0 zero-trust casb policies get <policy-id>
|
|
286
|
+
Deletes a policy configuration.`).positional(`policy-id`,{type:`string`,description:`A UUID identifying the policy.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Rs={command:`delete <policy-id>`,describe:`Delete a policy configuration`,builder:Ls,handler:async e=>u({command:`zero-trust casb policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(Is,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var zs={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Bs(e){return e.usage(`$0 zero-trust casb policies get <policy-id>
|
|
287
287
|
|
|
288
|
-
Retrieves the details of a specific policy configuration, including its associated remediation and webhook actions.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy configuration to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vs={command:`get <policy-id>`,describe:`Get a policy configuration by ID`,builder:Bs,handler:async e=>u({command:`zero-trust casb policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(zs,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var Hs={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies`,query:[`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Us(e){return e.usage(`$0 zero-trust casb policies list
|
|
288
|
+
Retrieves the details of a specific policy configuration, including its associated remediation and webhook actions.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy configuration to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vs={command:`get <policy-id>`,describe:`Get a policy configuration by ID`,builder:Bs,handler:async e=>u({command:`zero-trust casb policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(zs,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var Hs={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies`,query:[`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Us(e){return e.usage(`$0 zero-trust casb policies list
|
|
289
289
|
|
|
290
|
-
Returns a list of integration-scoped policy configurations for the given account. This endpoint supports cursor based pagination. By default, results are returned in sorted order based on created_at.`).option(`cursor`,{type:`string`,description:"Cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ws={command:`list`,describe:`List policy configurations`,builder:Us,handler:async e=>u({command:`zero-trust casb policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/policies`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Hs,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Gs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function Ks(e){return e.usage(`$0 zero-trust casb policies update <policy-id>
|
|
290
|
+
Returns a list of integration-scoped policy configurations for the given account. This endpoint supports cursor based pagination. By default, results are returned in sorted order based on created_at.`).option(`cursor`,{type:`string`,description:"Cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ws={command:`list`,describe:`List policy configurations`,builder:Us,handler:async e=>u({command:`zero-trust casb policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/policies`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Hs,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Gs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Ks(e){return e.usage(`$0 zero-trust casb policies update <policy-id>
|
|
291
291
|
|
|
292
|
-
Updates an existing policy configuration and replaces its actions.`).positional(`policy-id`,{type:`string`,description:`Policy configuration ID`,demandOption:!0}).option(`actions-remediation-types`,{type:`string`,description:`Remediation actions to execute (at most one). Provide as a JSON array of objects or @path/to/file.json.`}).option(`actions-webhook-configs`,{type:`string`,description:`Webhook actions to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing policy configuration.`})}const qs={command:`update <policy-id>`,describe:`Update a policy configuration`,builder:Ks,handler:async e=>u({command:`zero-trust casb policies update`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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?g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,integration_ids:e[`integration-ids`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(Gs,{body:t,account_id:a,policy_id:e[`policy-id`]}));s(r,{successLabel:`Updated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(e[`display-name`]===void 0&&(e[`display-name`]=await y(`display-name`,`Display name for the policy configuration.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,integration_ids:e[`integration-ids`]}),p=await l(`Updating`,async()=>n.send(Gs,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(p,{successLabel:`Updated`})})},Js={command:`policies`,describe:`Operations for casb.policies`,builder:e=>e.command(Fs).command(Rs).command(Vs).command(Ws).command(qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ys={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function Xs(e){return e.usage(`$0 zero-trust casb remediations jobs create
|
|
292
|
+
Updates an existing policy configuration and replaces its actions.`).positional(`policy-id`,{type:`string`,description:`Policy configuration ID`,demandOption:!0}).option(`actions-remediation-types`,{type:`string`,description:`Remediation actions to execute (at most one). Provide as a JSON array of objects or @path/to/file.json.`}).option(`actions-webhook-configs`,{type:`string`,description:`Webhook actions to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing policy configuration.`})}const qs={command:`update <policy-id>`,describe:`Update a policy configuration`,builder:Ks,handler:async e=>u({command:`zero-trust casb policies update`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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?g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,integration_ids:e[`integration-ids`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(Gs,{body:t,account_id:a,policy_id:e[`policy-id`]}));s(r,{successLabel:`Updated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(e[`display-name`]===void 0&&(e[`display-name`]=await y(`display-name`,`Display name for the policy configuration.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,integration_ids:e[`integration-ids`]}),p=await l(`Updating`,async()=>n.send(Gs,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(p,{successLabel:`Updated`})})},Js={command:`policies`,describe:`Operations for casb.policies`,builder:e=>e.command(Fs).command(Rs).command(Vs).command(Ws).command(qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ys={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function Xs(e){return e.usage(`$0 zero-trust casb remediations jobs create
|
|
293
293
|
|
|
294
|
-
Create one or more remediation jobs tied to a specific Cloudflare Account.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`UUIDs identifying Finding Instances.`}).option(`remediation-type-id`,{type:`string`,description:`A UUID identifying this Remediation Type.`}).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 remediation jobs.`})}const Zs={command:`create`,describe:`Creates remediation jobs`,builder:Xs,handler:async e=>u({command:`zero-trust casb remediations jobs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({finding_instance_ids:e[`finding-instance-ids`],remediation_type_id:_(e[`remediation-type-id`],`remediation-type-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Ys,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);e[`remediation-type-id`]===void 0&&(e[`remediation-type-id`]=await y(`remediation-type-id`,`A UUID identifying this Remediation Type.`));let u=g({finding_instance_ids:e[`finding-instance-ids`],remediation_type_id:_(e[`remediation-type-id`],`remediation-type-id`,`text`)}),d=await l(`Creating`,async()=>n.send(Ys,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Qs={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs/export`,body:`json`,errors:{400:`BadRequestError`}};function $s(e){return e.usage(`$0 zero-trust casb remediations jobs export
|
|
294
|
+
Create one or more remediation jobs tied to a specific Cloudflare Account.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`UUIDs identifying Finding Instances.`}).option(`remediation-type-id`,{type:`string`,description:`A UUID identifying this Remediation Type.`}).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 remediation jobs.`})}const Zs={command:`create`,describe:`Creates remediation jobs`,builder:Xs,handler:async e=>u({command:`zero-trust casb remediations jobs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({finding_instance_ids:e[`finding-instance-ids`],remediation_type_id:_(e[`remediation-type-id`],`remediation-type-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Ys,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);e[`remediation-type-id`]===void 0&&(e[`remediation-type-id`]=await y(`remediation-type-id`,`A UUID identifying this Remediation Type.`));let u=g({finding_instance_ids:e[`finding-instance-ids`],remediation_type_id:_(e[`remediation-type-id`],`remediation-type-id`,`text`)}),d=await l(`Creating`,async()=>n.send(Ys,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Qs={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function $s(e){return e.usage(`$0 zero-trust casb remediations jobs export
|
|
295
295
|
|
|
296
|
-
Creates a CSV export for remediation jobs and accepts optional filters in the payload.`).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or before this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or after this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`status`,{type:`string`,array:!0,description:`Filter by remediation job status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for remediation jobs export.`})}const ec={command:`export`,describe:`Create a remediation jobs export`,builder:$s,handler:async e=>u({command:`zero-trust casb remediations jobs export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(Qs,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}),p=await l(`Loading`,async()=>n.send(Qs,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var tc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,query:[`cursor`,`page`,`per_page`,`search`,`min_updated_at`,`max_updated_at`,`status`,`triggered_by_actor`,`integration_id`,`order`,`direction`],joined:[`triggered_by_actor`],errors:{400:`BadRequestError`}};function nc(e){return e.usage("$0 zero-trust casb remediations jobs list\n\nList all remediation jobs tied to a specific Cloudflare Account. Note that `cursor` and `page` are mutually exclusive.").option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediations updated on or after the min updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediations updated on or before the max updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`status`,{type:`string`,description:`Filter to view remediations with the given status.`,choices:[`pending`,`processing`,`completed`,`failed`,`validating`]}).option(`triggered-by-actor`,{type:`string`,description:`Filter remediations by what kind of actor triggered them. Supports multiple comma-separated values.`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`order`,{type:`string`,description:`An optional param to sort the results by the given field.`,choices:[`created_at`,`affliction_date`,`integration_name`,`status`,`last_updated_at`,`asset_name`,`finding_type_name`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rc={command:`list`,describe:`List remediation jobs`,builder:nc,handler:async e=>u({command:`zero-trust casb remediations jobs list`,classification:{safeFlags:[`status`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,page:e.page,per_page:e[`per-page`],search:e.search,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],status:e.status,triggered_by_actor:e[`triggered-by-actor`],integration_id:e[`integration-id`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb remediations jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(tc,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ic={command:`jobs`,describe:`Operations for casb.remediations.jobs`,builder:e=>e.command(Zs).command(ec).command(rc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ac={command:`remediations`,describe:`Operations for casb.remediations`,builder:e=>e.command(ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,422:`UnprocessableEntityError`}};function sc(e){return e.usage(`$0 zero-trust casb webhooks create
|
|
296
|
+
Creates a CSV export for remediation jobs and accepts optional filters in the payload.`).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or before this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or after this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`status`,{type:`string`,array:!0,description:`Filter by remediation job status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for remediation jobs export.`})}const ec={command:`export`,describe:`Create a remediation jobs export`,builder:$s,handler:async e=>u({command:`zero-trust casb remediations jobs export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(Qs,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}),p=await l(`Loading`,async()=>n.send(Qs,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var tc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,query:[`cursor`,`page`,`per_page`,`search`,`min_updated_at`,`max_updated_at`,`status`,`triggered_by_actor`,`integration_id`,`order`,`direction`],joined:[`triggered_by_actor`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function nc(e){return e.usage("$0 zero-trust casb remediations jobs list\n\nList all remediation jobs tied to a specific Cloudflare Account. Note that `cursor` and `page` are mutually exclusive.").option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediations updated on or after the min updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediations updated on or before the max updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`status`,{type:`string`,description:`Filter to view remediations with the given status.`,choices:[`pending`,`processing`,`completed`,`failed`,`validating`]}).option(`triggered-by-actor`,{type:`string`,description:`Filter remediations by what kind of actor triggered them. Supports multiple comma-separated values.`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`order`,{type:`string`,description:`An optional param to sort the results by the given field.`,choices:[`created_at`,`affliction_date`,`integration_name`,`status`,`last_updated_at`,`asset_name`,`finding_type_name`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rc={command:`list`,describe:`List remediation jobs`,builder:nc,handler:async e=>u({command:`zero-trust casb remediations jobs list`,classification:{safeFlags:[`status`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,page:e.page,per_page:e[`per-page`],search:e.search,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],status:e.status,triggered_by_actor:e[`triggered-by-actor`],integration_id:e[`integration-id`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb remediations jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(tc,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ic={command:`jobs`,describe:`Operations for casb.remediations.jobs`,builder:e=>e.command(Zs).command(ec).command(rc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ac={command:`remediations`,describe:`Operations for casb.remediations`,builder:e=>e.command(ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`}};function sc(e){return e.usage(`$0 zero-trust casb webhooks create
|
|
297
297
|
|
|
298
|
-
Creates a new webhook configuration for sending finding notifications to external endpoints.`).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).coerce(`authentication-type`,e=>_(e,`authentication-type`,`text`)).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration. Defaults to enabled when omitted.`,choices:[`enabled`,`disabled`],default:`enabled`}).coerce(`status`,e=>_(e,`status`,`text`)).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 a new webhook configuration.`})}const cc={command:`create`,describe:`Create a new webhook configuration`,builder:sc,handler:async e=>u({command:`zero-trust casb webhooks create`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}):f(e.body),sensitiveBodyPaths:[[`signing_secret`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(oc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`authentication-type`]===void 0&&(e[`authentication-type`]=await b(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),e.label===void 0&&(e.label=await y(`label`,`Account-specified display label for the webhook configuration.`));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}),p=await l(`Creating`,async()=>n.send(oc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var lc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,409:`ConflictError`}};function uc(e){return e.usage(`$0 zero-trust casb webhooks delete <webhook-id>
|
|
298
|
+
Creates a new webhook configuration for sending finding notifications to external endpoints.`).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).coerce(`authentication-type`,e=>_(e,`authentication-type`,`text`)).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration. Defaults to enabled when omitted.`,choices:[`enabled`,`disabled`],default:`enabled`}).coerce(`status`,e=>_(e,`status`,`text`)).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 a new webhook configuration.`})}const cc={command:`create`,describe:`Create a new webhook configuration`,builder:sc,handler:async e=>u({command:`zero-trust casb webhooks create`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}):f(e.body),sensitiveBodyPaths:[[`signing_secret`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(oc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`authentication-type`]===void 0&&(e[`authentication-type`]=await b(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),e.label===void 0&&(e.label=await y(`label`,`Account-specified display label for the webhook configuration.`));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}),p=await l(`Creating`,async()=>n.send(oc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var lc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function uc(e){return e.usage(`$0 zero-trust casb webhooks delete <webhook-id>
|
|
299
299
|
|
|
300
|
-
Soft deletes a webhook configuration by its unique identifier. The webhook will be marked as deleted and will no longer be available for use.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,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 dc={command:`delete <webhook-id>`,describe:`Delete a webhook configuration`,builder:uc,handler:async e=>u({command:`zero-trust casb webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(lc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Deleted`})})};var fc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}/evaluate`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function pc(e){return e.usage(`$0 zero-trust casb webhooks evaluate-existing <webhook-id>
|
|
300
|
+
Soft deletes a webhook configuration by its unique identifier. The webhook will be marked as deleted and will no longer be available for use.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,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 dc={command:`delete <webhook-id>`,describe:`Delete a webhook configuration`,builder:uc,handler:async e=>u({command:`zero-trust casb webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(lc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Deleted`})})};var fc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}/evaluate`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function pc(e){return e.usage(`$0 zero-trust casb webhooks evaluate-existing <webhook-id>
|
|
301
301
|
|
|
302
|
-
Sends a test webhook event using an existing webhook configuration. This allows customers to verify their webhook endpoint is still reachable and properly configured after creating the webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mc={command:`evaluate-existing <webhook-id>`,describe:`Test an existing webhook configuration`,builder:pc,handler:async e=>u({command:`zero-trust casb webhooks evaluate-existing`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks evaluate-existing`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}/evaluate`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(fc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Created`})})};var hc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/evaluate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function gc(e){return e.usage(`$0 zero-trust casb webhooks evaluate
|
|
302
|
+
Sends a test webhook event using an existing webhook configuration. This allows customers to verify their webhook endpoint is still reachable and properly configured after creating the webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mc={command:`evaluate-existing <webhook-id>`,describe:`Test an existing webhook configuration`,builder:pc,handler:async e=>u({command:`zero-trust casb webhooks evaluate-existing`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks evaluate-existing`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}/evaluate`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(fc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Created`})})};var hc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/evaluate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function gc(e){return e.usage(`$0 zero-trust casb webhooks evaluate
|
|
303
303
|
|
|
304
|
-
Sends a test webhook event to the specified destination URL to verify the webhook endpoint is reachable and properly configured. This allows customers to validate their webhook configuration before creating the actual webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).option(`authentication-type`,{type:`string`,description:`Type of authentication to use for the test webhook request.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).coerce(`authentication-type`,e=>_(e,`authentication-type`,`text`)).option(`destination-url`,{type:`string`,description:`Target URL to send the test webhook event to.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in the test webhook request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for testing a webhook configuration before creating it.`})}const _c={command:`evaluate`,describe:`Test a webhook configuration before creating it`,builder:gc,handler:async e=>u({command:`zero-trust casb webhooks evaluate`,classification:{safeFlags:[`authentication-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/evaluate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`)}):f(e.body),sensitiveBodyPaths:[[`signing_secret`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(hc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`authentication-type`]===void 0&&(e[`authentication-type`]=await b(`authentication-type`,`Type of authentication to use for the test webhook request.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL to send the test webhook event to.`));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`)}),p=await l(`Creating`,async()=>n.send(hc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var vc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function yc(e){return e.usage(`$0 zero-trust casb webhooks get <webhook-id>
|
|
304
|
+
Sends a test webhook event to the specified destination URL to verify the webhook endpoint is reachable and properly configured. This allows customers to validate their webhook configuration before creating the actual webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).option(`authentication-type`,{type:`string`,description:`Type of authentication to use for the test webhook request.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).coerce(`authentication-type`,e=>_(e,`authentication-type`,`text`)).option(`destination-url`,{type:`string`,description:`Target URL to send the test webhook event to.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in the test webhook request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for testing a webhook configuration before creating it.`})}const _c={command:`evaluate`,describe:`Test a webhook configuration before creating it`,builder:gc,handler:async e=>u({command:`zero-trust casb webhooks evaluate`,classification:{safeFlags:[`authentication-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/evaluate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`)}):f(e.body),sensitiveBodyPaths:[[`signing_secret`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(hc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`authentication-type`]===void 0&&(e[`authentication-type`]=await b(`authentication-type`,`Type of authentication to use for the test webhook request.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL to send the test webhook event to.`));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`)}),p=await l(`Creating`,async()=>n.send(hc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var vc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function yc(e){return e.usage(`$0 zero-trust casb webhooks get <webhook-id>
|
|
305
305
|
|
|
306
|
-
Retrieves a specific webhook configuration by its unique identifier.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bc={command:`get <webhook-id>`,describe:`Get webhook configuration by ID`,builder:yc,handler:async e=>u({command:`zero-trust casb webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Loaded`})})};var xc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/jobs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function Sc(e){return e.usage(`$0 zero-trust casb webhooks jobs create
|
|
306
|
+
Retrieves a specific webhook configuration by its unique identifier.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bc={command:`get <webhook-id>`,describe:`Get webhook configuration by ID`,builder:yc,handler:async e=>u({command:`zero-trust casb webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Loaded`})})};var xc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/jobs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Sc(e){return e.usage(`$0 zero-trust casb webhooks jobs create
|
|
307
307
|
|
|
308
|
-
Creates webhook jobs to send a finding instance to one or more configured webhooks.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`Array of finding instance IDs to send to the webhooks.`}).option(`webhook-ids`,{type:`string`,array:!0,description:`Array of webhook IDs to trigger jobs for.`}).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 up to 100 webhook jobs. The number of jobs is the product of webhook_ids and finding_instance_ids.`})}const Cc={command:`create`,describe:`Create webhook jobs`,builder:Sc,handler:async e=>u({command:`zero-trust casb webhooks jobs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({finding_instance_ids:e[`finding-instance-ids`],webhook_ids:e[`webhook-ids`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(xc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);if(e[`webhook-ids`]===void 0)throw Error(`--webhook-ids is required (or pass --body with this field set).`);let u=g({finding_instance_ids:e[`finding-instance-ids`],webhook_ids:e[`webhook-ids`]}),d=await l(`Creating`,async()=>n.send(xc,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},wc={command:`jobs`,describe:`Operations for casb.webhooks.jobs`,builder:e=>e.command(Cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Tc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`}};function Ec(e){return e.usage(`$0 zero-trust casb webhooks list
|
|
308
|
+
Creates webhook jobs to send a finding instance to one or more configured webhooks.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`Array of finding instance IDs to send to the webhooks.`}).option(`webhook-ids`,{type:`string`,array:!0,description:`Array of webhook IDs to trigger jobs for.`}).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 up to 100 webhook jobs. The number of jobs is the product of webhook_ids and finding_instance_ids.`})}const Cc={command:`create`,describe:`Create webhook jobs`,builder:Sc,handler:async e=>u({command:`zero-trust casb webhooks jobs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({finding_instance_ids:e[`finding-instance-ids`],webhook_ids:e[`webhook-ids`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(xc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);if(e[`webhook-ids`]===void 0)throw Error(`--webhook-ids is required (or pass --body with this field set).`);let u=g({finding_instance_ids:e[`finding-instance-ids`],webhook_ids:e[`webhook-ids`]}),d=await l(`Creating`,async()=>n.send(xc,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},wc={command:`jobs`,describe:`Operations for casb.webhooks.jobs`,builder:e=>e.command(Cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Tc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Ec(e){return e.usage(`$0 zero-trust casb webhooks list
|
|
309
309
|
|
|
310
|
-
Retrieves all webhook configurations for the authenticated account. Returns an array of webhook configurations that can be used to send finding notifications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dc={command:`list`,describe:`List webhook configurations`,builder:Ec,handler:async e=>u({command:`zero-trust casb webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust casb webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Tc,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Oc={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function kc(e){return e.usage(`$0 zero-trust casb webhooks update <webhook-id>
|
|
310
|
+
Retrieves all webhook configurations for the authenticated account. Returns an array of webhook configurations that can be used to send finding notifications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dc={command:`list`,describe:`List webhook configurations`,builder:Ec,handler:async e=>u({command:`zero-trust casb webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust casb webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Tc,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Oc={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function kc(e){return e.usage(`$0 zero-trust casb webhooks update <webhook-id>
|
|
311
311
|
|
|
312
312
|
Updates an existing webhook configuration with new settings.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).coerce(`authentication-type`,e=>_(e,`authentication-type`,`text`)).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration.`,choices:[`enabled`,`disabled`]}).coerce(`status`,e=>_(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing webhook configuration.`})}const Ac={command:`update <webhook-id>`,describe:`Update an existing webhook configuration`,builder:kc,handler:async e=>u({command:`zero-trust casb webhooks update`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}):f(e.body),sensitiveBodyPaths:[[`signing_secret`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(Oc,{body:t,account_id:a,webhook_id:e[`webhook-id`]}));s(r,{successLabel:`Updated`});return}e[`authentication-type`]===void 0&&(e[`authentication-type`]=await b(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),e.label===void 0&&(e.label=await y(`label`,`Account-specified display label for the webhook configuration.`)),e.status===void 0&&(e.status=await b(`status`,`Status of the webhook configuration.`,[`enabled`,`disabled`]));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}),p=await l(`Updating`,async()=>n.send(Oc,{body:u,account_id:a,webhook_id:e[`webhook-id`]}));s(p,{successLabel:`Updated`})})},jc={command:`webhooks`,describe:`Operations for casb.webhooks`,builder:e=>e.command(cc).command(dc).command(_c).command(mc).command(bc).command(Dc).command(Ac).command(wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mc={command:`casb`,describe:`Operations for casb`,builder:e=>e.command(Ga).command(Qa).command(io).command(fo).command(Mo).command(fs).command(Ms).command(Js).command(ac).command(jc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Nc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/zerotrust/connectivity_settings`,body:`json`};function Pc(e){return e.usage(`$0 zero-trust connectivity-settings edit
|
|
313
313
|
|