cf 1.0.0-beta.20 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_meta/commands.json +911 -751
- package/dist/_meta/schemas.json +401 -382
- package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
- package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
- package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
- package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
- package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
- package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
- package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
- package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
- package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
- package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
- package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
- package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
- package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
- package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
- package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
- package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
- package/dist/args-BAOHroBC.mjs +2 -0
- package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
- package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
- package/dist/auth-B0lEsD_1.mjs +2 -0
- package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
- package/dist/auth-BtZmY6sE.mjs +2 -0
- package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
- package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
- package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
- package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
- package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
- package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
- package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
- package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
- package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
- package/dist/build-BqGmiORA.mjs +2 -0
- package/dist/build-CWlpWVBf.mjs +2 -0
- package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
- package/dist/cache-Bme_d2Wx.mjs +36 -0
- package/dist/cf-fIBhEAxU.mjs +18 -0
- package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
- package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
- package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
- package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
- package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
- package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
- package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
- package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
- package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
- package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
- package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
- package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
- package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
- package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
- package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
- package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
- package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
- package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
- package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
- package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
- package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
- package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
- package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
- package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
- package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
- package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
- package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
- package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
- package/dist/containers-CzAZfmnj.mjs +380 -0
- package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
- package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
- package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
- package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
- package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
- package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
- package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
- package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
- package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
- package/dist/delegate-D7yYckA4.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
- package/dist/deploy-context-Do89WayB.mjs +56 -0
- package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
- package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
- package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
- package/dist/dialog-D5lus4M4.mjs +2 -0
- package/dist/discover-6kAmVMPp.mjs +2 -0
- package/dist/discover-C06Syc2B.mjs +2 -0
- package/dist/dist-BtzWfAjU.mjs +453 -0
- package/dist/dls-ClWVxTBg.mjs +16 -0
- package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
- package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
- package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
- package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
- package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
- package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
- package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
- package/dist/email-domains-1rD1d84O.mjs +12 -0
- package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
- package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
- package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
- package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
- package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
- package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
- package/dist/flagship-D3v6iDdw.mjs +24 -0
- package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
- package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
- package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
- package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
- package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
- package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
- package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
- package/dist/index.mjs +1 -1
- package/dist/init-CVx0Ya1E.mjs +43 -0
- package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
- package/dist/interactive-CHcvofEp.mjs +2 -0
- package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
- package/dist/interactive-wQM7Blhm.mjs +2 -0
- package/dist/internal-5cnlw9mH.mjs +4 -0
- package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
- package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
- package/dist/kv-CCem2sEY.mjs +12 -0
- package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
- package/dist/live-BhHzxFna.mjs +4 -0
- package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
- package/dist/local-CAs8RWYW.mjs +2 -0
- package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
- package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
- package/dist/log-BWdaOGOW.mjs +66 -0
- package/dist/log-DZfik9Jk.mjs +2 -0
- package/dist/login-BTiflOun.mjs +2 -0
- package/dist/login-Buhvx6Fi.mjs +5 -0
- package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
- package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
- package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
- package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
- package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
- package/dist/managed-defense-CtFLuvuB.mjs +18 -0
- package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
- package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
- package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
- package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
- package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
- package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
- package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
- package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
- package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
- package/dist/oauth-D_A8AcIS.mjs +4 -0
- package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
- package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
- package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
- package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
- package/dist/output-BJEgbI0G.mjs +2 -0
- package/dist/package-BqSbnt6u.mjs +2 -0
- package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
- package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
- package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
- package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
- package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
- package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
- package/dist/previews-DnZbUTym.mjs +6 -0
- package/dist/progress-CtGsPOpV.mjs +2 -0
- package/dist/prompt-YrI7ltMa.mjs +4 -0
- package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
- package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
- package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
- package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
- package/dist/ready-Cok0aqke.mjs +4 -0
- package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
- package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
- package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
- package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
- package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
- package/dist/request-headers-KhW_hy36.mjs +2 -0
- package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
- package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
- package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
- package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
- package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
- package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
- package/dist/run-Be6Js7D6.mjs +2 -0
- package/dist/run-DnZGQbq_.mjs +2 -0
- package/dist/sanitization-DkVWMHkc.mjs +2 -0
- package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
- package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
- package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
- package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
- package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
- package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
- package/dist/session-6xqrJWXy.mjs +2 -0
- package/dist/shared-DYRRG9A-.mjs +2 -0
- package/dist/signed-url-Ce0muRem.mjs +4 -0
- package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
- package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
- package/dist/spawn-BAEdy9kS.mjs +5 -0
- package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
- package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
- package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
- package/dist/src-COwxoocl.mjs +2 -0
- package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
- package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
- package/dist/startup-profile-CZYtQziF.mjs +2 -0
- package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
- package/dist/state-B3Uy1jPX.mjs +2 -0
- package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
- package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
- package/dist/tags-BP25qydR.mjs +22 -0
- package/dist/telemetry-CvZean4s.mjs +2 -0
- package/dist/telemetry-DKSJSLtq.mjs +2 -0
- package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
- package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
- package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
- package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
- package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
- package/dist/ui-Bo6DCvbS.mjs +2 -0
- package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
- package/dist/update-check-C7mfEeQ7.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
- package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
- package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
- package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
- package/dist/version-DmTuWNZ5.mjs +2 -0
- package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
- package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
- package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
- package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
- package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
- package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
- package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
- package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
- package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
- package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
- package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
- package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
- package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
- package/package.json +12 -12
- package/dist/auth-CdEGiJ5Y.mjs +0 -2
- package/dist/auth-DF_ml7rE.mjs +0 -2
- package/dist/build-BJHRK6qE.mjs +0 -2
- package/dist/build-D7s3a8zW.mjs +0 -2
- package/dist/cache-CDPUUv_O.mjs +0 -45
- package/dist/cf-3vj8dGYz.mjs +0 -18
- package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
- package/dist/containers-CcZHRM9g.mjs +0 -376
- package/dist/delegate-Tgfxa-MZ.mjs +0 -2
- package/dist/deploy-context-DIAl408H.mjs +0 -56
- package/dist/dialog-BnIgdgWi.mjs +0 -2
- package/dist/discover-DEjUARkU.mjs +0 -2
- package/dist/discover-P20XeGBF.mjs +0 -2
- package/dist/dist-CX6dDtzj.mjs +0 -449
- package/dist/dist-DAeCUX-u.mjs +0 -60
- package/dist/dls-CMTrCDjZ.mjs +0 -17
- package/dist/flagship-geGDHp9H.mjs +0 -28
- package/dist/init-C08hBFYn.mjs +0 -43
- package/dist/interactive-pjVqirHx.mjs +0 -2
- package/dist/kv-Cd8vbPWK.mjs +0 -15
- package/dist/local-CFZtOOxg.mjs +0 -2
- package/dist/log-CRbgNbDp.mjs +0 -3
- package/dist/login-C3Bahro9.mjs +0 -5
- package/dist/login-DvsRxI3E.mjs +0 -2
- package/dist/logo-matches-jeNkUxAq.mjs +0 -6
- package/dist/logos-pxN5aumY.mjs +0 -7
- package/dist/managed-defense-C_KLy4oB.mjs +0 -18
- package/dist/matches-DnjBnG-Y.mjs +0 -6
- package/dist/oauth-Cf3-g-kk.mjs +0 -4
- package/dist/output-CpiIVa7Q.mjs +0 -2
- package/dist/previews-oHUiD54J.mjs +0 -7
- package/dist/progress-B1dpmxCT.mjs +0 -2
- package/dist/prompt-Y5OBwDVE.mjs +0 -4
- package/dist/queries-CS0sYfte.mjs +0 -9
- package/dist/request-headers-Bg8_Idw3.mjs +0 -2
- package/dist/run-0EozpORq.mjs +0 -2
- package/dist/run-DKg70Sqf.mjs +0 -2
- package/dist/session-3DgztoAI.mjs +0 -2
- package/dist/shared-o8saqcSK.mjs +0 -2
- package/dist/source-AlTrHNem.mjs +0 -6
- package/dist/spawn-BZd__5sj.mjs +0 -10
- package/dist/startup-profile-DJsOtbVN.mjs +0 -2
- package/dist/state-Dvzl3aSj.mjs +0 -2
- package/dist/submit-wJYcQB8d.mjs +0 -4
- package/dist/tags-BwFKjaOr.mjs +0 -23
- package/dist/telemetry-BczXOpQn.mjs +0 -2
- package/dist/telemetry-CE15pfOU.mjs +0 -2
- package/dist/ui-CBhKUPys.mjs +0 -2
- package/dist/update-check-C3RhhXja.mjs +0 -2
- package/dist/url-info-By6VD20A.mjs +0 -4
- package/dist/version-izjB0Yrl.mjs +0 -2
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.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-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.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-YrI7ltMa.mjs";import{n as ee,t as te}from"./raw-fetch-BE3QgdTE.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
|
|
|
6
|
-
Deletes an application from Access.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const se={command:`delete <app-id>`,describe:`Delete an Access application`,builder:oe,handler:async e=>u({command:`zero-trust access applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force})){
|
|
7
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(ae,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var ce={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`};function le(e){return e.usage(`$0 zero-trust access applications get <app-id>
|
|
6
|
+
Deletes an application from Access.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const se={command:`delete <app-id>`,describe:`Delete an Access application`,builder:oe,handler:async e=>u({command:`zero-trust access applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(ae,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var ce={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`};function le(e){return e.usage(`$0 zero-trust access applications get <app-id>
|
|
8
7
|
|
|
9
8
|
Fetches information about an Access application.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <app-id>`,describe:`Get an Access application`,builder:le,handler:async e=>u({command:`zero-trust access applications get`,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 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(ce,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Loaded`})})};var de={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps`,query:[`name`,`domain`,`aud`,`target_attributes`,`exact`,`search`,`page`,`per_page`]};function fe(e){return e.usage(`$0 zero-trust access applications list
|
|
10
9
|
|
|
@@ -18,15 +17,13 @@ Fetches the current status of a given Access policy test.`).positional(`policy-t
|
|
|
18
17
|
|
|
19
18
|
Fetches a single page of user results from an Access policy test.`).option(`policy-test-id`,{type:`string`,description:`The UUID of the policy test.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`status`,{type:`string`,description:`Filter users by their policy evaluation status.`,choices:[`success`,`fail`,`error`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`list`,describe:`Get an Access policy test users page`,builder:Te,handler:async e=>u({command:`zero-trust access applications policy-tests users 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 t=await i();c({command:`cf zero-trust access applications policy-tests users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policy-tests/${e[`policy-test-id`]==null?`<policy-test-id>`:encodeURIComponent(String(e[`policy-test-id`]))}/users`,pathParams:{"policy-test-id":String(e[`policy-test-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(we,{account_id:u,policy_test_id:e[`policy-test-id`],...n}));s(d,{successLabel:`Loaded`})})},De={command:`users`,describe:`Operations for access.applications.policy-tests.users`,builder:e=>e.command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oe={command:`policy-tests`,describe:`Operations for access.applications.policy-tests`,builder:e=>e.command(be).command(Ce).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ke={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/revoke_tokens`};function Ae(e){return e.usage(`$0 zero-trust access applications revoke-tokens <app-id>
|
|
20
19
|
|
|
21
|
-
Revokes all tokens issued for an application.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const je={command:`revoke-tokens <app-id>`,describe:`Revoke application tokens`,builder:Ae,handler:async e=>u({command:`zero-trust access applications revoke-tokens`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 revoke-tokens`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/revoke_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force,message:`This operation invalidates every service token for the app.`})){
|
|
22
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(ke,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var Me={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/settings`,body:`json`};function Ne(e){return e.usage(`$0 zero-trust access applications settings update <app-id>
|
|
20
|
+
Revokes all tokens issued for an application.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const je={command:`revoke-tokens <app-id>`,describe:`Revoke application tokens`,builder:Ae,handler:async e=>u({command:`zero-trust access applications revoke-tokens`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 revoke-tokens`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/revoke_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force,message:`This operation invalidates every service token for the app.`}))return;let f=await l(`Deleting`,async()=>n.send(ke,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var Me={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/settings`,body:`json`};function Ne(e){return e.usage(`$0 zero-trust access applications settings update <app-id>
|
|
23
21
|
|
|
24
22
|
Updates Access application settings.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`allow-iframe`,{type:`boolean`,description:`Enables loading application content in an iFrame.`}).option(`skip-interstitial`,{type:`boolean`,description:`Enables automatic authentication through cloudflared.`}).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 Pe={command:`update <app-id>`,describe:`Update Access application settings`,builder:Ne,handler:async e=>u({command:`zero-trust access applications settings update`,classification:{safeFlags:[`allow-iframe`,`skip-interstitial`,`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 settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({allow_iframe:e[`allow-iframe`],skip_interstitial:e[`skip-interstitial`]}):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(`Updating`,async()=>n.send(Me,{body:t,account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(r,{successLabel:`Updated`});return}let p=g({allow_iframe:e[`allow-iframe`],skip_interstitial:e[`skip-interstitial`]}),m=await l(`Updating`,async()=>n.send(Me,{body:p,account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(m,{successLabel:`Updated`})})},Fe={command:`settings`,describe:`Operations for access.applications.settings`,builder:e=>e.command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ie={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function Le(e){return e.usage(`$0 zero-trust access applications short-lived-certificates create <app-id>
|
|
25
23
|
|
|
26
24
|
Generates a new short-lived certificate CA and public key.`).positional(`app-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`create <app-id>`,describe:`Create a short-lived certificate CA`,builder:Le,handler:async e=>u({command:`zero-trust access applications short-lived-certificates 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 short-lived-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Creating`,async()=>n.send(Ie,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Created`})})};var ze={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function Be(e){return e.usage(`$0 zero-trust access applications short-lived-certificates delete <app-id>
|
|
27
25
|
|
|
28
|
-
Deletes a short-lived certificate CA.`).positional(`app-id`,{type:`string`,description:`UUID.`,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 Ve={command:`delete <app-id>`,describe:`Delete a short-lived certificate CA`,builder:Be,handler:async e=>u({command:`zero-trust access applications short-lived-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 short-lived-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force})){
|
|
29
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(ze,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var He={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function Ue(e){return e.usage(`$0 zero-trust access applications short-lived-certificates get <app-id>
|
|
26
|
+
Deletes a short-lived certificate CA.`).positional(`app-id`,{type:`string`,description:`UUID.`,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 Ve={command:`delete <app-id>`,describe:`Delete a short-lived certificate CA`,builder:Be,handler:async e=>u({command:`zero-trust access applications short-lived-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 short-lived-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(ze,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var He={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function Ue(e){return e.usage(`$0 zero-trust access applications short-lived-certificates get <app-id>
|
|
30
27
|
|
|
31
28
|
Fetches a short-lived certificate CA and its public key.`).positional(`app-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const We={command:`get <app-id>`,describe:`Get a short-lived certificate CA`,builder:Ue,handler:async e=>u({command:`zero-trust access applications short-lived-certificates get`,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 short-lived-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});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();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(He,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Loaded`})})};var Ge={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/ca`,query:[`page`,`per_page`]};function Ke(e){return e.usage(`$0 zero-trust access applications short-lived-certificates list
|
|
32
29
|
|
|
@@ -38,8 +35,7 @@ Tests if a specific user has permission to access an application.`).option(`app-
|
|
|
38
35
|
|
|
39
36
|
Create a custom page`).option(`app-count`,{type:`number`,description:`Number of apps the custom page is assigned to.`}).option(`contract-version`,{type:`number`,description:`Contract version of the page's Liquid template. Present (>= 1) marks a sanitized template; absent or 0 marks a legacy page served verbatim.`}).option(`created-at`,{type:`string`,description:`The created_at field`}).option(`custom-html`,{type:`string`,description:`Custom page HTML.`}).option(`name`,{type:`string`,description:`Custom page name.`}).option(`type`,{type:`string`,description:`Custom page type.`,choices:[`identity_denied`,`forbidden`,`login`,`interstitial`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`uid`,{type:`string`,description:`UUID.`}).option(`updated-at`,{type:`string`,description:`The updated_at field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const at={command:`create`,describe:`Create a custom page`,builder:it,handler:async e=>u({command:`zero-trust access custom-pages create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access custom-pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({app_count:e[`app-count`],contract_version:e[`contract-version`],created_at:_(e[`created-at`],`created-at`,`text`),custom_html:_(e[`custom-html`],`custom-html`,`text`),name:_(e.name,`name`,`text`),type:e.type,uid:_(e.uid,`uid`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`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(rt,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`custom-html`]===void 0&&(e[`custom-html`]=await y(`custom-html`,`Custom page HTML.`)),e.name===void 0&&(e.name=await y(`name`,`Custom page name.`)),e.type===void 0&&(e.type=await b(`type`,`Custom page type.`,[`identity_denied`,`forbidden`,`login`,`interstitial`]));let u=g({app_count:e[`app-count`],contract_version:e[`contract-version`],created_at:_(e[`created-at`],`created-at`,`text`),custom_html:_(e[`custom-html`],`custom-html`,`text`),name:_(e.name,`name`,`text`),type:e.type,uid:_(e.uid,`uid`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`text`)}),d=await l(`Creating`,async()=>n.send(rt,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ot={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/${t.custom_page_id}`};function st(e){return e.usage(`$0 zero-trust access custom-pages delete <custom-page-id>
|
|
40
37
|
|
|
41
|
-
Delete a custom page`).positional(`custom-page-id`,{type:`string`,description:`UUID.`,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 ct={command:`delete <custom-page-id>`,describe:`Delete a custom page`,builder:st,handler:async e=>u({command:`zero-trust access custom-pages 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 access custom-pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/${e[`custom-page-id`]==null?`<custom-page-id>`:encodeURIComponent(String(e[`custom-page-id`]))}`,pathParams:{"custom-page-id":String(e[`custom-page-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
42
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(ot,{account_id:a,custom_page_id:e[`custom-page-id`]}));s(u,{successLabel:`Deleted`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/${t.custom_page_id}`};function ut(e){return e.usage(`$0 zero-trust access custom-pages get <custom-page-id>
|
|
38
|
+
Delete a custom page`).positional(`custom-page-id`,{type:`string`,description:`UUID.`,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 ct={command:`delete <custom-page-id>`,describe:`Delete a custom page`,builder:st,handler:async e=>u({command:`zero-trust access custom-pages 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 access custom-pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/${e[`custom-page-id`]==null?`<custom-page-id>`:encodeURIComponent(String(e[`custom-page-id`]))}`,pathParams:{"custom-page-id":String(e[`custom-page-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(ot,{account_id:a,custom_page_id:e[`custom-page-id`]}));s(u,{successLabel:`Deleted`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/${t.custom_page_id}`};function ut(e){return e.usage(`$0 zero-trust access custom-pages get <custom-page-id>
|
|
43
39
|
|
|
44
40
|
Fetches a custom page and also returns its HTML.`).positional(`custom-page-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get <custom-page-id>`,describe:`Get a custom page`,builder:ut,handler:async e=>u({command:`zero-trust access custom-pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/${e[`custom-page-id`]==null?`<custom-page-id>`:encodeURIComponent(String(e[`custom-page-id`]))}`,pathParams:{"custom-page-id":String(e[`custom-page-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(lt,{account_id:a,custom_page_id:e[`custom-page-id`]}));s(u,{successLabel:`Loaded`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/custom_pages`,query:[`page`,`per_page`]};function pt(e){return e.usage(`$0 zero-trust access custom-pages list
|
|
45
41
|
|
|
@@ -57,8 +53,7 @@ Update SSH with Access for Infrastructure settings for an account.`).option(`pub
|
|
|
57
53
|
|
|
58
54
|
Adds a new SSH Certificate Authority (CA).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`create`,describe:`Add a new SSH Certificate Authority (CA)`,builder:jt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access infrastructure ssh-ca create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/gateway_ca`,pathParams:{},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(At,{account_id:a}));s(u,{successLabel:`Created`})})};var Nt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/gateway_ca/${t.certificate_id}`};function Pt(e){return e.usage(`$0 zero-trust access infrastructure ssh-ca delete <certificate-id>
|
|
59
55
|
|
|
60
|
-
Deletes an SSH Certificate Authority.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,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 Ft={command:`delete <certificate-id>`,describe:`Delete an SSH Certificate Authority (CA)`,builder:Pt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca 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 access infrastructure ssh-ca delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/gateway_ca/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
61
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Nt,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Deleted`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/gateway_ca`};function Lt(e){return e.usage(`$0 zero-trust access infrastructure ssh-ca list
|
|
56
|
+
Deletes an SSH Certificate Authority.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,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 Ft={command:`delete <certificate-id>`,describe:`Delete an SSH Certificate Authority (CA)`,builder:Pt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca 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 access infrastructure ssh-ca delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/gateway_ca/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-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(Nt,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Deleted`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/gateway_ca`};function Lt(e){return e.usage(`$0 zero-trust access infrastructure ssh-ca list
|
|
62
57
|
|
|
63
58
|
Lists SSH Certificate Authorities (CA).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`list`,describe:`List SSH Certificate Authorities (CA)`,builder:Lt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access infrastructure ssh-ca list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/gateway_ca`,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(It,{account_id:a}));s(u,{successLabel:`Loaded`})})},zt={command:`ssh-ca`,describe:`Operations for access.infrastructure.ssh-ca`,builder:e=>e.command(Mt).command(Ft).command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bt={command:`infrastructure`,describe:`Operations for access.infrastructure`,builder:e=>e.command(kt).command(zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/logs/access_requests`,query:[`limit`,`direction`,`since`,`until`,`page`,`per_page`,`email`,`email_exact`,`user_id`,`allowedOp`,`country_codeOp`,`app_typeOp`,`app_uidOp`,`ray_idOp`,`emailOp`,`idpOp`,`non_identityOp`,`user_idOp`,`fields`]};function Ht(e){return e.usage(`$0 zero-trust access logs access-requests list
|
|
64
59
|
|
|
@@ -75,8 +70,7 @@ Returns a list of Authenticator Device AAGUIDs for MFA configuration.`).option(`
|
|
|
75
70
|
|
|
76
71
|
Adds a new mTLS root certificate to Access.`).option(`associated-hostnames`,{type:`string`,array:!0,description:`The hostnames of the applications that will use this certificate.`}).option(`certificate`,{type:`string`,description:`The certificate content.`}).option(`name`,{type:`string`,description:`The name of the certificate.`}).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 dn={command:`create`,describe:`Add an mTLS certificate`,builder:un,handler:async e=>u({command:`zero-trust access mtls-certificates 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 mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({associated_hostnames:e[`associated-hostnames`],certificate:_(e.certificate,`certificate`,`text`),name:_(e.name,`name`,`text`)}):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(w,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await y(`certificate`,`The certificate content.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the certificate.`));let p=g({associated_hostnames:e[`associated-hostnames`],certificate:_(e.certificate,`certificate`,`text`),name:_(e.name,`name`,`text`)}),m=await l(`Creating`,async()=>n.send(w,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Created`})})};var fn={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/${t.certificate_id}`};function pn(e){return e.usage(`$0 zero-trust access mtls-certificates delete <certificate-id>
|
|
77
72
|
|
|
78
|
-
Deletes an mTLS certificate.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,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 mn={command:`delete <certificate-id>`,describe:`Delete an mTLS certificate`,builder:pn,handler:async e=>u({command:`zero-trust access mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force})){
|
|
79
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(fn,{account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(f,{successLabel:`Deleted`})})};var hn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/${t.certificate_id}`};function gn(e){return e.usage(`$0 zero-trust access mtls-certificates get <certificate-id>
|
|
73
|
+
Deletes an mTLS certificate.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,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 mn={command:`delete <certificate-id>`,describe:`Delete an mTLS certificate`,builder:pn,handler:async e=>u({command:`zero-trust access mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(fn,{account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(f,{successLabel:`Deleted`})})};var hn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/${t.certificate_id}`};function gn(e){return e.usage(`$0 zero-trust access mtls-certificates get <certificate-id>
|
|
80
74
|
|
|
81
75
|
Fetches a single mTLS certificate.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _n={command:`get <certificate-id>`,describe:`Get an mTLS certificate`,builder:gn,handler:async e=>u({command:`zero-trust access mtls-certificates get`,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 mtls-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});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();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(hn,{account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(f,{successLabel:`Loaded`})})};var vn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates`,query:[`page`,`per_page`]};function yn(e){return e.usage(`$0 zero-trust access mtls-certificates list
|
|
82
76
|
|
|
@@ -90,8 +84,7 @@ Updates a configured mTLS certificate.`).positional(`certificate-id`,{type:`stri
|
|
|
90
84
|
|
|
91
85
|
Creates a new Access reusable policy.`).option(`approval-groups`,{type:`string`,description:`Administrators who can approve a temporary authentication request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`approval-required`,{type:`boolean`,description:`Requires the user to request access from an administrator at the start of each session.`}).option(`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from local machine to remote RDP session.`}).option(`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from remote RDP session to local machine.`}).option(`isolation-required`,{type:`boolean`,description:`Require this application to be served in an isolated browser for users matching this policy. 'Client Web Isolation' must be on for the account in order to use this feature.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:`Lists the MFA methods that users can authenticate with.`}).option(`mfa-config-mfa-disabled`,{type:`boolean`,description:`Indicates whether to disable MFA for this resource. This option is available at the application and policy level.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`purpose-justification-prompt`,{type:`string`,description:`A custom message that will appear on the purpose justification screen.`}).option(`purpose-justification-required`,{type:`boolean`,description:`Require users to enter a justification when they log in to the application.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for the application will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`decision`,{type:`string`,description:`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,choices:[`allow`,`deny`,`non_identity`,`bypass`]}).coerce(`decision`,e=>_(e,`decision`,`text`)).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match the policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the Access policy.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match the policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const jn={command:`create`,describe:`Create an Access reusable policy`,builder:An,handler:async e=>u({command:`zero-trust access policies create`,classification:{safeFlags:[`approval-required`,`isolation-required`,`mfa-config-mfa-disabled`,`purpose-justification-required`,`decision`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),require:d(e.require,`require`)}):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(D,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.decision===void 0&&(e.decision=await b(`decision`,`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,[`allow`,`deny`,`non_identity`,`bypass`])),e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access policy.`));let u=g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),require:d(e.require,`require`)}),p=await l(`Creating`,async()=>n.send(D,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`};function Nn(e){return e.usage(`$0 zero-trust access policies delete <policy-id>
|
|
92
86
|
|
|
93
|
-
Deletes an Access reusable policy.`).positional(`policy-id`,{type:`string`,description:`The UUID of 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 Pn={command:`delete <policy-id>`,describe:`Delete an Access reusable policy`,builder:Nn,handler:async e=>u({command:`zero-trust access 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 access policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/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})){
|
|
94
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Mn,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Fn={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`};function In(e){return e.usage(`$0 zero-trust access policies get <policy-id>
|
|
87
|
+
Deletes an Access reusable policy.`).positional(`policy-id`,{type:`string`,description:`The UUID of 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 Pn={command:`delete <policy-id>`,describe:`Delete an Access reusable policy`,builder:Nn,handler:async e=>u({command:`zero-trust access 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 access policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/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(Mn,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Fn={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`};function In(e){return e.usage(`$0 zero-trust access policies get <policy-id>
|
|
95
88
|
|
|
96
89
|
Fetches a single Access reusable policy.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ln={command:`get <policy-id>`,describe:`Get an Access reusable policy`,builder:In,handler:async e=>u({command:`zero-trust access policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/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(Fn,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var Rn={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policies`,query:[`page`,`per_page`]};function zn(e){return e.usage(`$0 zero-trust access policies list
|
|
97
90
|
|
|
@@ -101,8 +94,7 @@ Updates a Access reusable policy.`).positional(`policy-id`,{type:`string`,descri
|
|
|
101
94
|
|
|
102
95
|
Creates a new Access group.`).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match a policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`is-default`,{type:`boolean`,description:`Whether this is the default group`}).option(`name`,{type:`string`,description:`The name of the Access group.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match a policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Gn={command:`create`,describe:`Create an Access group`,builder:Wn,handler:async e=>u({command:`zero-trust access rule-groups create`,classification:{safeFlags:[`is-default`,`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 rule-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),is_default:e[`is-default`],name:_(e.name,`name`,`text`),require:d(e.require,`require`)}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,p=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(k,{body:t,account_or_zone:u,account_or_zone_id:p}));s(r,{successLabel:`Created`});return}if(e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access group.`));let m=g({exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),is_default:e[`is-default`],name:_(e.name,`name`,`text`),require:d(e.require,`require`)}),h=await l(`Creating`,async()=>n.send(k,{body:m,account_or_zone:u,account_or_zone_id:p}));s(h,{successLabel:`Created`})})};var Kn={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups/${t.group_id}`};function qn(e){return e.usage(`$0 zero-trust access rule-groups delete <group-id>
|
|
103
96
|
|
|
104
|
-
Deletes an Access group.`).positional(`group-id`,{type:`string`,description:`UUID.`,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 Jn={command:`delete <group-id>`,describe:`Delete an Access group`,builder:qn,handler:async e=>u({command:`zero-trust access rule-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 rule-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"group-id":String(e[`group-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force})){
|
|
105
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(Kn,{account_or_zone:u,account_or_zone_id:d,group_id:e[`group-id`]}));s(f,{successLabel:`Deleted`})})};var Yn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups/${t.group_id}`};function Xn(e){return e.usage(`$0 zero-trust access rule-groups get <group-id>
|
|
97
|
+
Deletes an Access group.`).positional(`group-id`,{type:`string`,description:`UUID.`,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 Jn={command:`delete <group-id>`,describe:`Delete an Access group`,builder:qn,handler:async e=>u({command:`zero-trust access rule-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 rule-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"group-id":String(e[`group-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(Kn,{account_or_zone:u,account_or_zone_id:d,group_id:e[`group-id`]}));s(f,{successLabel:`Deleted`})})};var Yn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups/${t.group_id}`};function Xn(e){return e.usage(`$0 zero-trust access rule-groups get <group-id>
|
|
106
98
|
|
|
107
99
|
Fetches a single Access group.`).positional(`group-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`get <group-id>`,describe:`Get an Access group`,builder:Xn,handler:async e=>u({command:`zero-trust access rule-groups get`,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 rule-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"group-id":String(e[`group-id`]??``)},bodyKind:`none`});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();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(Yn,{account_or_zone:u,account_or_zone_id:d,group_id:e[`group-id`]}));s(f,{successLabel:`Loaded`})})};var Qn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups`,query:[`name`,`search`,`page`,`per_page`]};function $n(e){return e.usage(`$0 zero-trust access rule-groups list
|
|
108
100
|
|
|
@@ -120,8 +112,7 @@ Rotates the SAML encryption certificates within the specified certificate set. T
|
|
|
120
112
|
|
|
121
113
|
Generates a new service token. **Note:** This is the only time you can get the Client Secret. If you lose the Client Secret, you will have to rotate the Client Secret or create a new service token.`).option(`client-secret-version`,{type:`number`,description:"A version number identifying the current `client_secret` associated with the service token. Incrementing it triggers a rotation; the previous secret will still be accepted until the time indicated by `previous_client_secret_expires_at`. If the service token was reported as leaked, `previous_client_secret_expires_at` is not required, may not be in the future, and the previous secret is discarded immediately.",default:1}).option(`duration`,{type:`string`,description:"The duration for how long the service token will be valid. Must be in the format `300ms` or `2h45m`, or the special value `forever` for non-expiring tokens. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).",default:`8760h`}).option(`enabled`,{type:`boolean`,description:"Whether the service token is enabled. A disabled service token cannot be used to authenticate; both its current and previous `client_secret` stop being accepted, but the token itself is preserved and can be re-enabled. A service token reported as leaked is disabled automatically and cannot be re-enabled until its secret is rotated; attempting to do so returns a 409. Defaults to enabled when omitted on create."}).option(`name`,{type:`string`,description:`The name of the service token.`}).option(`previous-client-secret-expires-at`,{type:`string`,description:"The expiration of the previous `client_secret`. This can be modified at any point after a rotation. For example, you may extend it further into the future if you need more time to update services with the new secret; or move it into the past to immediately invalidate the previous token in case of compromise. Rotating a service token that was reported as leaked discards the previous secret entirely, so no grace period can be set."}).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 vr={command:`create`,describe:`Create a service token`,builder:_r,handler:async e=>u({command:`zero-trust access service-tokens create`,classification:{safeFlags:[`enabled`,`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 service-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({client_secret_version:e[`client-secret-version`],duration:_(e.duration,`duration`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`)}):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(j,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the service token.`));let p=g({client_secret_version:e[`client-secret-version`],duration:_(e.duration,`duration`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`)}),m=await l(`Creating`,async()=>n.send(j,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Created`})})};var yr={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens/${t.service_token_id}`};function br(e){return e.usage(`$0 zero-trust access service-tokens delete <service-token-id>
|
|
122
114
|
|
|
123
|
-
Deletes a service token.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,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 xr={command:`delete <service-token-id>`,describe:`Delete a service token`,builder:br,handler:async e=>u({command:`zero-trust access service-tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 service-tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"service-token-id":String(e[`service-token-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force})){
|
|
124
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(yr,{account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(f,{successLabel:`Deleted`})})};var Sr={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens/${t.service_token_id}`};function Cr(e){return e.usage(`$0 zero-trust access service-tokens get <service-token-id>
|
|
115
|
+
Deletes a service token.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,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 xr={command:`delete <service-token-id>`,describe:`Delete a service token`,builder:br,handler:async e=>u({command:`zero-trust access service-tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 service-tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"service-token-id":String(e[`service-token-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(yr,{account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(f,{successLabel:`Deleted`})})};var Sr={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens/${t.service_token_id}`};function Cr(e){return e.usage(`$0 zero-trust access service-tokens get <service-token-id>
|
|
125
116
|
|
|
126
117
|
Fetches a single service token.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wr={command:`get <service-token-id>`,describe:`Get a service token`,builder:Cr,handler:async e=>u({command:`zero-trust access service-tokens get`,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 service-tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"service-token-id":String(e[`service-token-id`]??``)},bodyKind:`none`});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();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(Sr,{account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(f,{successLabel:`Loaded`})})};var Tr={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens`,query:[`name`,`search`,`page`,`per_page`]};function Er(e){return e.usage(`$0 zero-trust access service-tokens list
|
|
127
118
|
|
|
@@ -141,8 +132,7 @@ Updates the Access key rotation settings for an account.`).option(`key-rotation-
|
|
|
141
132
|
|
|
142
133
|
Create a tag`).option(`name`,{type:`string`,description:`The name of the tag`}).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 Kr={command:`create`,describe:`Create a tag`,builder:Gr,handler:async e=>u({command:`zero-trust access tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`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(F,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=g({name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(F,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var qr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/tags/${t.tag_name}`};function Jr(e){return e.usage(`$0 zero-trust access tags delete <tag-name>
|
|
143
134
|
|
|
144
|
-
Delete a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,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 Yr={command:`delete <tag-name>`,describe:`Delete a tag`,builder:Jr,handler:async e=>u({command:`zero-trust access tags 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 access tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags/${e[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(e[`tag-name`]))}`,pathParams:{"tag-name":String(e[`tag-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
145
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(qr,{account_id:a,tag_name:e[`tag-name`]}));s(u,{successLabel:`Deleted`})})};var Xr={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/tags/${t.tag_name}`};function Zr(e){return e.usage(`$0 zero-trust access tags get <tag-name>
|
|
135
|
+
Delete a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,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 Yr={command:`delete <tag-name>`,describe:`Delete a tag`,builder:Jr,handler:async e=>u({command:`zero-trust access tags 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 access tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags/${e[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(e[`tag-name`]))}`,pathParams:{"tag-name":String(e[`tag-name`]??``)},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(qr,{account_id:a,tag_name:e[`tag-name`]}));s(u,{successLabel:`Deleted`})})};var Xr={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/tags/${t.tag_name}`};function Zr(e){return e.usage(`$0 zero-trust access tags get <tag-name>
|
|
146
136
|
|
|
147
137
|
Get a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qr={command:`get <tag-name>`,describe:`Get a tag`,builder:Zr,handler:async e=>u({command:`zero-trust access tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags/${e[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(e[`tag-name`]))}`,pathParams:{"tag-name":String(e[`tag-name`]??``)},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(Xr,{account_id:a,tag_name:e[`tag-name`]}));s(u,{successLabel:`Loaded`})})};var $r={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/tags`,query:[`page`,`per_page`]};function ei(e){return e.usage(`$0 zero-trust access tags list
|
|
148
138
|
|
|
@@ -162,8 +152,7 @@ and period, does not support spaces, and must start and end with an
|
|
|
162
152
|
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`tags`,{type:`string`,description:`Optional tags to associate with the target. Keys and values are
|
|
163
153
|
user-defined strings. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const mi={command:`create`,describe:`Create new target`,builder:pi,handler:async e=>u({command:`zero-trust access targets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({hostname:_(e.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:_(e[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:_(e[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}},tags:m(e.tags,`tags`)},[[`tags`]]):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}e.hostname===void 0&&(e.hostname=await y(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let u=g({hostname:_(e.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:_(e[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:_(e[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}},tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(z,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var hi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`,response:!1};function gi(e){return e.usage(`$0 zero-trust access targets delete <target-id>
|
|
164
154
|
|
|
165
|
-
Removes a single infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,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 _i={command:`delete <target-id>`,describe:`Delete target`,builder:gi,handler:async e=>u({command:`zero-trust access targets 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 access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"target-id":String(e[`target-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
166
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(hi,{account_id:a,target_id:e[`target-id`]}));s(u,{successLabel:`Deleted`})})};var vi={method:`GET`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`};function yi(e){return e.usage(`$0 zero-trust access targets get <target-id>
|
|
155
|
+
Removes a single infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,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 _i={command:`delete <target-id>`,describe:`Delete target`,builder:gi,handler:async e=>u({command:`zero-trust access targets 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 access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"target-id":String(e[`target-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(hi,{account_id:a,target_id:e[`target-id`]}));s(u,{successLabel:`Deleted`})})};var vi={method:`GET`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`};function yi(e){return e.usage(`$0 zero-trust access targets get <target-id>
|
|
167
156
|
|
|
168
157
|
Fetches a single infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bi={command:`get <target-id>`,describe:`Get target`,builder:yi,handler:async e=>u({command:`zero-trust access targets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"target-id":String(e[`target-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(vi,{account_id:a,target_id:e[`target-id`]}));s(u,{successLabel:`Loaded`})})};var xi={method:`GET`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets`,query:[`hostname`,`hostname_contains`,`virtual_network_id`,`ip_v4`,`ip_v6`,`created_before`,`created_after`,`modified_before`,`modified_after`,`ips`,`target_ids`,`ip_like`,`ipv4_start`,`ipv4_end`,`ipv6_start`,`ipv6_end`,`tag`,`page`,`per_page`,`order`,`direction`]};function Si(e){return e.usage(`$0 zero-trust access targets list
|
|
169
158
|
|
|
@@ -180,8 +169,7 @@ user-defined strings. Provide as a JSON object or @path/to/file.json.`}).option(
|
|
|
180
169
|
Creates a user population in an account.`).option(`name`,{type:`string`,description:`The name of the user population. Leading and trailing whitespace is trimmed before validation. After trimming, the name must contain at least one non-whitespace character and must not exceed 128 UTF-8 bytes.
|
|
181
170
|
`}).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 Oi={command:`create`,describe:`Create a user population`,builder:Di,handler:async e=>u({command:`zero-trust access user-populations create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`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(V,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the user population. Leading and trailing whitespace is trimmed before validation. After trimming, the name must contain at least one non-whitespace character and must not exceed 128 UTF-8 bytes. `));let u=g({name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(V,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ki={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}`};function Ai(e){return e.usage(`$0 zero-trust access user-populations delete <user-population-id>
|
|
182
171
|
|
|
183
|
-
Deletes a user population that is not attached to an application.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,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 ji={command:`delete <user-population-id>`,describe:`Delete a user population`,builder:Ai,handler:async e=>u({command:`zero-trust access user-populations 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 access user-populations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
184
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(ki,{account_id:a,user_population_id:e[`user-population-id`]}));s(u,{successLabel:`Deleted`})})};var Mi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}`};function Ni(e){return e.usage(`$0 zero-trust access user-populations get <user-population-id>
|
|
172
|
+
Deletes a user population that is not attached to an application.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,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 ji={command:`delete <user-population-id>`,describe:`Delete a user population`,builder:Ai,handler:async e=>u({command:`zero-trust access user-populations 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 access user-populations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-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(ki,{account_id:a,user_population_id:e[`user-population-id`]}));s(u,{successLabel:`Deleted`})})};var Mi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}`};function Ni(e){return e.usage(`$0 zero-trust access user-populations get <user-population-id>
|
|
185
173
|
|
|
186
174
|
Fetches a user population.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pi={command:`get <user-population-id>`,describe:`Get a user population`,builder:Ni,handler:async e=>u({command:`zero-trust access user-populations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-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(Mi,{account_id:a,user_population_id:e[`user-population-id`]}));s(u,{successLabel:`Loaded`})})};var Fi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations`,query:[`page`,`per_page`]};function Ii(e){return e.usage(`$0 zero-trust access user-populations list
|
|
187
175
|
|
|
@@ -192,8 +180,7 @@ Updates a user population's name.`).positional(`user-population-id`,{type:`strin
|
|
|
192
180
|
|
|
193
181
|
Creates a SCIM user in a user population.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`active`,{type:`boolean`,description:`The active field`}).option(`display-name`,{type:`string`,description:`The displayName field`}).option(`emails`,{type:`string`,description:`The emails field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`external-id`,{type:`string`,description:`The externalId field`}).option(`meta-created`,{type:`string`,description:`The meta.created field`}).option(`meta-last-modified`,{type:`string`,description:`The meta.lastModified field`}).option(`meta-location`,{type:`string`,description:`The meta.location field`}).option(`meta-resource-type`,{type:`string`,description:`The meta.resourceType field`}).option(`meta-version`,{type:`string`,description:`The meta.version field`}).option(`name-family-name`,{type:`string`,description:`The name.familyName field`}).option(`name-formatted`,{type:`string`,description:`The name.formatted field`}).option(`name-given-name`,{type:`string`,description:`The name.givenName field`}).option(`name-honorific-prefix`,{type:`string`,description:`The name.honorificPrefix field`}).option(`name-honorific-suffix`,{type:`string`,description:`The name.honorificSuffix field`}).option(`name-middle-name`,{type:`string`,description:`The name.middleName field`}).option(`schemas`,{type:`string`,array:!0,description:`The SCIM schemas that apply to this resource.`}).option(`user-name`,{type:`string`,description:`The userName field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A SCIM User resource. Additional SCIM extension attributes are supported.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Vi={command:`create <user-population-id>`,describe:`Create a user population user`,builder:Bi,handler:async e=>u({command:`zero-trust access user-populations users create`,classification:{safeFlags:[`active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users`,pathParams:{"user-population-id":String(e[`user-population-id`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({active:e.active,displayName:_(e[`display-name`],`display-name`,`text`),emails:d(e.emails,`emails`),externalId:_(e[`external-id`],`external-id`,`text`),meta:{created:_(e[`meta-created`],`meta-created`,`text`),lastModified:_(e[`meta-last-modified`],`meta-last-modified`,`text`),location:_(e[`meta-location`],`meta-location`,`text`),resourceType:_(e[`meta-resource-type`],`meta-resource-type`,`text`),version:_(e[`meta-version`],`meta-version`,`text`)},name:{familyName:_(e[`name-family-name`],`name-family-name`,`text`),formatted:_(e[`name-formatted`],`name-formatted`,`text`),givenName:_(e[`name-given-name`],`name-given-name`,`text`),honorificPrefix:_(e[`name-honorific-prefix`],`name-honorific-prefix`,`text`),honorificSuffix:_(e[`name-honorific-suffix`],`name-honorific-suffix`,`text`),middleName:_(e[`name-middle-name`],`name-middle-name`,`text`)},schemas:e.schemas,userName:_(e[`user-name`],`user-name`,`text`)}):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(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users`,{body:t,headers:{"Content-Type":`application/scim+json`}}));s(r,{successLabel:`Created`});return}if(e.body){let t=f(e.body),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users`,{body:t}));s(r,{successLabel:`Created`});return}let p={};e.active!==void 0&&h(p,[`active`],e.active),e[`display-name`]!==void 0&&h(p,[`displayName`],_(e[`display-name`],`display-name`,`text`)),e.emails!==void 0&&h(p,[`emails`],d(e.emails,`emails`)),e[`external-id`]!==void 0&&h(p,[`externalId`],_(e[`external-id`],`external-id`,`text`)),e[`meta-created`]!==void 0&&h(p,[`meta`,`created`],_(e[`meta-created`],`meta-created`,`text`)),e[`meta-last-modified`]!==void 0&&h(p,[`meta`,`lastModified`],_(e[`meta-last-modified`],`meta-last-modified`,`text`)),e[`meta-location`]!==void 0&&h(p,[`meta`,`location`],_(e[`meta-location`],`meta-location`,`text`)),e[`meta-resource-type`]!==void 0&&h(p,[`meta`,`resourceType`],_(e[`meta-resource-type`],`meta-resource-type`,`text`)),e[`meta-version`]!==void 0&&h(p,[`meta`,`version`],_(e[`meta-version`],`meta-version`,`text`)),e[`name-family-name`]!==void 0&&h(p,[`name`,`familyName`],_(e[`name-family-name`],`name-family-name`,`text`)),e[`name-formatted`]!==void 0&&h(p,[`name`,`formatted`],_(e[`name-formatted`],`name-formatted`,`text`)),e[`name-given-name`]!==void 0&&h(p,[`name`,`givenName`],_(e[`name-given-name`],`name-given-name`,`text`)),e[`name-honorific-prefix`]!==void 0&&h(p,[`name`,`honorificPrefix`],_(e[`name-honorific-prefix`],`name-honorific-prefix`,`text`)),e[`name-honorific-suffix`]!==void 0&&h(p,[`name`,`honorificSuffix`],_(e[`name-honorific-suffix`],`name-honorific-suffix`,`text`)),e[`name-middle-name`]!==void 0&&h(p,[`name`,`middleName`],_(e[`name-middle-name`],`name-middle-name`,`text`)),e.schemas!==void 0&&h(p,[`schemas`],e.schemas),e[`user-name`]!==void 0&&h(p,[`userName`],_(e[`user-name`],`user-name`,`text`));let m=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users`,{body:p}));s(m,{successLabel:`Created`})})};var Hi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users/${t.user_id}`,response:!1};function Ui(e){return e.usage(`$0 zero-trust access user-populations users delete <user-id>
|
|
194
182
|
|
|
195
|
-
Deletes a SCIM user from a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-id`,{type:`string`,description:`UUID.`,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 Wi={command:`delete <user-id>`,describe:`Delete a user population user`,builder:Ui,handler:async e=>u({command:`zero-trust access user-populations users 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 access user-populations users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``),"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
196
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Hi,{account_id:a,user_population_id:e[`user-population-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var Gi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users/${t.user_id}`,query:[`attributes`,`excludedAttributes`]};function Ki(e){return e.usage(`$0 zero-trust access user-populations users get <user-id>
|
|
183
|
+
Deletes a SCIM user from a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-id`,{type:`string`,description:`UUID.`,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 Wi={command:`delete <user-id>`,describe:`Delete a user population user`,builder:Ui,handler:async e=>u({command:`zero-trust access user-populations users 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 access user-populations users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``),"user-id":String(e[`user-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(Hi,{account_id:a,user_population_id:e[`user-population-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var Gi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users/${t.user_id}`,query:[`attributes`,`excludedAttributes`]};function Ki(e){return e.usage(`$0 zero-trust access user-populations users get <user-id>
|
|
197
184
|
|
|
198
185
|
Fetches a SCIM user from a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`attributes`,{type:`string`,description:`Comma-separated SCIM attributes to return.`}).option(`excluded-attributes`,{type:`string`,description:`Comma-separated SCIM attributes to exclude from the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qi={command:`get <user-id>`,describe:`Get a user population user`,builder:Ki,handler:async e=>u({command:`zero-trust access user-populations users get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={attributes:e.attributes,excludedAttributes:e[`excluded-attributes`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``),"user-id":String(e[`user-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(Gi,{account_id:u,user_population_id:e[`user-population-id`],user_id:e[`user-id`],...n}));s(d,{successLabel:`Loaded`})})};var Ji={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users`,query:[`filter`,`startIndex`,`count`,`attributes`,`excludedAttributes`]};function Yi(e){return e.usage(`$0 zero-trust access user-populations users list
|
|
199
186
|
|
|
@@ -209,8 +196,7 @@ Get active sessions for a single user.`).option(`user-id`,{type:`string`,descrip
|
|
|
209
196
|
|
|
210
197
|
Creates a new user.`).option(`email`,{type:`string`,description:`The email of the user.`}).option(`name`,{type:`string`,description:`The name of the user.`}).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 da={command:`create`,describe:`Create a user`,builder:ua,handler:async e=>u({command:`zero-trust access users create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({email:_(e.email,`email`,`text`),name:_(e.name,`name`,`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(U,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user.`));let u=g({email:_(e.email,`email`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(U,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var fa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`};function pa(e){return e.usage(`$0 zero-trust access users delete <user-id>
|
|
211
198
|
|
|
212
|
-
Deletes a specific user for an account. This will also revoke any active seats and tokens for the user.`).positional(`user-id`,{type:`string`,description:`UUID.`,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 ma={command:`delete <user-id>`,describe:`Delete a user`,builder:pa,handler:async e=>u({command:`zero-trust access users 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 access users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
213
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(fa,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/failed_logins`};function ga(e){return e.usage(`$0 zero-trust access users failed-logins list
|
|
199
|
+
Deletes a specific user for an account. This will also revoke any active seats and tokens for the user.`).positional(`user-id`,{type:`string`,description:`UUID.`,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 ma={command:`delete <user-id>`,describe:`Delete a user`,builder:pa,handler:async e=>u({command:`zero-trust access users 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 access users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-id":String(e[`user-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(fa,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/failed_logins`};function ga(e){return e.usage(`$0 zero-trust access users failed-logins list
|
|
214
200
|
|
|
215
201
|
Get all failed login attempts for a single user.`).option(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _a={command:`list`,describe:`Get failed logins`,builder:ga,handler:async e=>u({command:`zero-trust access users failed-logins list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users failed-logins list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/failed_logins`,pathParams:{"user-id":String(e[`user-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(ha,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})},va={command:`failed-logins`,describe:`Operations for access.users.failed-logins`,builder:e=>e.command(_a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ya={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`};function ba(e){return e.usage(`$0 zero-trust access users get <user-id>
|
|
216
202
|
|
|
@@ -220,8 +206,7 @@ Get last seen identity for a single user.`).positional(`user-id`,{type:`string`,
|
|
|
220
206
|
|
|
221
207
|
Gets a list of users for an account.`).option(`name`,{type:`string`,description:`The name of the user.`}).option(`email`,{type:`string`,description:`The email of the user.`}).option(`search`,{type:`string`,description:`Search for users by other listed query parameters.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oa={command:`list`,describe:`Get users`,builder:Da,handler:async e=>u({command:`zero-trust access users list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={name:e.name,email:e.email,search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust access users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/users`,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(Ea,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var W={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations/revoke_user`,body:`json`};function ka(e){return e.usage(`$0 zero-trust access users revoke
|
|
222
208
|
|
|
223
|
-
Revokes a user's access across all applications.`).option(`devices`,{type:`boolean`,description:"When set to `true`, all devices associated with the user will be revoked."}).option(`email`,{type:`string`,description:`The email of the user to revoke.`}).option(`user-uid`,{type:`string`,description:`The uuid of the user to revoke.`}).option(`warp-session-reauth`,{type:`boolean`,description:"When set to `true`, the user will be required to re-authenticate to WARP for all Gateway policies that enforce a WARP client session duration. When `false`, the user’s WARP session will remain active"}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Aa={command:`revoke`,describe:`Revoke all Access tokens for a user`,builder:ka,handler:async e=>u({command:`zero-trust access users revoke`,classification:{safeFlags:[`devices`,`warp-session-reauth`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 users revoke`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations/revoke_user`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({devices:e.devices,email:_(e.email,`email`,`text`),user_uid:_(e[`user-uid`],`user-uid`,`text`),warp_session_reauth:e[`warp-session-reauth`]}):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,!await x({force:!!e.force,message:`This operation revokes all access tokens for a user destructively.`})){
|
|
224
|
-
`);return}if(e.body){let t=f(e.body),r=await l(`Deleting`,async()=>n.send(W,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Deleted`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user to revoke.`));let p=g({devices:e.devices,email:_(e.email,`email`,`text`),user_uid:_(e[`user-uid`],`user-uid`,`text`),warp_session_reauth:e[`warp-session-reauth`]}),m=await l(`Deleting`,async()=>n.send(W,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Deleted`})})};var G={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`,body:`json`};function ja(e){return e.usage(`$0 zero-trust access users update <user-id>
|
|
209
|
+
Revokes a user's access across all applications.`).option(`devices`,{type:`boolean`,description:"When set to `true`, all devices associated with the user will be revoked."}).option(`email`,{type:`string`,description:`The email of the user to revoke.`}).option(`user-uid`,{type:`string`,description:`The uuid of the user to revoke.`}).option(`warp-session-reauth`,{type:`boolean`,description:"When set to `true`, the user will be required to re-authenticate to WARP for all Gateway policies that enforce a WARP client session duration. When `false`, the user’s WARP session will remain active"}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Aa={command:`revoke`,describe:`Revoke all Access tokens for a user`,builder:ka,handler:async e=>u({command:`zero-trust access users revoke`,classification:{safeFlags:[`devices`,`warp-session-reauth`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 users revoke`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations/revoke_user`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({devices:e.devices,email:_(e.email,`email`,`text`),user_uid:_(e[`user-uid`],`user-uid`,`text`),warp_session_reauth:e[`warp-session-reauth`]}):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,!await x({force:!!e.force,message:`This operation revokes all access tokens for a user destructively.`}))return;if(e.body){let t=f(e.body),r=await l(`Deleting`,async()=>n.send(W,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Deleted`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user to revoke.`));let p=g({devices:e.devices,email:_(e.email,`email`,`text`),user_uid:_(e[`user-uid`],`user-uid`,`text`),warp_session_reauth:e[`warp-session-reauth`]}),m=await l(`Deleting`,async()=>n.send(W,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Deleted`})})};var G={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`,body:`json`};function ja(e){return e.usage(`$0 zero-trust access users update <user-id>
|
|
225
210
|
|
|
226
211
|
Updates a specific user's name for an account. Requires the user's current email as confirmation (email cannot be changed).`).positional(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`email`,{type:`string`,description:`The email of the user.`}).option(`name`,{type:`string`,description:`The name of the user.`}).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 Ma={command:`update <user-id>`,describe:`Update a user`,builder:ja,handler:async e=>u({command:`zero-trust access users update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({email:_(e.email,`email`,`text`),name:_(e.name,`name`,`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(`Updating`,async()=>n.send(G,{body:t,account_id:a,user_id:e[`user-id`]}));s(r,{successLabel:`Updated`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the user.`));let u=g({email:_(e.email,`email`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(G,{body:u,account_id:a,user_id:e[`user-id`]}));s(d,{successLabel:`Updated`})})},Na={command:`users`,describe:`Operations for access.users`,builder:e=>e.command(da).command(ma).command(xa).command(Oa).command(Aa).command(Ma).command(la).command(va).command(Ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pa={command:`access`,describe:`Operations for access`,builder:e=>e.command(nt).command(bt).command(Bt).command(rn).command(ln).command(kn).command(Un).command(rr).command(gr).command(Fr).command(Wr).command(ii).command(Ei).command(na).command(Na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fa={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/applications/${t.application_id}/auth-methods`,query:[`page`,`page_size`],errors:{404:`NotFoundError`}};function Ia(e){return e.usage(`$0 zero-trust casb applications auth-methods list
|
|
227
212
|
|
|
@@ -245,8 +230,7 @@ List all export jobs for a given requestor's organization`).option(`page`,{type:
|
|
|
245
230
|
|
|
246
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>
|
|
247
232
|
|
|
248
|
-
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})){
|
|
249
|
-
`);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`}};function yo(e){return e.usage(`$0 zero-trust casb finding-types get <finding-type-id>
|
|
250
234
|
|
|
251
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
|
|
252
236
|
|
|
@@ -285,8 +269,7 @@ Ability to un-ignore a Finding if it's previously been ignored. Does nothing if
|
|
|
285
269
|
|
|
286
270
|
Creates a new integration for the specified application. Integration creation with OAuth is not supported by API at the moment. For other auth methods, use \`GET /v2/applications/{application_id}/credential-guide\` to see the required credential structure and example payloads for each vendor.`).option(`application`,{type:`string`,description:"Vendor/application slug (e.g., GOOGLE_WORKSPACE).\n\n* `ANTHROPIC` - ANTHROPIC\n* `AWS` - AWS\n* `BITBUCKET` - BITBUCKET\n* `BOX` - BOX\n* `CONFLUENCE` - CONFLUENCE\n* `DROPBOX` - DROPBOX\n* `GITHUB` - GITHUB\n* `GOOGLE_CLOUD_PLATFORM` - GOOGLE_CLOUD_PLATFORM\n* `GOOGLE_WORKSPACE` - GOOGLE_WORKSPACE\n* `JIRA` - JIRA\n* `MICROSOFT_INTERNAL` - MICROSOFT_INTERNAL\n* `OPENAI` - OPENAI\n* `SALESFORCE` - SALESFORCE\n* `SERVICENOW` - SERVICENOW\n* `SLACK` - SLACK\n* `ZOOM` - ZOOM",choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`application`,e=>_(e,`application`,`text`)).option(`auth-method`,{type:`string`,description:`Authentication method slug (uses default if omitted).`}).option(`credentials`,{type:`string`,description:`Credentials for the integration. 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.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes (uses policy defaults if empty).`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll. At least one use case (casb, ces) is required; auto_remediation may be added alongside casb (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 create requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ms={command:`create`,describe:`Create integration`,builder:ps,handler:async e=>u({command:`zero-trust casb integrations create`,classification:{safeFlags:[`application`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations`,pathParams:{},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({application:e.application,auth_method:_(e[`auth-method`],`auth-method`,`text`),credentials:m(e.credentials,`credentials`,!0),dlp_profiles:e[`dlp-profiles`],name:_(e.name,`name`,`text`),permissions:e.permissions,use_cases:e[`use-cases`]},[[`credentials`]]):f(e.body,[{path:[`credentials`],flag:`credentials`}]):{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(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/one/integrations`,{body:t,headers:{"Content-Type":`text/plain;charset=UTF-8`}}));s(r,{successLabel:`Created`});return}if(e.body){let t=f(e.body,[{path:[`credentials`],flag:`credentials`}]),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/one/integrations`,{body:t}));s(r,{successLabel:`Created`});return}if(e.application===void 0&&(e.application=await b(`application`,"Vendor/application slug (e.g., GOOGLE_WORKSPACE). * `ANTHROPIC` - ANTHROPIC * `AWS` - AWS * `BITBUCKET` - BITBUCKET * `BOX` - BOX * `CONFLUENCE` - CONFLUENCE * `DROPBOX` - DROPBOX * `GITHUB` - GITHUB * `GOOGLE_CLOUD_PLATFORM` - GOOGLE_CLOUD_PLATFORM * `GOOGLE_WORKSPACE` - GOOGLE_WORKSPACE * `JIRA` - JIRA * `MICROSOFT_INTERNAL` - MICROSOFT_INTERNAL * `OPENAI` - OPENAI * `SALESFORCE` - SALESFORCE * `SERVICENOW` - SERVICENOW * `SLACK` - SLACK * `ZOOM` - ZOOM",[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.credentials===void 0)throw Error(`--credentials is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await y(`name`,`Name of the integration.`)),e[`use-cases`]===void 0)throw Error(`--use-cases is required (or pass --body with this field set).`);let d={};e.application!==void 0&&h(d,[`application`],e.application),e[`auth-method`]!==void 0&&h(d,[`auth_method`],_(e[`auth-method`],`auth-method`,`text`)),e.credentials!==void 0&&h(d,[`credentials`],m(e.credentials,`credentials`,!0)),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(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/one/integrations`,{body:d}));s(p,{successLabel:`Created`})})};var hs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}`,response:!1,errors:{400:`BadRequestError`}};function gs(e){return e.usage(`$0 zero-trust casb integrations delete <id>
|
|
287
271
|
|
|
288
|
-
Delete an integration by soft-deleting it.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _s={command:`delete <id>`,describe:`Delete integration`,builder:gs,handler:async e=>u({command:`zero-trust casb integrations 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 integrations delete`,method:`DELETE`,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:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
289
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(hs,{account_id:a,id:e.id}));s(u,{successLabel:`Deleted`})})};var vs={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}`,errors:{404:`NotFoundError`}};function ys(e){return e.usage(`$0 zero-trust casb integrations get <id>
|
|
272
|
+
Delete an integration by soft-deleting it.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _s={command:`delete <id>`,describe:`Delete integration`,builder:gs,handler:async e=>u({command:`zero-trust casb integrations 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 integrations delete`,method:`DELETE`,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:`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(hs,{account_id:a,id:e.id}));s(u,{successLabel:`Deleted`})})};var vs={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}`,errors:{404:`NotFoundError`}};function ys(e){return e.usage(`$0 zero-trust casb integrations get <id>
|
|
290
273
|
|
|
291
274
|
Returns full integration details including use cases and permissions.`).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 bs={command:`get <id>`,describe:`Get integration details`,builder:ys,handler:async e=>u({command:`zero-trust casb integrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations get`,method:`GET`,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:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vs,{account_id:a,id:e.id}));s(u,{successLabel:`Loaded`})})};var xs={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/integrations`,query:[`application`,`direction`,`dlp_enabled`,`order`,`page`,`page_size`,`search`,`status`,`use_cases`],errors:{400:`BadRequestError`}};function Ss(e){return e.usage(`$0 zero-trust casb integrations list
|
|
292
275
|
|
|
@@ -300,8 +283,7 @@ Updates an integration's name, permissions, DLP profiles, use cases, or credenti
|
|
|
300
283
|
|
|
301
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>
|
|
302
285
|
|
|
303
|
-
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})){
|
|
304
|
-
`);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`}};function Bs(e){return e.usage(`$0 zero-trust casb policies get <policy-id>
|
|
305
287
|
|
|
306
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
|
|
307
289
|
|
|
@@ -315,8 +297,7 @@ Creates a CSV export for remediation jobs and accepts optional filters in the pa
|
|
|
315
297
|
|
|
316
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>
|
|
317
299
|
|
|
318
|
-
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})){
|
|
319
|
-
`);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`}};function pc(e){return e.usage(`$0 zero-trust casb webhooks evaluate-existing <webhook-id>
|
|
320
301
|
|
|
321
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
|
|
322
303
|
|
|
@@ -336,8 +317,7 @@ Gets the Zero Trust Connectivity Settings for the given account.`).option(`dry-r
|
|
|
336
317
|
|
|
337
318
|
Creates a basic-auth credential with the specified username.`).option(`username`,{type:`string`,description:`Login presented by the client. Printable ASCII only, excluding space and colon.`}).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 Hc={command:`create`,describe:`Create a basic-auth credential`,builder:Vc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({username:_(e.username,`username`,`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(Bc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.username===void 0&&(e.username=await y(`username`,`Login presented by the client. Printable ASCII only, excluding space and colon.`));let u=g({username:_(e.username,`username`,`text`)}),d=await l(`Creating`,async()=>n.send(Bc,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Uc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}`};function Wc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials delete <credential-id>
|
|
338
319
|
|
|
339
|
-
Deletes the credential and its secrets if it is not attached to a deployment.`).positional(`credential-id`,{type:`string`,description:`ID of the credential to delete`,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 Gc={command:`delete <credential-id>`,describe:`Delete a basic-auth credential`,builder:Wc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials 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 cws basic-auth-credentials delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this basic-auth credential?`})){
|
|
340
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Uc,{account_id:a,credential_id:e[`credential-id`]}));s(u,{successLabel:`Deleted`})})};var Kc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}`};function qc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials get <credential-id>
|
|
320
|
+
Deletes the credential and its secrets if it is not attached to a deployment.`).positional(`credential-id`,{type:`string`,description:`ID of the credential to delete`,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 Gc={command:`delete <credential-id>`,describe:`Delete a basic-auth credential`,builder:Wc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials 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 cws basic-auth-credentials delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this basic-auth credential?`}))return;let u=await l(`Deleting`,async()=>n.send(Uc,{account_id:a,credential_id:e[`credential-id`]}));s(u,{successLabel:`Deleted`})})};var Kc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}`};function qc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials get <credential-id>
|
|
341
321
|
|
|
342
322
|
Returns the basic-auth credential with the specified ID.`).positional(`credential-id`,{type:`string`,description:`ID of the credential to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jc={command:`get <credential-id>`,describe:`Get a basic-auth credential by ID`,builder:qc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-id":String(e[`credential-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(Kc,{account_id:a,credential_id:e[`credential-id`]}));s(u,{successLabel:`Loaded`})})};var Yc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials`,query:[`cursor`,`per_page`,`order`,`direction`,`username`,`deployment_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`username`,`deployment_id`]};function Xc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials list
|
|
343
323
|
|
|
@@ -345,8 +325,7 @@ Returns a paginated list of basic-auth credentials in the account.`).option(`cur
|
|
|
345
325
|
|
|
346
326
|
Adds a password secret to the credential.`).positional(`credential-id`,{type:`string`,description:`ID of the parent credential`,demandOption:!0}).option(`expires-at`,{type:`string`,description:`Optional deactivation deadline (RFC 3339). Omit or null for no expiry.`}).option(`password`,{type:`string`,description:`Password stored only as a one-way hash and never returned. Maximum 72 UTF-8 bytes.`}).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 el={command:`create <credential-id>`,describe:`Add a secret to a basic-auth credential`,builder:$c,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials secrets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets`,pathParams:{"credential-id":String(e[`credential-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({expires_at:_(e[`expires-at`],`expires-at`,`text`),password:_(e.password,`password`,`text`)}):f(e.body),sensitiveBodyPaths:[[`password`]]});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(Qc,{body:t,account_id:a,credential_id:e[`credential-id`]}));s(r,{successLabel:`Created`});return}e.password===void 0&&(e.password=await y(`password`,`Password stored only as a one-way hash and never returned. Maximum 72 UTF-8 bytes.`,{kind:`secret`}));let u=g({expires_at:_(e[`expires-at`],`expires-at`,`text`),password:_(e.password,`password`,`text`)}),d=await l(`Creating`,async()=>n.send(Qc,{body:u,account_id:a,credential_id:e[`credential-id`]}));s(d,{successLabel:`Created`})})};var tl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets/${t.secret_id}`};function nl(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets delete <secret-id>
|
|
347
327
|
|
|
348
|
-
Deletes the specified secret from the credential.`).positional(`secret-id`,{type:`string`,description:`ID of the secret to delete`,demandOption:!0}).option(`credential-id`,{type:`string`,description:`ID of the parent credential`,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 rl={command:`delete <secret-id>`,describe:`Delete a basic-auth secret`,builder:nl,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets 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 cws basic-auth-credentials secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``),"secret-id":String(e[`secret-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this basic-auth secret?`})){
|
|
349
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(tl,{account_id:a,credential_id:e[`credential-id`],secret_id:e[`secret-id`]}));s(u,{successLabel:`Deleted`})})};var il={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets/${t.secret_id}`};function al(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets get <secret-id>
|
|
328
|
+
Deletes the specified secret from the credential.`).positional(`secret-id`,{type:`string`,description:`ID of the secret to delete`,demandOption:!0}).option(`credential-id`,{type:`string`,description:`ID of the parent credential`,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 rl={command:`delete <secret-id>`,describe:`Delete a basic-auth secret`,builder:nl,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets 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 cws basic-auth-credentials secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``),"secret-id":String(e[`secret-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this basic-auth secret?`}))return;let u=await l(`Deleting`,async()=>n.send(tl,{account_id:a,credential_id:e[`credential-id`],secret_id:e[`secret-id`]}));s(u,{successLabel:`Deleted`})})};var il={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets/${t.secret_id}`};function al(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets get <secret-id>
|
|
350
329
|
|
|
351
330
|
Returns the specified secret's metadata without exposing its password or hash.`).positional(`secret-id`,{type:`string`,description:`ID of the secret to retrieve`,demandOption:!0}).option(`credential-id`,{type:`string`,description:`ID of the parent credential`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ol={command:`get <secret-id>`,describe:`Get a basic-auth secret by ID`,builder:al,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``),"secret-id":String(e[`secret-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(il,{account_id:a,credential_id:e[`credential-id`],secret_id:e[`secret-id`]}));s(u,{successLabel:`Loaded`})})};var sl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets`,query:[`cursor`,`per_page`,`order`,`direction`],joined:[`cursor`,`per_page`,`order`,`direction`]};function cl(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets list
|
|
352
331
|
|
|
@@ -354,8 +333,7 @@ Returns a paginated list of secrets belonging to the credential.`).option(`crede
|
|
|
354
333
|
|
|
355
334
|
Creates a deployment with the specified policy sets, domain ACL, and basic-auth credentials.`).option(`basic-auth-credential-ids`,{type:`string`,array:!0,description:`IDs of basic-auth credentials to attach`}).option(`default-mode`,{type:`string`,description:`Default traffic mode: ALLOW or BLOCK`,choices:[`ALLOW`,`BLOCK`]}).coerce(`default-mode`,e=>_(e,`default-mode`,`text`)).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to attach (omit or null for none)`}).option(`name`,{type:`string`,description:`Name of the deployment`}).option(`on-error-action`,{type:`string`,description:`Action for runtime Rego errors. Omit to use BLOCK.`,choices:[`BLOCK`,`SKIP`],default:`BLOCK`}).coerce(`on-error-action`,e=>_(e,`on-error-action`,`text`)).option(`policy-set-ids`,{type:`string`,array:!0,description:`IDs of policy sets to attach`}).option(`rego-raise-error`,{type:`boolean`,description:`Whether OPA builtin failures are raised as runtime evaluation errors. Omit to use the default true value.`,default:!0}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ml={command:`create`,describe:`Create a new deployment`,builder:pl,handler:async e=>u({command:`zero-trust cws deployments create`,classification:{safeFlags:[`default-mode`,`on-error-action`,`rego-raise-error`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({basic_auth_credential_ids:e[`basic-auth-credential-ids`],default_mode:e[`default-mode`],description:_(e.description,`description`,`text`),domain_acl_id:_(e[`domain-acl-id`],`domain-acl-id`,`text`),name:_(e.name,`name`,`text`),on_error_action:e[`on-error-action`],policy_set_ids:e[`policy-set-ids`],rego_raise_error:e[`rego-raise-error`],tags:m(e.tags,`tags`)},[[`tags`]]):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(fl,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`basic-auth-credential-ids`]===void 0)throw Error(`--basic-auth-credential-ids is required (or pass --body with this field set).`);if(e[`default-mode`]===void 0&&(e[`default-mode`]=await b(`default-mode`,`Default traffic mode: ALLOW or BLOCK`,[`ALLOW`,`BLOCK`])),e.name===void 0&&(e.name=await y(`name`,`Name of the deployment`)),e[`policy-set-ids`]===void 0)throw Error(`--policy-set-ids is required (or pass --body with this field set).`);let u=g({basic_auth_credential_ids:e[`basic-auth-credential-ids`],default_mode:e[`default-mode`],description:_(e.description,`description`,`text`),domain_acl_id:_(e[`domain-acl-id`],`domain-acl-id`,`text`),name:_(e.name,`name`,`text`),on_error_action:e[`on-error-action`],policy_set_ids:e[`policy-set-ids`],rego_raise_error:e[`rego-raise-error`],tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(fl,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var hl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/deployments/${t.deployment_id}`};function gl(e){return e.usage(`$0 zero-trust cws deployments delete <deployment-id>
|
|
356
335
|
|
|
357
|
-
Deletes the deployment and detaches its associated resources. The resources are not deleted.`).positional(`deployment-id`,{type:`string`,description:`ID of the deployment to delete`,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 _l={command:`delete <deployment-id>`,describe:`Delete a deployment`,builder:gl,handler:async e=>u({command:`zero-trust cws deployments 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 cws deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this deployment?`})){
|
|
358
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(hl,{account_id:a,deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Deleted`})})};var vl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/deployments/${t.deployment_id}`};function yl(e){return e.usage(`$0 zero-trust cws deployments get <deployment-id>
|
|
336
|
+
Deletes the deployment and detaches its associated resources. The resources are not deleted.`).positional(`deployment-id`,{type:`string`,description:`ID of the deployment to delete`,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 _l={command:`delete <deployment-id>`,describe:`Delete a deployment`,builder:gl,handler:async e=>u({command:`zero-trust cws deployments 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 cws deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this deployment?`}))return;let u=await l(`Deleting`,async()=>n.send(hl,{account_id:a,deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Deleted`})})};var vl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/deployments/${t.deployment_id}`};function yl(e){return e.usage(`$0 zero-trust cws deployments get <deployment-id>
|
|
359
337
|
|
|
360
338
|
Returns the deployment with the specified ID.`).positional(`deployment-id`,{type:`string`,description:`ID of the deployment to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bl={command:`get <deployment-id>`,describe:`Get a deployment by ID`,builder:yl,handler:async e=>u({command:`zero-trust cws deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-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(vl,{account_id:a,deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Loaded`})})};var xl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/deployments`,query:[`cursor`,`per_page`,`order`,`direction`,`name`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`]};function Sl(e){return e.usage(`$0 zero-trust cws deployments list
|
|
361
339
|
|
|
@@ -365,8 +343,7 @@ Replaces the deployment's mutable configuration and resource attachments.`).posi
|
|
|
365
343
|
|
|
366
344
|
Creates a domain access control list with its default action and entries.`).option(`default-action`,{type:`string`,description:`Default action when no entry matches`,choices:[`ALLOW`,`BLOCK`]}).coerce(`default-action`,e=>_(e,`default-action`,`text`)).option(`entries`,{type:`string`,description:`Domain entries for this ACL. Each domain must appear at most once. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Name of the domain ACL`}).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 Al={command:`create`,describe:`Create a new domain ACL`,builder:kl,handler:async e=>u({command:`zero-trust cws domain-acls create`,classification:{safeFlags:[`default-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws domain-acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({default_action:e[`default-action`],entries:d(e.entries,`entries`),name:_(e.name,`name`,`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(Ol,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`default-action`]===void 0&&(e[`default-action`]=await b(`default-action`,`Default action when no entry matches`,[`ALLOW`,`BLOCK`])),e.entries===void 0)throw Error(`--entries is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`Name of the domain ACL`));let u=g({default_action:e[`default-action`],entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`)}),p=await l(`Creating`,async()=>n.send(Ol,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var jl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls/${t.domain_acl_id}`};function Ml(e){return e.usage(`$0 zero-trust cws domain-acls delete <domain-acl-id>
|
|
367
345
|
|
|
368
|
-
Deletes the domain ACL if it is not attached to a deployment.`).positional(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to delete`,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 Nl={command:`delete <domain-acl-id>`,describe:`Delete a domain ACL`,builder:Ml,handler:async e=>u({command:`zero-trust cws domain-acls 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 cws domain-acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls/${e[`domain-acl-id`]==null?`<domain-acl-id>`:encodeURIComponent(String(e[`domain-acl-id`]))}`,pathParams:{"domain-acl-id":String(e[`domain-acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this domain ACL?`})){
|
|
369
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(jl,{account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(u,{successLabel:`Deleted`})})};var Pl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls/${t.domain_acl_id}`};function Fl(e){return e.usage(`$0 zero-trust cws domain-acls get <domain-acl-id>
|
|
346
|
+
Deletes the domain ACL if it is not attached to a deployment.`).positional(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to delete`,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 Nl={command:`delete <domain-acl-id>`,describe:`Delete a domain ACL`,builder:Ml,handler:async e=>u({command:`zero-trust cws domain-acls 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 cws domain-acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls/${e[`domain-acl-id`]==null?`<domain-acl-id>`:encodeURIComponent(String(e[`domain-acl-id`]))}`,pathParams:{"domain-acl-id":String(e[`domain-acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this domain ACL?`}))return;let u=await l(`Deleting`,async()=>n.send(jl,{account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(u,{successLabel:`Deleted`})})};var Pl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls/${t.domain_acl_id}`};function Fl(e){return e.usage(`$0 zero-trust cws domain-acls get <domain-acl-id>
|
|
370
347
|
|
|
371
348
|
Returns the domain access control list with the specified ID.`).positional(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Il={command:`get <domain-acl-id>`,describe:`Get a domain ACL by ID`,builder:Fl,handler:async e=>u({command:`zero-trust cws domain-acls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws domain-acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls/${e[`domain-acl-id`]==null?`<domain-acl-id>`:encodeURIComponent(String(e[`domain-acl-id`]))}`,pathParams:{"domain-acl-id":String(e[`domain-acl-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(Pl,{account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(u,{successLabel:`Loaded`})})};var Ll={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`]};function Rl(e){return e.usage(`$0 zero-trust cws domain-acls list
|
|
372
349
|
|
|
@@ -376,8 +353,7 @@ Replaces the domain access control list's name, default action, and entries.`).p
|
|
|
376
353
|
|
|
377
354
|
Creates a policy from inline Rego source, an entrypoint, and a filter expression.`).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`entrypoint`,{type:`string`,description:`Non-function rule declared in rego_source. Evaluation uses data.<package_path>.<entrypoint>.`}).option(`filter`,{type:`string`,description:`Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.`}).option(`name`,{type:`string`,description:`Name of the policy`}).option(`rego-source`,{type:`string`,description:`Inline Rego source with a package beginning with "policy." Maximum 16384 UTF-8 bytes.`}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Kl={command:`create`,describe:`Create a new policy`,builder:Gl,handler:async e=>u({command:`zero-trust cws policies create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),entrypoint:_(e.entrypoint,`entrypoint`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(Wl,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.entrypoint===void 0&&(e.entrypoint=await y(`entrypoint`,`Non-function rule declared in rego_source. Evaluation uses data.<package_path>.<entrypoint>.`)),e.filter===void 0&&(e.filter=await y(`filter`,`Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the policy`)),e[`rego-source`]===void 0&&(e[`rego-source`]=await y(`rego-source`,`Inline Rego source with a package beginning with "policy." Maximum 16384 UTF-8 bytes.`));let u=g({description:_(e.description,`description`,`text`),entrypoint:_(e.entrypoint,`entrypoint`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(Wl,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ql={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/policies/${t.policy_id}`};function Jl(e){return e.usage(`$0 zero-trust cws policies delete <policy-id>
|
|
378
355
|
|
|
379
|
-
Deletes the policy and cascades its policy-set membership rows. The policy sets remain.`).positional(`policy-id`,{type:`string`,description:`ID of the policy to delete`,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 Yl={command:`delete <policy-id>`,describe:`Delete a policy`,builder:Jl,handler:async e=>u({command:`zero-trust cws 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 cws policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/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,message:`Delete this policy?`})){
|
|
380
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(ql,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Xl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policies/${t.policy_id}`};function Zl(e){return e.usage(`$0 zero-trust cws policies get <policy-id>
|
|
356
|
+
Deletes the policy and cascades its policy-set membership rows. The policy sets remain.`).positional(`policy-id`,{type:`string`,description:`ID of the policy to delete`,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 Yl={command:`delete <policy-id>`,describe:`Delete a policy`,builder:Jl,handler:async e=>u({command:`zero-trust cws 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 cws policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/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,message:`Delete this policy?`}))return;let u=await l(`Deleting`,async()=>n.send(ql,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Xl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policies/${t.policy_id}`};function Zl(e){return e.usage(`$0 zero-trust cws policies get <policy-id>
|
|
381
357
|
|
|
382
358
|
Returns the policy with the specified ID.`).positional(`policy-id`,{type:`string`,description:`ID of the policy to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ql={command:`get <policy-id>`,describe:`Get a policy by ID`,builder:Zl,handler:async e=>u({command:`zero-trust cws policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/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(Xl,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var $l={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policies`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`,`package_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`,`package_path`]};function eu(e){return e.usage(`$0 zero-trust cws policies list
|
|
383
359
|
|
|
@@ -387,8 +363,7 @@ Replaces the policy's configuration. Omit tags or use {} to clear them.`).positi
|
|
|
387
363
|
|
|
388
364
|
Creates a policy set containing the specified policies and workload targets.`).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`exclude-workload-ids`,{type:`string`,array:!0,description:`Workload IDs that exclude matching requests. Exclusions take precedence.`}).option(`include-workload-ids`,{type:`string`,array:!0,description:`Workload IDs that include matching requests. Empty or omitted includes all requests before exclusions.`}).option(`name`,{type:`string`,description:`Name of the policy set`}).option(`policies`,{type:`string`,description:`Policies to include with per-membership enforcement mode. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const cu={command:`create`,describe:`Create a new policy set`,builder:su,handler:async e=>u({command:`zero-trust cws policy-sets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policy-sets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),exclude_workload_ids:e[`exclude-workload-ids`],include_workload_ids:e[`include-workload-ids`],name:_(e.name,`name`,`text`),policies:d(e.policies,`policies`),tags:m(e.tags,`tags`)},[[`tags`]]):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(ou,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`Name of the policy set`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let u=g({description:_(e.description,`description`,`text`),exclude_workload_ids:e[`exclude-workload-ids`],include_workload_ids:e[`include-workload-ids`],name:_(e.name,`name`,`text`),policies:d(e.policies,`policies`),tags:m(e.tags,`tags`)},[[`tags`]]),p=await l(`Creating`,async()=>n.send(ou,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var lu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets/${t.policy_set_id}`};function uu(e){return e.usage(`$0 zero-trust cws policy-sets delete <policy-set-id>
|
|
389
365
|
|
|
390
|
-
Deletes the policy set and cascades its deployment attachment and policy and workload membership rows. The referenced deployments, policies, and workloads remain.`).positional(`policy-set-id`,{type:`string`,description:`ID of the policy set to delete`,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 du={command:`delete <policy-set-id>`,describe:`Delete a policy set`,builder:uu,handler:async e=>u({command:`zero-trust cws policy-sets 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 cws policy-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets/${e[`policy-set-id`]==null?`<policy-set-id>`:encodeURIComponent(String(e[`policy-set-id`]))}`,pathParams:{"policy-set-id":String(e[`policy-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this policy set?`})){
|
|
391
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(lu,{account_id:a,policy_set_id:e[`policy-set-id`]}));s(u,{successLabel:`Deleted`})})};var fu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets/${t.policy_set_id}`};function pu(e){return e.usage(`$0 zero-trust cws policy-sets get <policy-set-id>
|
|
366
|
+
Deletes the policy set and cascades its deployment attachment and policy and workload membership rows. The referenced deployments, policies, and workloads remain.`).positional(`policy-set-id`,{type:`string`,description:`ID of the policy set to delete`,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 du={command:`delete <policy-set-id>`,describe:`Delete a policy set`,builder:uu,handler:async e=>u({command:`zero-trust cws policy-sets 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 cws policy-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets/${e[`policy-set-id`]==null?`<policy-set-id>`:encodeURIComponent(String(e[`policy-set-id`]))}`,pathParams:{"policy-set-id":String(e[`policy-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this policy set?`}))return;let u=await l(`Deleting`,async()=>n.send(lu,{account_id:a,policy_set_id:e[`policy-set-id`]}));s(u,{successLabel:`Deleted`})})};var fu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets/${t.policy_set_id}`};function pu(e){return e.usage(`$0 zero-trust cws policy-sets get <policy-set-id>
|
|
392
367
|
|
|
393
368
|
Returns the policy set with the specified ID.`).positional(`policy-set-id`,{type:`string`,description:`ID of the policy set to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mu={command:`get <policy-set-id>`,describe:`Get a policy set by ID`,builder:pu,handler:async e=>u({command:`zero-trust cws policy-sets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policy-sets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets/${e[`policy-set-id`]==null?`<policy-set-id>`:encodeURIComponent(String(e[`policy-set-id`]))}`,pathParams:{"policy-set-id":String(e[`policy-set-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(fu,{account_id:a,policy_set_id:e[`policy-set-id`]}));s(u,{successLabel:`Loaded`})})};var hu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`]};function gu(e){return e.usage(`$0 zero-trust cws policy-sets list
|
|
394
369
|
|
|
@@ -398,8 +373,7 @@ Replaces the policy set's configuration. Omit tags or use {} to clear them.`).po
|
|
|
398
373
|
|
|
399
374
|
Creates a JSON document that Rego can access through its import path.`).option(`import-path`,{type:`string`,description:`Unique Rego import path in the form metadata.<segment>, with one alphanumeric or underscore segment. Reference it as data.<import_path>.`}).option(`name`,{type:`string`,description:`Name of the rego metadata document (unique per account)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const wu={command:`create`,describe:`Create a new rego metadata document`,builder:Cu,handler:async e=>u({command:`zero-trust cws rego-metadata create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-metadata create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`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(Su,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`import-path`]===void 0&&(e[`import-path`]=await y(`import-path`,`Unique Rego import path in the form metadata.<segment>, with one alphanumeric or underscore segment. Reference it as data.<import_path>.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the rego metadata document (unique per account)`));let u=g({import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(Su,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Tu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata/${t.rego_metadata_id}`};function Eu(e){return e.usage(`$0 zero-trust cws rego-metadata delete <rego-metadata-id>
|
|
400
375
|
|
|
401
|
-
Deletes the specified Rego metadata document.`).positional(`rego-metadata-id`,{type:`string`,description:`ID of the rego metadata document to delete`,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 Du={command:`delete <rego-metadata-id>`,describe:`Delete a rego metadata document`,builder:Eu,handler:async e=>u({command:`zero-trust cws rego-metadata 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 cws rego-metadata delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata/${e[`rego-metadata-id`]==null?`<rego-metadata-id>`:encodeURIComponent(String(e[`rego-metadata-id`]))}`,pathParams:{"rego-metadata-id":String(e[`rego-metadata-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this Rego metadata document?`})){
|
|
402
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Tu,{account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(u,{successLabel:`Deleted`})})};var Ou={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata/${t.rego_metadata_id}`};function ku(e){return e.usage(`$0 zero-trust cws rego-metadata get <rego-metadata-id>
|
|
376
|
+
Deletes the specified Rego metadata document.`).positional(`rego-metadata-id`,{type:`string`,description:`ID of the rego metadata document to delete`,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 Du={command:`delete <rego-metadata-id>`,describe:`Delete a rego metadata document`,builder:Eu,handler:async e=>u({command:`zero-trust cws rego-metadata 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 cws rego-metadata delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata/${e[`rego-metadata-id`]==null?`<rego-metadata-id>`:encodeURIComponent(String(e[`rego-metadata-id`]))}`,pathParams:{"rego-metadata-id":String(e[`rego-metadata-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this Rego metadata document?`}))return;let u=await l(`Deleting`,async()=>n.send(Tu,{account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(u,{successLabel:`Deleted`})})};var Ou={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata/${t.rego_metadata_id}`};function ku(e){return e.usage(`$0 zero-trust cws rego-metadata get <rego-metadata-id>
|
|
403
377
|
|
|
404
378
|
Returns the Rego metadata document with the specified ID.`).positional(`rego-metadata-id`,{type:`string`,description:`ID of the rego metadata document to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Au={command:`get <rego-metadata-id>`,describe:`Get a rego metadata document by ID`,builder:ku,handler:async e=>u({command:`zero-trust cws rego-metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata/${e[`rego-metadata-id`]==null?`<rego-metadata-id>`:encodeURIComponent(String(e[`rego-metadata-id`]))}`,pathParams:{"rego-metadata-id":String(e[`rego-metadata-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(Ou,{account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(u,{successLabel:`Loaded`})})};var ju={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`]};function Mu(e){return e.usage(`$0 zero-trust cws rego-metadata list
|
|
405
379
|
|
|
@@ -409,8 +383,7 @@ Replaces the metadata document's name, import path, and JSON data.`).positional(
|
|
|
409
383
|
|
|
410
384
|
Creates a library Rego module and derives its package path from the source.`).option(`name`,{type:`string`,description:`Name of the Rego module (unique per account)`}).option(`rego-source`,{type:`string`,description:`Library Rego source with a package beginning with "lib." Maximum 16384 UTF-8 bytes.`}).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 Bu={command:`create`,describe:`Create a new Rego module`,builder:zu,handler:async e=>u({command:`zero-trust cws rego-modules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-modules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`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(Ru,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`Name of the Rego module (unique per account)`)),e[`rego-source`]===void 0&&(e[`rego-source`]=await y(`rego-source`,`Library Rego source with a package beginning with "lib." Maximum 16384 UTF-8 bytes.`));let u=g({name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`)}),d=await l(`Creating`,async()=>n.send(Ru,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Vu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules/${t.rego_module_id}`};function Hu(e){return e.usage(`$0 zero-trust cws rego-modules delete <rego-module-id>
|
|
411
385
|
|
|
412
|
-
Deletes the module if no policy or library references its rules.`).positional(`rego-module-id`,{type:`string`,description:`ID of the Rego module to delete`,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 Uu={command:`delete <rego-module-id>`,describe:`Delete a Rego module`,builder:Hu,handler:async e=>u({command:`zero-trust cws rego-modules 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 cws rego-modules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules/${e[`rego-module-id`]==null?`<rego-module-id>`:encodeURIComponent(String(e[`rego-module-id`]))}`,pathParams:{"rego-module-id":String(e[`rego-module-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this Rego module?`})){
|
|
413
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Vu,{account_id:a,rego_module_id:e[`rego-module-id`]}));s(u,{successLabel:`Deleted`})})};var Wu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules/${t.rego_module_id}`};function Gu(e){return e.usage(`$0 zero-trust cws rego-modules get <rego-module-id>
|
|
386
|
+
Deletes the module if no policy or library references its rules.`).positional(`rego-module-id`,{type:`string`,description:`ID of the Rego module to delete`,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 Uu={command:`delete <rego-module-id>`,describe:`Delete a Rego module`,builder:Hu,handler:async e=>u({command:`zero-trust cws rego-modules 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 cws rego-modules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules/${e[`rego-module-id`]==null?`<rego-module-id>`:encodeURIComponent(String(e[`rego-module-id`]))}`,pathParams:{"rego-module-id":String(e[`rego-module-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this Rego module?`}))return;let u=await l(`Deleting`,async()=>n.send(Vu,{account_id:a,rego_module_id:e[`rego-module-id`]}));s(u,{successLabel:`Deleted`})})};var Wu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules/${t.rego_module_id}`};function Gu(e){return e.usage(`$0 zero-trust cws rego-modules get <rego-module-id>
|
|
414
387
|
|
|
415
388
|
Returns the library Rego module with the specified ID.`).positional(`rego-module-id`,{type:`string`,description:`ID of the Rego module to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ku={command:`get <rego-module-id>`,describe:`Get a Rego module by ID`,builder:Gu,handler:async e=>u({command:`zero-trust cws rego-modules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-modules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules/${e[`rego-module-id`]==null?`<rego-module-id>`:encodeURIComponent(String(e[`rego-module-id`]))}`,pathParams:{"rego-module-id":String(e[`rego-module-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(Wu,{account_id:a,rego_module_id:e[`rego-module-id`]}));s(u,{successLabel:`Loaded`})})};var qu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`package_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`package_path`]};function Ju(e){return e.usage(`$0 zero-trust cws rego-modules list
|
|
416
389
|
|
|
@@ -420,20 +393,17 @@ Replaces the module and validates policies and libraries that depend on it.`).po
|
|
|
420
393
|
|
|
421
394
|
Creates an empty tenant hierarchy for the selected cloud application.`).option(`application`,{type:`string`,description:`Platform this structure models. Immutable after creation.`,choices:[`aws`,`cloudflare`]}).coerce(`application`,e=>_(e,`application`,`text`)).option(`import-path`,{type:`string`,description:`Optional unique Rego mount path in the form tenant.<application>.<name>; application must match. Omit to leave unmounted.`}).option(`name`,{type:`string`,description:`Human-readable name; unique per account`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nd={command:`create`,describe:`Create a tenant structure`,builder:td,handler:async e=>u({command:`zero-trust cws tenant-structures create`,classification:{safeFlags:[`application`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({application:e.application,import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`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(ed,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.application===void 0&&(e.application=await b(`application`,`Platform this structure models. Immutable after creation.`,[`aws`,`cloudflare`])),e.name===void 0&&(e.name=await y(`name`,`Human-readable name; unique per account`));let u=g({application:e.application,import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(ed,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var rd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}`};function id(e){return e.usage(`$0 zero-trust cws tenant-structures delete <structure-id>
|
|
422
395
|
|
|
423
|
-
Deletes the tenant structure and all nodes in its hierarchy.`).positional(`structure-id`,{type:`string`,description:`ID of the tenant structure to delete`,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 ad={command:`delete <structure-id>`,describe:`Delete a tenant structure`,builder:id,handler:async e=>u({command:`zero-trust cws tenant-structures 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 cws tenant-structures delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this tenant structure?`})){
|
|
424
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(rd,{account_id:a,structure_id:e[`structure-id`]}));s(u,{successLabel:`Deleted`})})};var od={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}`};function sd(e){return e.usage(`$0 zero-trust cws tenant-structures get <structure-id>
|
|
396
|
+
Deletes the tenant structure and all nodes in its hierarchy.`).positional(`structure-id`,{type:`string`,description:`ID of the tenant structure to delete`,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 ad={command:`delete <structure-id>`,describe:`Delete a tenant structure`,builder:id,handler:async e=>u({command:`zero-trust cws tenant-structures 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 cws tenant-structures delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this tenant structure?`}))return;let u=await l(`Deleting`,async()=>n.send(rd,{account_id:a,structure_id:e[`structure-id`]}));s(u,{successLabel:`Deleted`})})};var od={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}`};function sd(e){return e.usage(`$0 zero-trust cws tenant-structures get <structure-id>
|
|
425
397
|
|
|
426
398
|
Returns the tenant structure with the specified ID.`).positional(`structure-id`,{type:`string`,description:`ID of the tenant structure to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cd={command:`get <structure-id>`,describe:`Get a tenant structure by ID`,builder:sd,handler:async e=>u({command:`zero-trust cws tenant-structures get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}`,pathParams:{"structure-id":String(e[`structure-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(od,{account_id:a,structure_id:e[`structure-id`]}));s(u,{successLabel:`Loaded`})})};var ld={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`]};function ud(e){return e.usage(`$0 zero-trust cws tenant-structures list
|
|
427
399
|
|
|
428
400
|
Returns a paginated list of tenant structures in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by tenant structure name (case-insensitive substring match)`}).option(`import-path`,{type:`string`,description:`Filter by import path (case-sensitive literal substring match)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dd={command:`list`,describe:`List tenant structures for an account`,builder:ud,handler:async e=>u({command:`zero-trust cws tenant-structures list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,import_path:e[`import-path`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws tenant-structures list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/tenant-structures`,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(ld,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var fd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/batch`,body:`json`,errors:{503:`ServiceUnavailableError`}};function pd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes batch <structure-id>
|
|
429
401
|
|
|
430
|
-
Atomically validates and applies 1 to 500 unordered node operations. Creates may reference new parents but cannot reuse a native_id deleted in the same batch. Maximum body size: 1 MiB.`).positional(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`creates`,{type:`string`,description:`Nodes to create; parents may be created elsewhere in this request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`deletes`,{type:`string`,description:`Nodes to delete; every descendant that will not be reparented must also be deleted. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updates`,{type:`string`,description:`Nodes whose mutable fields should be fully replaced. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const md={command:`batch <structure-id>`,describe:`Apply a batch of tenant node mutations`,builder:pd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes batch`,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 cws tenant-structures nodes batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/batch`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({creates:d(e.creates,`creates`),deletes:d(e.deletes,`deletes`),updates:d(e.updates,`updates`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Apply this tenant node batch?`})){
|
|
431
|
-
`);return}if(e.body){let t=f(e.body),r=await l(`Deleting`,async()=>n.send(fd,{body:t,account_id:a,structure_id:e[`structure-id`]}));s(r,{successLabel:`Deleted`});return}if(e.creates===void 0)throw Error(`--creates is required (or pass --body with this field set).`);if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.updates===void 0)throw Error(`--updates is required (or pass --body with this field set).`);let u=g({creates:d(e.creates,`creates`),deletes:d(e.deletes,`deletes`),updates:d(e.updates,`updates`)}),p=await l(`Deleting`,async()=>n.send(fd,{body:u,account_id:a,structure_id:e[`structure-id`]}));s(p,{successLabel:`Deleted`})})};var hd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes`,body:`json`};function gd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes create <structure-id>
|
|
402
|
+
Atomically validates and applies 1 to 500 unordered node operations. Creates may reference new parents but cannot reuse a native_id deleted in the same batch. Maximum body size: 1 MiB.`).positional(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`creates`,{type:`string`,description:`Nodes to create; parents may be created elsewhere in this request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`deletes`,{type:`string`,description:`Nodes to delete; every descendant that will not be reparented must also be deleted. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updates`,{type:`string`,description:`Nodes whose mutable fields should be fully replaced. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const md={command:`batch <structure-id>`,describe:`Apply a batch of tenant node mutations`,builder:pd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes batch`,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 cws tenant-structures nodes batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/batch`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({creates:d(e.creates,`creates`),deletes:d(e.deletes,`deletes`),updates:d(e.updates,`updates`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Apply this tenant node batch?`}))return;if(e.body){let t=f(e.body),r=await l(`Deleting`,async()=>n.send(fd,{body:t,account_id:a,structure_id:e[`structure-id`]}));s(r,{successLabel:`Deleted`});return}if(e.creates===void 0)throw Error(`--creates is required (or pass --body with this field set).`);if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.updates===void 0)throw Error(`--updates is required (or pass --body with this field set).`);let u=g({creates:d(e.creates,`creates`),deletes:d(e.deletes,`deletes`),updates:d(e.updates,`updates`)}),p=await l(`Deleting`,async()=>n.send(fd,{body:u,account_id:a,structure_id:e[`structure-id`]}));s(p,{successLabel:`Deleted`})})};var hd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes`,body:`json`};function gd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes create <structure-id>
|
|
432
403
|
|
|
433
404
|
Adds a validated cloud-native node to the tenant hierarchy.`).positional(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`name`,{type:`string`,description:`Display name (e.g. an OU or account name), mutable. Optional; empty by default.`}).option(`native-id`,{type:`string`,description:`Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure's application. Immutable after create.`}).option(`node-kind`,{type:`string`,description:`Position in the tree. Legal values depend on the structure's application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.`}).option(`parent`,{type:`string`,description:`Native ID of this node's parent. Required for non-root nodes and omitted for the root. The parent must be in the same structure and able to contain this node kind.`}).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 _d={command:`create <structure-id>`,describe:`Add a node to a tenant structure`,builder:gd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),native_id:_(e[`native-id`],`native-id`,`text`),node_kind:_(e[`node-kind`],`node-kind`,`text`),parent:_(e.parent,`parent`,`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(hd,{body:t,account_id:a,structure_id:e[`structure-id`]}));s(r,{successLabel:`Created`});return}e[`native-id`]===void 0&&(e[`native-id`]=await y(`native-id`,`Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure's application. Immutable after create.`)),e[`node-kind`]===void 0&&(e[`node-kind`]=await y(`node-kind`,`Position in the tree. Legal values depend on the structure's application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.`));let u=g({name:_(e.name,`name`,`text`),native_id:_(e[`native-id`],`native-id`,`text`),node_kind:_(e[`node-kind`],`node-kind`,`text`),parent:_(e.parent,`parent`,`text`)}),d=await l(`Creating`,async()=>n.send(hd,{body:u,account_id:a,structure_id:e[`structure-id`]}));s(d,{successLabel:`Created`})})};var vd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/${t.node_id}`};function yd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes delete <node-id>
|
|
434
405
|
|
|
435
|
-
Deletes a childless node from the tenant hierarchy.`).positional(`node-id`,{type:`string`,description:`ID of the node to delete`,demandOption:!0}).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,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 bd={command:`delete <node-id>`,describe:`Delete a tenant node`,builder:yd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes 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 cws tenant-structures nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``),"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this tenant node?`})){
|
|
436
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(vd,{account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(u,{successLabel:`Deleted`})})};var xd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/${t.node_id}`};function Sd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes get <node-id>
|
|
406
|
+
Deletes a childless node from the tenant hierarchy.`).positional(`node-id`,{type:`string`,description:`ID of the node to delete`,demandOption:!0}).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,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 bd={command:`delete <node-id>`,describe:`Delete a tenant node`,builder:yd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes 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 cws tenant-structures nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``),"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this tenant node?`}))return;let u=await l(`Deleting`,async()=>n.send(vd,{account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(u,{successLabel:`Deleted`})})};var xd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/${t.node_id}`};function Sd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes get <node-id>
|
|
437
407
|
|
|
438
408
|
Returns the tenant node with the specified ID.`).positional(`node-id`,{type:`string`,description:`ID of the node to retrieve`,demandOption:!0}).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cd={command:`get <node-id>`,describe:`Get a tenant node by ID`,builder:Sd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``),"node-id":String(e[`node-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(xd,{account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(u,{successLabel:`Loaded`})})};var wd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes`,query:[`cursor`,`per_page`,`order`,`direction`,`node_kind`,`native_id`,`name`,`parent`],joined:[`cursor`,`per_page`,`order`,`direction`,`node_kind`,`native_id`,`name`,`parent`]};function Td(e){return e.usage(`$0 zero-trust cws tenant-structures nodes list
|
|
439
409
|
|
|
@@ -445,8 +415,7 @@ Updates the tenant structure's name and import path; its application remains imm
|
|
|
445
415
|
|
|
446
416
|
Creates a reusable workload selector from a filter expression.`).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`filter`,{type:`string`,description:`Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.`}).option(`name`,{type:`string`,description:`Human-readable handle; unique per account.`}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ld={command:`create`,describe:`Create a new workload`,builder:Id,handler:async e=>u({command:`zero-trust cws workloads create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws workloads create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(Fd,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.filter===void 0&&(e.filter=await y(`filter`,`Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.`)),e.name===void 0&&(e.name=await y(`name`,`Human-readable handle; unique per account.`));let u=g({description:_(e.description,`description`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(Fd,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Rd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/workloads/${t.workload_id}`};function zd(e){return e.usage(`$0 zero-trust cws workloads delete <workload-id>
|
|
447
417
|
|
|
448
|
-
Deletes the workload if it is not targeted by a policy set.`).positional(`workload-id`,{type:`string`,description:`ID of the workload to delete`,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 Bd={command:`delete <workload-id>`,describe:`Delete a workload`,builder:zd,handler:async e=>u({command:`zero-trust cws workloads 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 cws workloads delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads/${e[`workload-id`]==null?`<workload-id>`:encodeURIComponent(String(e[`workload-id`]))}`,pathParams:{"workload-id":String(e[`workload-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this workload?`})){
|
|
449
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Rd,{account_id:a,workload_id:e[`workload-id`]}));s(u,{successLabel:`Deleted`})})};var Vd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/workloads/${t.workload_id}`};function Hd(e){return e.usage(`$0 zero-trust cws workloads get <workload-id>
|
|
418
|
+
Deletes the workload if it is not targeted by a policy set.`).positional(`workload-id`,{type:`string`,description:`ID of the workload to delete`,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 Bd={command:`delete <workload-id>`,describe:`Delete a workload`,builder:zd,handler:async e=>u({command:`zero-trust cws workloads 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 cws workloads delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads/${e[`workload-id`]==null?`<workload-id>`:encodeURIComponent(String(e[`workload-id`]))}`,pathParams:{"workload-id":String(e[`workload-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Delete this workload?`}))return;let u=await l(`Deleting`,async()=>n.send(Rd,{account_id:a,workload_id:e[`workload-id`]}));s(u,{successLabel:`Deleted`})})};var Vd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/workloads/${t.workload_id}`};function Hd(e){return e.usage(`$0 zero-trust cws workloads get <workload-id>
|
|
450
419
|
|
|
451
420
|
Returns the workload with the specified ID.`).positional(`workload-id`,{type:`string`,description:`ID of the workload to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ud={command:`get <workload-id>`,describe:`Get a workload by ID`,builder:Hd,handler:async e=>u({command:`zero-trust cws workloads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws workloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads/${e[`workload-id`]==null?`<workload-id>`:encodeURIComponent(String(e[`workload-id`]))}`,pathParams:{"workload-id":String(e[`workload-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(Vd,{account_id:a,workload_id:e[`workload-id`]}));s(u,{successLabel:`Loaded`})})};var Wd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/workloads`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`]};function Gd(e){return e.usage(`$0 zero-trust cws workloads list
|
|
452
421
|
|
|
@@ -458,13 +427,11 @@ Lists available WARP client versions for a specific target environment and relea
|
|
|
458
427
|
|
|
459
428
|
Retrieves a list of all available target environments with their display names. This endpoint is in Beta.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rf={command:`list`,describe:`List available target environments`,builder:nf,handler:async e=>u({command:`zero-trust devices client-versions target-environments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices client-versions target-environments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/client-versions/target-environments`,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(tf,{account_id:a}));s(u,{successLabel:`Loaded`})})},af={command:`target-environments`,describe:`Operations for devices.client-versions.target-environments`,builder:e=>e.command(rf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},of={command:`client-versions`,describe:`Operations for devices.client-versions`,builder:e=>e.command(ef).command(af).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sf={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/physical-devices/${t.device_id}`};function cf(e){return e.usage(`$0 zero-trust devices delete <device-id>
|
|
460
429
|
|
|
461
|
-
Deletes a WARP device.`).positional(`device-id`,{type:`string`,description:`Device ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const lf={command:`delete <device-id>`,describe:`Delete device`,builder:cf,handler:async e=>u({command:`zero-trust devices 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 devices delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/physical-devices/${e[`device-id`]==null?`<device-id>`:encodeURIComponent(String(e[`device-id`]))}`,pathParams:{"device-id":String(e[`device-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
462
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(sf,{account_id:a,device_id:e[`device-id`]}));s(u,{successLabel:`Deleted`})})};var uf={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups`,body:`json`};function df(e){return e.usage(`$0 zero-trust devices deployment-groups create
|
|
430
|
+
Deletes a WARP device.`).positional(`device-id`,{type:`string`,description:`Device ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const lf={command:`delete <device-id>`,describe:`Delete device`,builder:cf,handler:async e=>u({command:`zero-trust devices 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 devices delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/physical-devices/${e[`device-id`]==null?`<device-id>`:encodeURIComponent(String(e[`device-id`]))}`,pathParams:{"device-id":String(e[`device-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(sf,{account_id:a,device_id:e[`device-id`]}));s(u,{successLabel:`Deleted`})})};var uf={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups`,body:`json`};function df(e){return e.usage(`$0 zero-trust devices deployment-groups create
|
|
463
431
|
|
|
464
432
|
Creates a new deployment group. Policy IDs must be unique across all deployment groups. This endpoint is in Beta.`).option(`name`,{type:`string`,description:`A user-friendly name for the deployment group.`}).option(`policy-ids`,{type:`string`,array:!0,description:`Contains an optional list of policy IDs assigned to a group.`}).option(`version-config`,{type:`string`,description:`Contains at least one version configuration. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ff={command:`create`,describe:`Create deployment group`,builder:df,handler:async e=>u({command:`zero-trust devices deployment-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices deployment-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),policy_ids:e[`policy-ids`],version_config:d(e[`version-config`],`version-config`)}):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(uf,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`A user-friendly name for the deployment group.`)),e[`version-config`]===void 0)throw Error(`--version-config is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),policy_ids:e[`policy-ids`],version_config:d(e[`version-config`],`version-config`)}),p=await l(`Creating`,async()=>n.send(uf,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var pf={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups/${t.group_id}`};function mf(e){return e.usage(`$0 zero-trust devices deployment-groups delete <group-id>
|
|
465
433
|
|
|
466
|
-
Deletes a deployment group. Associated policies no longer apply and devices stop receiving version targets. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hf={command:`delete <group-id>`,describe:`Delete deployment group`,builder:mf,handler:async e=>u({command:`zero-trust devices deployment-groups 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 devices deployment-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
467
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(pf,{account_id:a,group_id:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var gf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups/${t.group_id}`};function _f(e){return e.usage(`$0 zero-trust devices deployment-groups get <group-id>
|
|
434
|
+
Deletes a deployment group. Associated policies no longer apply and devices stop receiving version targets. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hf={command:`delete <group-id>`,describe:`Delete deployment group`,builder:mf,handler:async e=>u({command:`zero-trust devices deployment-groups 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 devices deployment-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-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(pf,{account_id:a,group_id:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var gf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups/${t.group_id}`};function _f(e){return e.usage(`$0 zero-trust devices deployment-groups get <group-id>
|
|
468
435
|
|
|
469
436
|
Fetches a single deployment group by its ID. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vf={command:`get <group-id>`,describe:`Get deployment group`,builder:_f,handler:async e=>u({command:`zero-trust devices deployment-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices deployment-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-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(gf,{account_id:a,group_id:e[`group-id`]}));s(u,{successLabel:`Loaded`})})};var yf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups`,query:[`page`,`per_page`]};function bf(e){return e.usage(`$0 zero-trust devices deployment-groups list
|
|
470
437
|
|
|
@@ -480,8 +447,7 @@ Fetches a single WARP device.`).positional(`device-id`,{type:`string`,descriptio
|
|
|
480
447
|
|
|
481
448
|
Creates a WARP Device IP profile. Currently, only IPv4 Device subnets can be associated.`).option(`description`,{type:`string`,description:`An optional description of the Device IP profile.`}).option(`enabled`,{type:`boolean`,description:`Whether the Device IP profile will be applied to matching devices.`,default:!0}).option(`match`,{type:`string`,description:`The wirefilter expression to match registrations. Available values: "identity.name", "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.saml_attributes".`}).option(`name`,{type:`string`,description:`A user-friendly name for the Device IP profile.`}).option(`precedence`,{type:`number`,description:`The precedence of the Device IP profile. Lower values indicate higher precedence. Device IP profile will be evaluated in ascending order of this field.`}).option(`subnet-id`,{type:`string`,description:`The ID of the Subnet.`}).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 Rf={command:`create`,describe:`Create IP profile`,builder:Lf,handler:async e=>u({command:`zero-trust devices ip-profiles create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices ip-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/ip-profiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,subnet_id:_(e[`subnet-id`],`subnet-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(If,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.match===void 0&&(e.match=await y(`match`,`The wirefilter expression to match registrations. Available values: "identity.name", "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.saml_attributes".`)),e.name===void 0&&(e.name=await y(`name`,`A user-friendly name for the Device IP profile.`)),e.precedence===void 0)throw Error(`--precedence is required (or pass --body with this field set).`);e[`subnet-id`]===void 0&&(e[`subnet-id`]=await y(`subnet-id`,`The ID of the Subnet.`));let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,subnet_id:_(e[`subnet-id`],`subnet-id`,`text`)}),d=await l(`Creating`,async()=>n.send(If,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var zf={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles/${t.profile_id}`};function Bf(e){return e.usage(`$0 zero-trust devices ip-profiles delete <profile-id>
|
|
482
449
|
|
|
483
|
-
Delete a WARP Device IP profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Vf={command:`delete <profile-id>`,describe:`Delete IP profile`,builder:Bf,handler:async e=>u({command:`zero-trust devices ip-profiles 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 devices ip-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/ip-profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
484
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(zf,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var Hf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles/${t.profile_id}`};function Uf(e){return e.usage(`$0 zero-trust devices ip-profiles get <profile-id>
|
|
450
|
+
Delete a WARP Device IP profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Vf={command:`delete <profile-id>`,describe:`Delete IP profile`,builder:Bf,handler:async e=>u({command:`zero-trust devices ip-profiles 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 devices ip-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/ip-profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-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(zf,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var Hf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles/${t.profile_id}`};function Uf(e){return e.usage(`$0 zero-trust devices ip-profiles get <profile-id>
|
|
485
451
|
|
|
486
452
|
Fetches a single WARP Device IP profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wf={command:`get <profile-id>`,describe:`Get IP profile`,builder:Uf,handler:async e=>u({command:`zero-trust devices ip-profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices ip-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/ip-profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-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(Hf,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Loaded`})})};var Gf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles`,query:[`page`,`per_page`]};function Kf(e){return e.usage(`$0 zero-trust devices ip-profiles list
|
|
487
453
|
|
|
@@ -493,8 +459,7 @@ Lists WARP devices.`).option(`cursor`,{type:`string`,description:`Opaque token i
|
|
|
493
459
|
|
|
494
460
|
Creates a new device managed network.`).option(`network-config-sha256`,{type:`string`,description:`The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.`}).option(`network-config-tls-sockaddr`,{type:`string`,description:`A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.`}).option(`name`,{type:`string`,description:`The name of the device managed network. This name must be unique.`}).option(`type`,{type:`string`,description:`The type of device managed network.`,choices:[`tls`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const rp={command:`create`,describe:`Create a device managed network`,builder:np,handler:async e=>u({command:`zero-trust devices networks create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices networks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({config:{sha256:_(e[`network-config-sha256`],`network-config-sha256`,`text`),tls_sockaddr:_(e[`network-config-tls-sockaddr`],`network-config-tls-sockaddr`,`text`)},name:_(e.name,`name`,`text`),type:e.type}):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(tp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`network-config-tls-sockaddr`]===void 0&&(e[`network-config-tls-sockaddr`]=await y(`network-config-tls-sockaddr`,`A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the device managed network. This name must be unique.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device managed network.`,[`tls`]));let u=g({config:{sha256:_(e[`network-config-sha256`],`network-config-sha256`,`text`),tls_sockaddr:_(e[`network-config-tls-sockaddr`],`network-config-tls-sockaddr`,`text`)},name:_(e.name,`name`,`text`),type:e.type}),d=await l(`Creating`,async()=>n.send(tp,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ip={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`};function ap(e){return e.usage(`$0 zero-trust devices networks delete <network-id>
|
|
495
461
|
|
|
496
|
-
Deletes a device managed network and fetches a list of the remaining device managed networks for an account.`).positional(`network-id`,{type:`string`,description:`API UUID.`,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 op={command:`delete <network-id>`,describe:`Delete a device managed network`,builder:ap,handler:async e=>u({command:`zero-trust devices networks 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 devices networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks/${e[`network-id`]==null?`<network-id>`:encodeURIComponent(String(e[`network-id`]))}`,pathParams:{"network-id":String(e[`network-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
497
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(ip,{account_id:a,network_id:e[`network-id`]}));s(u,{successLabel:`Deleted`})})};var sp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`};function cp(e){return e.usage(`$0 zero-trust devices networks get <network-id>
|
|
462
|
+
Deletes a device managed network and fetches a list of the remaining device managed networks for an account.`).positional(`network-id`,{type:`string`,description:`API UUID.`,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 op={command:`delete <network-id>`,describe:`Delete a device managed network`,builder:ap,handler:async e=>u({command:`zero-trust devices networks 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 devices networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks/${e[`network-id`]==null?`<network-id>`:encodeURIComponent(String(e[`network-id`]))}`,pathParams:{"network-id":String(e[`network-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(ip,{account_id:a,network_id:e[`network-id`]}));s(u,{successLabel:`Deleted`})})};var sp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`};function cp(e){return e.usage(`$0 zero-trust devices networks get <network-id>
|
|
498
463
|
|
|
499
464
|
Fetches details for a single managed network.`).positional(`network-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lp={command:`get <network-id>`,describe:`Get device managed network details`,builder:cp,handler:async e=>u({command:`zero-trust devices networks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices networks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks/${e[`network-id`]==null?`<network-id>`:encodeURIComponent(String(e[`network-id`]))}`,pathParams:{"network-id":String(e[`network-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(sp,{account_id:a,network_id:e[`network-id`]}));s(u,{successLabel:`Loaded`})})};var up={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/networks`};function dp(e){return e.usage(`$0 zero-trust devices networks list
|
|
500
465
|
|
|
@@ -506,8 +471,7 @@ Generates an account-wide or device-specific uninstall protection override code.
|
|
|
506
471
|
|
|
507
472
|
Create a new device posture integration.`).option(`integration-config-api-url`,{type:`string`,description:`The Workspace One API URL provided in the Workspace One Admin Dashboard.`}).option(`integration-config-auth-url`,{type:`string`,description:`The Workspace One Authorization URL depending on your region.`}).option(`integration-config-client-id`,{type:`string`,description:`The Workspace One client ID provided in the Workspace One Admin Dashboard.`}).option(`integration-config-client-secret`,{type:`string`,description:`The Workspace One client secret provided in the Workspace One Admin Dashboard.`}).option(`integration-config-customer-id`,{type:`string`,description:`The Crowdstrike customer ID.`}).option(`integration-config-client-key`,{type:`string`,description:`The Uptycs client secret.`}).option(`integration-config-access-client-id`,{type:`string`,description:"If present, this id will be passed in the `CF-Access-Client-ID` header when hitting the `api_url`."}).option(`integration-config-access-client-secret`,{type:`string`,description:"If present, this secret will be passed in the `CF-Access-Client-Secret` header when hitting the `api_url`."}).option(`interval`,{type:`string`,description:"The interval between each posture check with the third-party API. Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`)."}).option(`name`,{type:`string`,description:`The name of the device posture integration.`}).option(`type`,{type:`string`,description:`The type of device posture integration.`,choices:[`workspace_one`,`crowdstrike_s2s`,`uptycs`,`intune`,`kolide`,`tanium_s2s`,`sentinelone_s2s`,`custom_s2s`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`integration-config-api-url`,[`integration-config-customer-id`,`integration-config-client-id`,`integration-config-client-secret`]).conflicts(`integration-config-auth-url`,[`integration-config-customer-id`,`integration-config-client-key`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-auth-url`,[`integration-config-api-url`,`integration-config-client-id`,`integration-config-client-secret`]).conflicts(`integration-config-client-id`,[`integration-config-client-key`,`integration-config-customer-id`,`integration-config-access-client-id`,`integration-config-access-client-secret`,`integration-config-api-url`]).conflicts(`integration-config-client-secret`,[`integration-config-access-client-id`,`integration-config-access-client-secret`,`integration-config-api-url`]).conflicts(`integration-config-customer-id`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-api-url`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).conflicts(`integration-config-client-key`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-client-key`,[`integration-config-api-url`,`integration-config-client-secret`,`integration-config-customer-id`]).conflicts(`integration-config-access-client-id`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-client-secret`,`integration-config-customer-id`,`integration-config-client-key`]).implies(`integration-config-access-client-id`,[`integration-config-access-client-secret`,`integration-config-api-url`]).conflicts(`integration-config-access-client-secret`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-client-secret`,`integration-config-customer-id`,`integration-config-client-key`]).implies(`integration-config-access-client-secret`,[`integration-config-access-client-id`,`integration-config-api-url`])}const Cp={command:`create`,describe:`Create posture integration`,builder:Sp,handler:async e=>u({command:`zero-trust devices posture integrations create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({config:{api_url:_(e[`integration-config-api-url`],`integration-config-api-url`,`text`),auth_url:_(e[`integration-config-auth-url`],`integration-config-auth-url`,`text`),client_id:_(e[`integration-config-client-id`],`integration-config-client-id`,`text`),client_secret:_(e[`integration-config-client-secret`],`integration-config-client-secret`,`text`),customer_id:_(e[`integration-config-customer-id`],`integration-config-customer-id`,`text`),client_key:_(e[`integration-config-client-key`],`integration-config-client-key`,`text`),access_client_id:_(e[`integration-config-access-client-id`],`integration-config-access-client-id`,`text`),access_client_secret:_(e[`integration-config-access-client-secret`],`integration-config-access-client-secret`,`text`)},interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),type:e.type}):f(e.body),sensitiveBodyPaths:[[`config`,`client_secret`],[`config`,`client_key`],[`config`,`access_client_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(xp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.interval===void 0&&(e.interval=await y(`interval`,"The interval between each posture check with the third-party API. Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`).")),e.name===void 0&&(e.name=await y(`name`,`The name of the device posture integration.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device posture integration.`,[`workspace_one`,`crowdstrike_s2s`,`uptycs`,`intune`,`kolide`,`tanium_s2s`,`sentinelone_s2s`,`custom_s2s`]));let u=g({config:{api_url:_(e[`integration-config-api-url`],`integration-config-api-url`,`text`),auth_url:_(e[`integration-config-auth-url`],`integration-config-auth-url`,`text`),client_id:_(e[`integration-config-client-id`],`integration-config-client-id`,`text`),client_secret:_(e[`integration-config-client-secret`],`integration-config-client-secret`,`text`),customer_id:_(e[`integration-config-customer-id`],`integration-config-customer-id`,`text`),client_key:_(e[`integration-config-client-key`],`integration-config-client-key`,`text`),access_client_id:_(e[`integration-config-access-client-id`],`integration-config-access-client-id`,`text`),access_client_secret:_(e[`integration-config-access-client-secret`],`integration-config-access-client-secret`,`text`)},interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),type:e.type}),d=await l(`Creating`,async()=>n.send(xp,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var wp={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration/${t.integration_id}`};function Tp(e){return e.usage(`$0 zero-trust devices posture integrations delete <integration-id>
|
|
508
473
|
|
|
509
|
-
Delete a configured device posture integration.`).positional(`integration-id`,{type:`string`,description:`API UUID.`,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 Ep={command:`delete <integration-id>`,describe:`Delete posture integration`,builder:Tp,handler:async e=>u({command:`zero-trust devices posture integrations 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 devices posture integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
510
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(wp,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var Dp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration/${t.integration_id}`};function Op(e){return e.usage(`$0 zero-trust devices posture integrations get <integration-id>
|
|
474
|
+
Delete a configured device posture integration.`).positional(`integration-id`,{type:`string`,description:`API UUID.`,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 Ep={command:`delete <integration-id>`,describe:`Delete posture integration`,builder:Tp,handler:async e=>u({command:`zero-trust devices posture integrations 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 devices posture integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-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(wp,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var Dp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration/${t.integration_id}`};function Op(e){return e.usage(`$0 zero-trust devices posture integrations get <integration-id>
|
|
511
475
|
|
|
512
476
|
Fetches details for a single device posture integration.`).positional(`integration-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kp={command:`get <integration-id>`,describe:`Get posture integration`,builder:Op,handler:async e=>u({command:`zero-trust devices posture integrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-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(Dp,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Loaded`})})};var Ap={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration`};function jp(e){return e.usage(`$0 zero-trust devices posture integrations list
|
|
513
477
|
|
|
@@ -517,8 +481,7 @@ Updates a configured device posture integration.`).positional(`integration-id`,{
|
|
|
517
481
|
|
|
518
482
|
Creates a new device posture rule.`).option(`description`,{type:`string`,description:`The description of the device posture rule.`}).option(`expiration`,{type:`string`,description:`Sets the expiration time for a posture check result. If empty, the result remains valid until it is overwritten by new data from the WARP client.`}).option(`input-exists`,{type:`boolean`,description:`Whether or not file exists.`}).option(`input-operating-system`,{type:`string`,description:`Operating system.`,choices:[`windows`,`linux`,`mac`,`android`,`ios`,`chromeos`]}).coerce(`input-operating-system`,e=>_(e,`input-operating-system`,`text`)).option(`input-path`,{type:`string`,description:`File path.`}).option(`input-sha256`,{type:`string`,description:`SHA-256.`}).option(`input-thumbprint`,{type:`string`,description:`Signing certificate thumbprint.`}).option(`input-id`,{type:`string`,description:`List ID.`}).option(`input-domain`,{type:`string`,description:`Domain.`}).option(`input-operator`,{type:`string`,description:`Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-operator`,e=>_(e,`input-operator`,`text`)).option(`input-os-distro-name`,{type:`string`,description:`Operating System Distribution Name (linux only).`}).option(`input-os-distro-revision`,{type:`string`,description:`Version of OS Distribution (linux only).`}).option(`input-os-version-extra`,{type:`string`,description:`Additional operating system version details. For Windows, the UBR (Update Build Revision). For Mac or iOS, the Product Version Extra. For Linux, the distribution name and version.`}).option(`input-version`,{type:`string`,description:`Version of OS.`}).option(`input-enabled`,{type:`boolean`,description:`Enabled.`}).option(`input-check-disks`,{type:`string`,array:!0,description:`List of volume names to be checked for encryption.`}).option(`input-require-all`,{type:`boolean`,description:`Whether to check all disks for encryption.`}).option(`input-certificate-id`,{type:`string`,description:`UUID of Cloudflare managed certificate.`}).option(`input-cn`,{type:`string`,description:`Common Name that is protected by the certificate.`}).option(`input-check-private-key`,{type:`boolean`,description:`Confirm the certificate was not imported from another device. We recommend keeping this enabled unless the certificate was deployed without a private key.`}).option(`input-extended-key-usage`,{type:`string`,array:!0,description:`List of values indicating purposes for which the certificate public key can be used.`}).option(`input-locations-paths`,{type:`string`,array:!0,description:`List of paths to check for client certificate on linux.`}).option(`input-locations-trust-stores`,{type:`string`,array:!0,description:`List of trust stores to check for client certificate.`}).option(`input-subject-alternative-names`,{type:`string`,array:!0,description:`List of certificate Subject Alternative Names.`}).option(`input-update-window-days`,{type:`number`,description:`Number of days that the antivirus should be updated within.`}).option(`input-compliance-status`,{type:`string`,description:`Compliance Status.`,choices:[`compliant`,`noncompliant`,`unknown`,`notapplicable`,`ingraceperiod`,`error`]}).coerce(`input-compliance-status`,e=>_(e,`input-compliance-status`,`text`)).option(`input-connection-id`,{type:`string`,description:`Posture Integration ID.`}).option(`input-last-seen`,{type:`string`,description:`For more details on last seen, please refer to the Crowdstrike documentation.`}).option(`input-os`,{type:`string`,description:`Os Version.`}).option(`input-overall`,{type:`string`,description:`Overall.`}).option(`input-sensor-config`,{type:`string`,description:`SensorConfig.`}).option(`input-state`,{type:`string`,description:`For more details on state, please refer to the Crowdstrike documentation.`,choices:[`online`,`offline`,`unknown`]}).coerce(`input-state`,e=>_(e,`input-state`,`text`)).option(`input-version-operator`,{type:`string`,description:`Version Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-version-operator`,e=>_(e,`input-version-operator`,`text`)).option(`input-auth-state`,{type:`string`,array:!0,description:`The set of Kolide device authentication states that pass the posture check. Device must match one of the specified states.`}).option(`input-count-operator`,{type:`string`,description:`Count Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-count-operator`,e=>_(e,`input-count-operator`,`text`)).option(`input-issue-count`,{type:`string`,description:`The Number of Issues.`}).option(`input-eid-last-seen`,{type:`string`,description:`For more details on eid last seen, refer to the Tanium documentation.`}).option(`input-risk-level`,{type:`string`,description:`For more details on risk level, refer to the Tanium documentation.`,choices:[`low`,`medium`,`high`,`critical`]}).coerce(`input-risk-level`,e=>_(e,`input-risk-level`,`text`)).option(`input-score-operator`,{type:`string`,description:`Score Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-score-operator`,e=>_(e,`input-score-operator`,`text`)).option(`input-total-score`,{type:`number`,description:`For more details on total score, refer to the Tanium documentation.`}).option(`input-active-threats`,{type:`number`,description:`The Number of active threats.`}).option(`input-infected`,{type:`boolean`,description:`Whether device is infected.`}).option(`input-is-active`,{type:`boolean`,description:`Whether device is active.`}).option(`input-network-status`,{type:`string`,description:`Network status of device.`,choices:[`connected`,`disconnected`,`disconnecting`,`connecting`]}).coerce(`input-network-status`,e=>_(e,`input-network-status`,`text`)).option(`input-operational-state`,{type:`string`,description:`Agent operational state.`,choices:[`na`,`partially_disabled`,`auto_fully_disabled`,`fully_disabled`,`auto_partially_disabled`,`disabled_error`,`db_corruption`]}).coerce(`input-operational-state`,e=>_(e,`input-operational-state`,`text`)).option(`input-score`,{type:`number`,description:`A value between 0-100 assigned to devices set by the 3rd party posture provider.`}).option(`match`,{type:`string`,description:`The conditions that the client must match to run the rule. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the device posture rule.`}).option(`schedule`,{type:`string`,description:"Polling frequency for the WARP client posture check. Default: `5m` (poll every five minutes). Minimum: `1m`."}).option(`type`,{type:`string`,description:`The type of device posture rule.`,choices:[`file`,`application`,`tanium`,`gateway`,`warp`,`disk_encryption`,`serial_number`,`sentinelone`,`carbonblack`,`firewall`,`os_version`,`domain_joined`,`client_certificate`,`client_certificate_v2`,`antivirus`,`unique_client_id`,`kolide`,`tanium_s2s`,`crowdstrike_s2s`,`intune`,`workspace_one`,`sentinelone_s2s`,`custom_s2s`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`input-exists`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-operating-system`,/* @__PURE__ */ `input-id.input-check-disks.input-require-all.input-certificate-id.input-cn.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-operator.input-os.input-overall.input-sensor-config.input-state.input-version.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-path`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-sha256`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-thumbprint`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-id`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-operating-system.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-domain`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-operator`,[`input-exists`,`input-path`,`input-sha256`,`input-thumbprint`,`input-operating-system`,`input-id`,`input-domain`,`input-enabled`,`input-check-disks`,`input-require-all`,`input-certificate-id`,`input-cn`,`input-check-private-key`,`input-extended-key-usage`,`input-locations-paths`,`input-locations-trust-stores`,`input-subject-alternative-names`,`input-update-window-days`,`input-compliance-status`,`input-connection-id`,`input-auth-state`,`input-count-operator`,`input-issue-count`]).conflicts(`input-os-distro-name`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-os-distro-revision`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-os-version-extra`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-version`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-operating-system.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-version`,[`input-operating-system`,`input-operator`]).conflicts(`input-enabled`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-enabled`,[`input-operating-system`]).conflicts(`input-check-disks`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-require-all`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-certificate-id`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-cn`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-cn`,[`input-certificate-id`]).conflicts(`input-check-private-key`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-check-private-key`,[`input-certificate-id`,`input-operating-system`]).conflicts(`input-extended-key-usage`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-locations-paths`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-locations-trust-stores`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-subject-alternative-names`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-update-window-days`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-compliance-status`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-connection-id`,[`input-exists`,`input-operating-system`,`input-path`,`input-sha256`,`input-thumbprint`,`input-id`,`input-domain`,`input-operator`,`input-os-distro-name`,`input-os-distro-revision`,`input-os-version-extra`,`input-version`,`input-enabled`,`input-check-disks`,`input-require-all`,`input-certificate-id`,`input-cn`,`input-check-private-key`,`input-extended-key-usage`,`input-locations-paths`,`input-locations-trust-stores`,`input-subject-alternative-names`,`input-update-window-days`]).conflicts(`input-last-seen`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-os`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-overall`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-sensor-config`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-version-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-auth-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-count-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-issue-count`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-eid-last-seen`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-risk-level`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-score-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-total-score`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-active-threats`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).conflicts(`input-infected`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).conflicts(`input-is-active`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).conflicts(`input-network-status`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).conflicts(`input-operational-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).conflicts(`input-score`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state`.split(`.`)).implies(`input-score`,[`input-connection-id`,`input-operator`])}const zp={command:`create`,describe:`Create posture rule`,builder:Rp,handler:async e=>u({command:`zero-trust devices posture rules create`,classification:{safeFlags:[`input-exists`,`input-operating-system`,`input-operator`,`input-enabled`,`input-require-all`,`input-check-private-key`,`input-compliance-status`,`input-state`,`input-version-operator`,`input-count-operator`,`input-risk-level`,`input-score-operator`,`input-infected`,`input-is-active`,`input-network-status`,`input-operational-state`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),expiration:_(e.expiration,`expiration`,`text`),input:{exists:e[`input-exists`],operating_system:e[`input-operating-system`],path:_(e[`input-path`],`input-path`,`text`),sha256:_(e[`input-sha256`],`input-sha256`,`text`),thumbprint:_(e[`input-thumbprint`],`input-thumbprint`,`text`),id:_(e[`input-id`],`input-id`,`text`),domain:_(e[`input-domain`],`input-domain`,`text`),operator:e[`input-operator`],os_distro_name:_(e[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:_(e[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:_(e[`input-os-version-extra`],`input-os-version-extra`,`text`),version:_(e[`input-version`],`input-version`,`text`),enabled:e[`input-enabled`],checkDisks:e[`input-check-disks`],requireAll:e[`input-require-all`],certificate_id:_(e[`input-certificate-id`],`input-certificate-id`,`text`),cn:_(e[`input-cn`],`input-cn`,`text`),check_private_key:e[`input-check-private-key`],extended_key_usage:e[`input-extended-key-usage`],locations:{paths:e[`input-locations-paths`],trust_stores:e[`input-locations-trust-stores`]},subject_alternative_names:e[`input-subject-alternative-names`],update_window_days:e[`input-update-window-days`],compliance_status:e[`input-compliance-status`],connection_id:_(e[`input-connection-id`],`input-connection-id`,`text`),last_seen:_(e[`input-last-seen`],`input-last-seen`,`text`),os:_(e[`input-os`],`input-os`,`text`),overall:_(e[`input-overall`],`input-overall`,`text`),sensor_config:_(e[`input-sensor-config`],`input-sensor-config`,`text`),state:e[`input-state`],versionOperator:e[`input-version-operator`],auth_state:e[`input-auth-state`],countOperator:e[`input-count-operator`],issue_count:_(e[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:_(e[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:e[`input-risk-level`],scoreOperator:e[`input-score-operator`],total_score:e[`input-total-score`],active_threats:e[`input-active-threats`],infected:e[`input-infected`],is_active:e[`input-is-active`],network_status:e[`input-network-status`],operational_state:e[`input-operational-state`],score:e[`input-score`]},match:d(e.match,`match`),name:_(e.name,`name`,`text`),schedule:_(e.schedule,`schedule`,`text`),type:e.type}):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(Lp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the device posture rule.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device posture rule.`,[`file`,`application`,`tanium`,`gateway`,`warp`,`disk_encryption`,`serial_number`,`sentinelone`,`carbonblack`,`firewall`,`os_version`,`domain_joined`,`client_certificate`,`client_certificate_v2`,`antivirus`,`unique_client_id`,`kolide`,`tanium_s2s`,`crowdstrike_s2s`,`intune`,`workspace_one`,`sentinelone_s2s`,`custom_s2s`]));let u=g({description:_(e.description,`description`,`text`),expiration:_(e.expiration,`expiration`,`text`),input:{exists:e[`input-exists`],operating_system:e[`input-operating-system`],path:_(e[`input-path`],`input-path`,`text`),sha256:_(e[`input-sha256`],`input-sha256`,`text`),thumbprint:_(e[`input-thumbprint`],`input-thumbprint`,`text`),id:_(e[`input-id`],`input-id`,`text`),domain:_(e[`input-domain`],`input-domain`,`text`),operator:e[`input-operator`],os_distro_name:_(e[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:_(e[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:_(e[`input-os-version-extra`],`input-os-version-extra`,`text`),version:_(e[`input-version`],`input-version`,`text`),enabled:e[`input-enabled`],checkDisks:e[`input-check-disks`],requireAll:e[`input-require-all`],certificate_id:_(e[`input-certificate-id`],`input-certificate-id`,`text`),cn:_(e[`input-cn`],`input-cn`,`text`),check_private_key:e[`input-check-private-key`],extended_key_usage:e[`input-extended-key-usage`],locations:{paths:e[`input-locations-paths`],trust_stores:e[`input-locations-trust-stores`]},subject_alternative_names:e[`input-subject-alternative-names`],update_window_days:e[`input-update-window-days`],compliance_status:e[`input-compliance-status`],connection_id:_(e[`input-connection-id`],`input-connection-id`,`text`),last_seen:_(e[`input-last-seen`],`input-last-seen`,`text`),os:_(e[`input-os`],`input-os`,`text`),overall:_(e[`input-overall`],`input-overall`,`text`),sensor_config:_(e[`input-sensor-config`],`input-sensor-config`,`text`),state:e[`input-state`],versionOperator:e[`input-version-operator`],auth_state:e[`input-auth-state`],countOperator:e[`input-count-operator`],issue_count:_(e[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:_(e[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:e[`input-risk-level`],scoreOperator:e[`input-score-operator`],total_score:e[`input-total-score`],active_threats:e[`input-active-threats`],infected:e[`input-infected`],is_active:e[`input-is-active`],network_status:e[`input-network-status`],operational_state:e[`input-operational-state`],score:e[`input-score`]},match:d(e.match,`match`),name:_(e.name,`name`,`text`),schedule:_(e.schedule,`schedule`,`text`),type:e.type}),p=await l(`Creating`,async()=>n.send(Lp,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Bp={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/posture/${t.rule_id}`};function Vp(e){return e.usage(`$0 zero-trust devices posture rules delete <rule-id>
|
|
519
483
|
|
|
520
|
-
Deletes a device posture rule.`).positional(`rule-id`,{type:`string`,description:`API UUID.`,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 Hp={command:`delete <rule-id>`,describe:`Delete posture rule`,builder:Vp,handler:async e=>u({command:`zero-trust devices posture rules 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 devices posture rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
521
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Bp,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Up={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/${t.rule_id}`};function Wp(e){return e.usage(`$0 zero-trust devices posture rules get <rule-id>
|
|
484
|
+
Deletes a device posture rule.`).positional(`rule-id`,{type:`string`,description:`API UUID.`,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 Hp={command:`delete <rule-id>`,describe:`Delete posture rule`,builder:Vp,handler:async e=>u({command:`zero-trust devices posture rules 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 devices posture rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Bp,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Up={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/${t.rule_id}`};function Wp(e){return e.usage(`$0 zero-trust devices posture rules get <rule-id>
|
|
522
485
|
|
|
523
486
|
Fetches a single device posture rule.`).positional(`rule-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gp={command:`get <rule-id>`,describe:`Get posture rule`,builder:Wp,handler:async e=>u({command:`zero-trust devices posture rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Up,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var Kp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture`};function qp(e){return e.usage(`$0 zero-trust devices posture rules list
|
|
524
487
|
|
|
@@ -528,8 +491,7 @@ Updates a device posture rule.`).positional(`rule-id`,{type:`string`,description
|
|
|
528
491
|
|
|
529
492
|
Creates a device settings profile to be applied to certain devices matching the criteria.`).option(`allow-mode-switch`,{type:`boolean`,description:`Whether to allow the user to switch WARP between modes.`,default:!1}).option(`allow-updates`,{type:`boolean`,description:`Whether to receive update notifications when a new version of the client is available.`,default:!1}).option(`allowed-to-leave`,{type:`boolean`,description:`Whether to allow devices to leave the organization.`,default:!0}).option(`auto-connect`,{type:`number`,description:`The amount of time in seconds to reconnect after having been disabled.`,default:0}).option(`browser-extension-config-proxy-control`,{type:`string`,description:`Whether the user may disable the browser extension proxy.`,choices:[`unlocked`,`locked`]}).coerce(`browser-extension-config-proxy-control`,e=>_(e,`browser-extension-config-proxy-control`,`text`)).option(`browser-extension-config-proxy-enabled`,{type:`boolean`,description:`Whether the browser extension proxy is active.`}).option(`captive-portal`,{type:`number`,description:`Turn on the captive portal after the specified amount of time.`,default:180}).option(`default`,{type:`boolean`,description:`Whether the policy is the account default. WARP group profiles cannot set this field.`,default:!1}).option(`description`,{type:`string`,description:`A description of the policy.`}).option(`disable-auto-fallback`,{type:`boolean`,description:"If the `dns_server` field of a fallback domain is not present, the client will fall back to a best guess of the default/system DNS resolvers unless this policy option is set to `true`.",default:!1}).option(`dns-search-suffixes`,{type:`string`,description:`List of DNS search suffixes to apply to clients. Suffixes are evaluated in order. Use an empty array to clear. Provide as a JSON array of objects or @path/to/file.json.`}).option(`enable-device-credential-authentication`,{type:`boolean`,description:`Determines whether the WARP client can silently reauthenticate the user with device credentials (Microsoft Entra) instead of prompting for browser-based reauthentication.`,default:!1}).option(`enabled`,{type:`boolean`,description:`Whether the policy will be applied to matching devices.`,default:!0}).option(`exclude`,{type:`string`,description:`List of routes excluded in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`exclude-office-ips`,{type:`boolean`,description:`Whether to add Microsoft IPs to Split Tunnel exclusions.`,default:!1}).option(`global-acceleration-api-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the API endpoints.`}).option(`global-acceleration-autoswitch`,{type:`boolean`,description:`Automatically switch Global Acceleration regions based on device location. Defaults to false when not provided.`}).option(`global-acceleration-enabled`,{type:`boolean`,description:`Global acceleration settings are used only when "enabled".`}).option(`global-acceleration-masque-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the MASQUE tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.`}).option(`global-acceleration-wireguard-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the WireGuard tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.`}).option(`include`,{type:`string`,description:`List of routes included in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`lan-allow-minutes`,{type:`number`,description:`The amount of time in minutes a user is allowed access to their LAN. A value of 0 will allow LAN access until the next WARP reconnection, such as a reboot or a laptop waking from sleep. Note that this field is omitted from the response if null or unset.`}).option(`lan-allow-subnet-size`,{type:`number`,description:`The size of the subnet for the local access network. Note that this field is omitted from the response if null or unset.`}).option(`match`,{type:`string`,description:`The wirefilter expression to match devices. Available values: "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.service_token_uuid", "identity.saml_attributes", "network", "os.name", "os.version", "device.tags".`}).option(`name`,{type:`string`,description:`The name of the device settings profile.`}).option(`precedence`,{type:`number`,description:`The precedence of the policy. Lower values indicate higher precedence. Policies will be evaluated in ascending order of this field.`}).option(`profile-type`,{type:`string`,description:`The client type to which the device settings profile applies. This field is set when the profile is created and cannot be changed.`,choices:[`warp`,`browser_extension`],default:`warp`}).coerce(`profile-type`,e=>_(e,`profile-type`,`text`)).option(`register-interface-ip-with-dns`,{type:`boolean`,description:`Determines if the operating system will register WARP's local interface IP with your on-premises DNS server.`,default:!0}).option(`sccm-vpn-boundary-support`,{type:`boolean`,description:`Determines whether the WARP client indicates to SCCM that it is inside a VPN boundary. (Windows only).`,default:!1}).option(`service-mode-v2-mode`,{type:`string`,description:`The mode to run the WARP client under.`}).option(`service-mode-v2-port`,{type:`number`,description:`The port number when used with proxy mode.`}).option(`support-url`,{type:`string`,description:`The URL to launch when the Send Feedback button is clicked.`,default:``}).option(`switch-locked`,{type:`boolean`,description:`Whether to allow the user to turn off the WARP switch and disconnect the client.`,default:!1}).option(`tunnel-protocol`,{type:`string`,description:`Determines which tunnel protocol to use.`,default:``}).option(`uninstall-protection`,{type:`boolean`,description:`Determines whether uninstalling the WARP client requires an override code. (Windows only).`,default:!1}).option(`virtual-networks-allowed`,{type:`string`,array:!0,description:`List of virtual network IDs the device is allowed to access. When virtual_networks is set, at least one entry is required.`}).option(`virtual-networks-default`,{type:`string`,description:"The default virtual network ID. Must be included in the `allowed` list."}).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)`}).check(e=>{if([`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`].some(t=>e[t]!==void 0)){let t=[`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --browser_extension_config-* flag is set`)}return!0}).check(e=>{if([`global-acceleration-api-endpoints`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`global-acceleration-masque-endpoints`,`global-acceleration-wireguard-endpoints`].some(t=>e[t]!==void 0)){let t=[`global-acceleration-api-endpoints`,`global-acceleration-enabled`,`global-acceleration-masque-endpoints`,`global-acceleration-wireguard-endpoints`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --global_acceleration-* flag is set`)}return!0}).check(e=>{if([`virtual-networks-allowed`,`virtual-networks-default`].some(t=>e[t]!==void 0)){let t=[`virtual-networks-allowed`,`virtual-networks-default`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --virtual_networks-* flag is set`)}return!0})}const nm={command:`create`,describe:`Create a device settings profile`,builder:tm,handler:async e=>u({command:`zero-trust devices profiles custom create`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`,`default`,`disable-auto-fallback`,`enable-device-credential-authentication`,`enabled`,`exclude-office-ips`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`profile-type`,`register-interface-ip-with-dns`,`sccm-vpn-boundary-support`,`switch-locked`,`uninstall-protection`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices profiles custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],browser_extension_config:{proxy_control:e[`browser-extension-config-proxy-control`],proxy_enabled:e[`browser-extension-config-proxy-enabled`]},captive_portal:e[`captive-portal`],default:e.default,description:_(e.description,`description`,`text`),disable_auto_fallback:e[`disable-auto-fallback`],dns_search_suffixes:d(e[`dns-search-suffixes`],`dns-search-suffixes`),enable_device_credential_authentication:e[`enable-device-credential-authentication`],enabled:e.enabled,exclude:d(e.exclude,`exclude`),exclude_office_ips:e[`exclude-office-ips`],global_acceleration:{api_endpoints:e[`global-acceleration-api-endpoints`],autoswitch:e[`global-acceleration-autoswitch`],enabled:e[`global-acceleration-enabled`],masque_endpoints:e[`global-acceleration-masque-endpoints`],wireguard_endpoints:e[`global-acceleration-wireguard-endpoints`]},include:d(e.include,`include`),lan_allow_minutes:e[`lan-allow-minutes`],lan_allow_subnet_size:e[`lan-allow-subnet-size`],match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,profile_type:e[`profile-type`],register_interface_ip_with_dns:e[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:e[`sccm-vpn-boundary-support`],service_mode_v2:{mode:_(e[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:e[`service-mode-v2-port`]},support_url:_(e[`support-url`],`support-url`,`text`),switch_locked:e[`switch-locked`],tunnel_protocol:_(e[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:e[`uninstall-protection`],virtual_networks:{allowed:e[`virtual-networks-allowed`],default:_(e[`virtual-networks-default`],`virtual-networks-default`,`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(em,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the device settings profile.`));let u=g({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],browser_extension_config:{proxy_control:e[`browser-extension-config-proxy-control`],proxy_enabled:e[`browser-extension-config-proxy-enabled`]},captive_portal:e[`captive-portal`],default:e.default,description:_(e.description,`description`,`text`),disable_auto_fallback:e[`disable-auto-fallback`],dns_search_suffixes:d(e[`dns-search-suffixes`],`dns-search-suffixes`),enable_device_credential_authentication:e[`enable-device-credential-authentication`],enabled:e.enabled,exclude:d(e.exclude,`exclude`),exclude_office_ips:e[`exclude-office-ips`],global_acceleration:{api_endpoints:e[`global-acceleration-api-endpoints`],autoswitch:e[`global-acceleration-autoswitch`],enabled:e[`global-acceleration-enabled`],masque_endpoints:e[`global-acceleration-masque-endpoints`],wireguard_endpoints:e[`global-acceleration-wireguard-endpoints`]},include:d(e.include,`include`),lan_allow_minutes:e[`lan-allow-minutes`],lan_allow_subnet_size:e[`lan-allow-subnet-size`],match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,profile_type:e[`profile-type`],register_interface_ip_with_dns:e[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:e[`sccm-vpn-boundary-support`],service_mode_v2:{mode:_(e[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:e[`service-mode-v2-port`]},support_url:_(e[`support-url`],`support-url`,`text`),switch_locked:e[`switch-locked`],tunnel_protocol:_(e[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:e[`uninstall-protection`],virtual_networks:{allowed:e[`virtual-networks-allowed`],default:_(e[`virtual-networks-default`],`virtual-networks-default`,`text`)}}),p=await l(`Creating`,async()=>n.send(em,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var rm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/policy/${t.policy_id}`};function im(e){return e.usage(`$0 zero-trust devices profiles custom delete <policy-id>
|
|
530
493
|
|
|
531
|
-
Deletes a device settings profile and fetches a list of the remaining profiles for an account.`).positional(`policy-id`,{type:`string`,description:`Policy ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const am={command:`delete <policy-id>`,describe:`Delete a device settings profile`,builder:im,handler:async e=>u({command:`zero-trust devices profiles custom 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 devices profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy/${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})){
|
|
532
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(rm,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var om={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/policy/${t.policy_id}`};function sm(e){return e.usage(`$0 zero-trust devices profiles custom get <policy-id>
|
|
494
|
+
Deletes a device settings profile and fetches a list of the remaining profiles for an account.`).positional(`policy-id`,{type:`string`,description:`Policy ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const am={command:`delete <policy-id>`,describe:`Delete a device settings profile`,builder:im,handler:async e=>u({command:`zero-trust devices profiles custom 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 devices profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy/${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(rm,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var om={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/policy/${t.policy_id}`};function sm(e){return e.usage(`$0 zero-trust devices profiles custom get <policy-id>
|
|
533
495
|
|
|
534
496
|
Fetches a device settings profile by ID.`).positional(`policy-id`,{type:`string`,description:`Policy ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cm={command:`get <policy-id>`,describe:`Get device settings profile by ID`,builder:sm,handler:async e=>u({command:`zero-trust devices profiles custom get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices profiles custom get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy/${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(om,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var lm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/policies`,query:[`profile_type`]};function um(e){return e.usage(`$0 zero-trust devices profiles custom list
|
|
535
497
|
|
|
@@ -541,11 +503,9 @@ Fetches the default device settings profile for an account.`).option(`dry-run`,{
|
|
|
541
503
|
|
|
542
504
|
Updates the default device settings profile for an account.`).option(`allow-mode-switch`,{type:`boolean`,description:`Whether to allow the user to switch WARP between modes.`}).option(`allow-updates`,{type:`boolean`,description:`Whether to receive update notifications when a new version of the client is available.`}).option(`allowed-to-leave`,{type:`boolean`,description:`Whether to allow devices to leave the organization.`}).option(`auto-connect`,{type:`number`,description:`The amount of time in seconds to reconnect after having been disabled.`}).option(`captive-portal`,{type:`number`,description:`Turn on the captive portal after the specified amount of time.`}).option(`disable-auto-fallback`,{type:`boolean`,description:"If the `dns_server` field of a fallback domain is not present, the client will fall back to a best guess of the default/system DNS resolvers unless this policy option is set to `true`."}).option(`dns-search-suffixes`,{type:`string`,description:`List of DNS search suffixes to apply to clients. Suffixes are evaluated in order. Use an empty array to clear. Provide as a JSON array of objects or @path/to/file.json.`}).option(`enable-device-credential-authentication`,{type:`boolean`,description:`Determines whether the WARP client can silently reauthenticate the user with device credentials (Microsoft Entra) instead of prompting for browser-based reauthentication.`}).option(`exclude`,{type:`string`,description:`List of routes excluded in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`exclude-office-ips`,{type:`boolean`,description:`Whether to add Microsoft IPs to Split Tunnel exclusions.`}).option(`global-acceleration-api-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the API endpoints.`}).option(`global-acceleration-autoswitch`,{type:`boolean`,description:`Automatically switch Global Acceleration regions based on device location. Defaults to false when not provided.`}).option(`global-acceleration-enabled`,{type:`boolean`,description:`Global acceleration settings are used only when "enabled".`}).option(`global-acceleration-masque-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the MASQUE tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.`}).option(`global-acceleration-wireguard-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the WireGuard tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.`}).option(`include`,{type:`string`,description:`List of routes included in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`lan-allow-minutes`,{type:`number`,description:`The amount of time in minutes a user is allowed access to their LAN. A value of 0 will allow LAN access until the next WARP reconnection, such as a reboot or a laptop waking from sleep. Note that this field is omitted from the response if null or unset.`}).option(`lan-allow-subnet-size`,{type:`number`,description:`The size of the subnet for the local access network. Note that this field is omitted from the response if null or unset.`}).option(`register-interface-ip-with-dns`,{type:`boolean`,description:`Determines if the operating system will register WARP's local interface IP with your on-premises DNS server.`}).option(`sccm-vpn-boundary-support`,{type:`boolean`,description:`Determines whether the WARP client indicates to SCCM that it is inside a VPN boundary. (Windows only).`}).option(`service-mode-v2-mode`,{type:`string`,description:`The mode to run the WARP client under.`}).option(`service-mode-v2-port`,{type:`number`,description:`The port number when used with proxy mode.`}).option(`support-url`,{type:`string`,description:`The URL to launch when the Send Feedback button is clicked.`}).option(`switch-locked`,{type:`boolean`,description:`Whether to allow the user to turn off the WARP switch and disconnect the client.`}).option(`tunnel-protocol`,{type:`string`,description:`Determines which tunnel protocol to use.`}).option(`uninstall-protection`,{type:`boolean`,description:`Determines whether uninstalling the WARP client requires an override code. (Windows only).`}).option(`virtual-networks-allowed`,{type:`string`,array:!0,description:`List of virtual network IDs the device is allowed to access. When virtual_networks is set, at least one entry is required.`}).option(`virtual-networks-default`,{type:`string`,description:"The default virtual network ID. Must be included in the `allowed` list."}).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)`}).check(e=>{if([`global-acceleration-api-endpoints`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`global-acceleration-masque-endpoints`,`global-acceleration-wireguard-endpoints`].some(t=>e[t]!==void 0)){let t=[`global-acceleration-api-endpoints`,`global-acceleration-enabled`,`global-acceleration-masque-endpoints`,`global-acceleration-wireguard-endpoints`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --global_acceleration-* flag is set`)}return!0}).check(e=>{if([`virtual-networks-allowed`,`virtual-networks-default`].some(t=>e[t]!==void 0)){let t=[`virtual-networks-allowed`,`virtual-networks-default`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --virtual_networks-* flag is set`)}return!0})}const xm={command:`update`,describe:`Update the default device settings profile`,builder:bm,handler:async e=>u({command:`zero-trust devices profiles default update`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`disable-auto-fallback`,`enable-device-credential-authentication`,`exclude-office-ips`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`register-interface-ip-with-dns`,`sccm-vpn-boundary-support`,`switch-locked`,`uninstall-protection`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices profiles default update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],captive_portal:e[`captive-portal`],disable_auto_fallback:e[`disable-auto-fallback`],dns_search_suffixes:d(e[`dns-search-suffixes`],`dns-search-suffixes`),enable_device_credential_authentication:e[`enable-device-credential-authentication`],exclude:d(e.exclude,`exclude`),exclude_office_ips:e[`exclude-office-ips`],global_acceleration:{api_endpoints:e[`global-acceleration-api-endpoints`],autoswitch:e[`global-acceleration-autoswitch`],enabled:e[`global-acceleration-enabled`],masque_endpoints:e[`global-acceleration-masque-endpoints`],wireguard_endpoints:e[`global-acceleration-wireguard-endpoints`]},include:d(e.include,`include`),lan_allow_minutes:e[`lan-allow-minutes`],lan_allow_subnet_size:e[`lan-allow-subnet-size`],register_interface_ip_with_dns:e[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:e[`sccm-vpn-boundary-support`],service_mode_v2:{mode:_(e[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:e[`service-mode-v2-port`]},support_url:_(e[`support-url`],`support-url`,`text`),switch_locked:e[`switch-locked`],tunnel_protocol:_(e[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:e[`uninstall-protection`],virtual_networks:{allowed:e[`virtual-networks-allowed`],default:_(e[`virtual-networks-default`],`virtual-networks-default`,`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(`Updating`,async()=>n.send(ym,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],captive_portal:e[`captive-portal`],disable_auto_fallback:e[`disable-auto-fallback`],dns_search_suffixes:d(e[`dns-search-suffixes`],`dns-search-suffixes`),enable_device_credential_authentication:e[`enable-device-credential-authentication`],exclude:d(e.exclude,`exclude`),exclude_office_ips:e[`exclude-office-ips`],global_acceleration:{api_endpoints:e[`global-acceleration-api-endpoints`],autoswitch:e[`global-acceleration-autoswitch`],enabled:e[`global-acceleration-enabled`],masque_endpoints:e[`global-acceleration-masque-endpoints`],wireguard_endpoints:e[`global-acceleration-wireguard-endpoints`]},include:d(e.include,`include`),lan_allow_minutes:e[`lan-allow-minutes`],lan_allow_subnet_size:e[`lan-allow-subnet-size`],register_interface_ip_with_dns:e[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:e[`sccm-vpn-boundary-support`],service_mode_v2:{mode:_(e[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:e[`service-mode-v2-port`]},support_url:_(e[`support-url`],`support-url`,`text`),switch_locked:e[`switch-locked`],tunnel_protocol:_(e[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:e[`uninstall-protection`],virtual_networks:{allowed:e[`virtual-networks-allowed`],default:_(e[`virtual-networks-default`],`virtual-networks-default`,`text`)}}),p=await l(`Updating`,async()=>n.send(ym,{body:u,account_id:a}));s(p,{successLabel:`Updated`})})},Sm={command:`default`,describe:`Operations for devices.profiles.default`,builder:e=>e.command(vm).command(xm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Cm={command:`profiles`,describe:`Operations for devices.profiles`,builder:e=>e.command(hm).command(Sm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations`,query:[`id`]};function Tm(e){return e.usage(`$0 zero-trust devices registrations bulk-delete
|
|
543
505
|
|
|
544
|
-
Deletes a list of WARP registrations.`).option(`id`,{type:`string`,description:`A list of registration IDs to delete.`,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 Em={command:`bulk-delete`,describe:`Delete registrations`,builder:Tm,handler:async e=>u({command:`zero-trust devices registrations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={id:e.id};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices registrations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,!await x({force:!!e.force})){
|
|
545
|
-
`);return}let d=await l(`Deleting`,async()=>a.send(wm,{account_id:u,...n}));s(d,{successLabel:`Deleted`})})};var Dm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`};function Om(e){return e.usage(`$0 zero-trust devices registrations delete <registration-id>
|
|
506
|
+
Deletes a list of WARP registrations.`).option(`id`,{type:`string`,description:`A list of registration IDs to delete.`,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 Em={command:`bulk-delete`,describe:`Delete registrations`,builder:Tm,handler:async e=>u({command:`zero-trust devices registrations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={id:e.id};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices registrations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,!await x({force:!!e.force}))return;let d=await l(`Deleting`,async()=>a.send(wm,{account_id:u,...n}));s(d,{successLabel:`Deleted`})})};var Dm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`};function Om(e){return e.usage(`$0 zero-trust devices registrations delete <registration-id>
|
|
546
507
|
|
|
547
|
-
Deletes a WARP registration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const km={command:`delete <registration-id>`,describe:`Delete registration`,builder:Om,handler:async e=>u({command:`zero-trust devices registrations 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 devices registrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}`,pathParams:{"registration-id":String(e[`registration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
548
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Dm,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Deleted`})})};var Am={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`,query:[`include`]};function jm(e){return e.usage(`$0 zero-trust devices registrations get <registration-id>
|
|
508
|
+
Deletes a WARP registration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const km={command:`delete <registration-id>`,describe:`Delete registration`,builder:Om,handler:async e=>u({command:`zero-trust devices registrations 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 devices registrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}`,pathParams:{"registration-id":String(e[`registration-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(Dm,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Deleted`})})};var Am={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`,query:[`include`]};function jm(e){return e.usage(`$0 zero-trust devices registrations get <registration-id>
|
|
549
509
|
|
|
550
510
|
Fetches a single WARP registration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the registration response. Supported values are: "policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mm={command:`get <registration-id>`,describe:`Get registration`,builder:jm,handler:async e=>u({command:`zero-trust devices registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={include:e.include};if(e.dryRun){let t=await i();c({command:`cf zero-trust devices registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}`,pathParams:{"registration-id":String(e[`registration-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(Am,{account_id:u,registration_id:e[`registration-id`],...n}));s(d,{successLabel:`Loaded`})})};var Nm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations`,query:[`user.id`,`seen_after`,`seen_before`,`status`,`registration_type`,`per_page`,`search`,`sort_by`,`sort_order`,`cursor`,`id`,`device.id`,`policy.id`,`include`],joined:[`seen_after`,`seen_before`,`status`,`registration_type`,`per_page`,`search`,`sort_by`,`sort_order`,`cursor`,`device.id`,`policy.id`]};function Pm(e){return e.usage(`$0 zero-trust devices registrations list
|
|
551
511
|
|
|
@@ -553,8 +513,7 @@ Lists WARP registrations.`).option(`user-id`,{type:`string`,description:`Filter
|
|
|
553
513
|
|
|
554
514
|
Fetches one-time use admin override codes for a registration. This relies on the **Admin Override** setting being enabled in your device configuration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rm={command:`get <registration-id>`,describe:`Get override codes`,builder:Lm,handler:async e=>u({command:`zero-trust devices registrations override-codes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices registrations override-codes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}/override_codes`,pathParams:{"registration-id":String(e[`registration-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(Im,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Loaded`})})},zm={command:`override-codes`,describe:`Operations for devices.registrations.override-codes`,builder:e=>e.command(Rm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bm={command:`registrations`,describe:`Operations for devices.registrations`,builder:e=>e.command(Em).command(km).command(Mm).command(Fm).command(zm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/settings`};function Hm(e){return e.usage(`$0 zero-trust devices settings delete
|
|
555
515
|
|
|
556
|
-
Resets the current device settings for a Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Um={command:`delete`,describe:`Reset device settings`,builder:Hm,handler:async e=>u({command:`zero-trust devices settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/settings`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
557
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Vm,{account_id:a}));s(u,{successLabel:`Deleted`})})};var Wm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/settings`};function Gm(e){return e.usage(`$0 zero-trust devices settings get
|
|
516
|
+
Resets the current device settings for a Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Um={command:`delete`,describe:`Reset device settings`,builder:Hm,handler:async e=>u({command:`zero-trust devices settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/settings`,pathParams:{},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(Vm,{account_id:a}));s(u,{successLabel:`Deleted`})})};var Wm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/settings`};function Gm(e){return e.usage(`$0 zero-trust devices settings get
|
|
558
517
|
|
|
559
518
|
Describes the current device settings for a Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Km={command:`get`,describe:`Get device settings`,builder:Gm,handler:async e=>u({command:`zero-trust devices settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/settings`,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(Wm,{account_id:a}));s(u,{successLabel:`Loaded`})})};var qm={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/settings`,body:`json`};function Jm(e){return e.usage(`$0 zero-trust devices settings update
|
|
560
519
|
|
|
@@ -592,8 +551,7 @@ Returns unique count of devices that have run synthetic application monitoring t
|
|
|
592
551
|
|
|
593
552
|
Create a DEX Rule.`).option(`description`,{type:`string`,description:`The description field`}).option(`match`,{type:`string`,description:`The wirefilter expression to match.`}).option(`name`,{type:`string`,description:`The name of the Rule.`}).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 ig={command:`create`,describe:`Create a DEX Rule`,builder:rg,handler:async e=>u({command:`zero-trust dex rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),match:_(e.match,`match`,`text`),name:_(e.name,`name`,`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(ng,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.match===void 0&&(e.match=await y(`match`,`The wirefilter expression to match.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the Rule.`));let u=g({description:_(e.description,`description`,`text`),match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(ng,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ag={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`};function og(e){return e.usage(`$0 zero-trust dex rules delete <rule-id>
|
|
594
553
|
|
|
595
|
-
Delete a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,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 sg={command:`delete <rule-id>`,describe:`Delete a DEX Rule`,builder:og,handler:async e=>u({command:`zero-trust dex rules 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 dex rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
596
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(ag,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var cg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`};function lg(e){return e.usage(`$0 zero-trust dex rules get <rule-id>
|
|
554
|
+
Delete a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,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 sg={command:`delete <rule-id>`,describe:`Delete a DEX Rule`,builder:og,handler:async e=>u({command:`zero-trust dex rules 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 dex rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(ag,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var cg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`};function lg(e){return e.usage(`$0 zero-trust dex rules get <rule-id>
|
|
597
555
|
|
|
598
556
|
Get details for a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ug={command:`get <rule-id>`,describe:`Get DEX Rule`,builder:lg,handler:async e=>u({command:`zero-trust dex rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(cg,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var dg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/rules`,query:[`page`,`per_page`,`sort_order`,`sort_by`,`name`]};function fg(e){return e.usage(`$0 zero-trust dex rules list
|
|
599
557
|
|
|
@@ -613,8 +571,7 @@ Get percentiles for a traceroute test for a given time period between 1 hour and
|
|
|
613
571
|
|
|
614
572
|
Create a DEX test.`).option(`data-host`,{type:`string`,description:`The desired endpoint to test.`}).option(`data-kind`,{type:`string`,description:`The type of test.`,choices:[`http`,`traceroute`]}).coerce(`data-kind`,e=>_(e,`data-kind`,`text`)).option(`data-method`,{type:`string`,description:`The HTTP request method type.`,choices:[`GET`]}).coerce(`data-method`,e=>_(e,`data-method`,`text`)).option(`description`,{type:`string`,description:`Additional details about the test.`}).option(`enabled`,{type:`boolean`,description:`Determines whether or not the test is active.`}).option(`interval`,{type:`string`,description:`How often the test will run.`}).option(`name`,{type:`string`,description:`The name of the DEX test. Must be unique.`}).option(`target-policies`,{type:`string`,description:`DEX rules targeted by this test. Provide as a JSON array of objects or @path/to/file.json.`}).option(`targeted`,{type:`boolean`,description:`The targeted field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vg={command:`create`,describe:`Create Device DEX test`,builder:Bg,handler:async e=>u({command:`zero-trust dex tests create`,classification:{safeFlags:[`data-kind`,`data-method`,`enabled`,`targeted`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({data:{host:_(e[`data-host`],`data-host`,`text`),kind:e[`data-kind`],method:e[`data-method`]},description:_(e.description,`description`,`text`),enabled:e.enabled,interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),target_policies:d(e[`target-policies`],`target-policies`),targeted:e.targeted}):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(zg,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`data-host`]===void 0&&(e[`data-host`]=await y(`data-host`,`The desired endpoint to test.`)),e[`data-kind`]===void 0&&(e[`data-kind`]=await b(`data-kind`,`The type of test.`,[`http`,`traceroute`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.interval===void 0&&(e.interval=await y(`interval`,`How often the test will run.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the DEX test. Must be unique.`));let u=g({data:{host:_(e[`data-host`],`data-host`,`text`),kind:e[`data-kind`],method:e[`data-method`]},description:_(e.description,`description`,`text`),enabled:e.enabled,interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),target_policies:d(e[`target-policies`],`target-policies`),targeted:e.targeted}),p=await l(`Creating`,async()=>n.send(zg,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Hg={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`};function Ug(e){return e.usage(`$0 zero-trust dex tests delete <dex-test-id>
|
|
615
573
|
|
|
616
|
-
Delete a Device DEX test. Returns the remaining device dex tests for the account.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,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 Wg={command:`delete <dex-test-id>`,describe:`Delete Device DEX test`,builder:Ug,handler:async e=>u({command:`zero-trust dex tests 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 dex tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests/${e[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(e[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(e[`dex-test-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
617
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Hg,{account_id:a,dex_test_id:e[`dex-test-id`]}));s(u,{successLabel:`Deleted`})})};var Gg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`};function Kg(e){return e.usage(`$0 zero-trust dex tests get <dex-test-id>
|
|
574
|
+
Delete a Device DEX test. Returns the remaining device dex tests for the account.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,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 Wg={command:`delete <dex-test-id>`,describe:`Delete Device DEX test`,builder:Ug,handler:async e=>u({command:`zero-trust dex tests 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 dex tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests/${e[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(e[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(e[`dex-test-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(Hg,{account_id:a,dex_test_id:e[`dex-test-id`]}));s(u,{successLabel:`Deleted`})})};var Gg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`};function Kg(e){return e.usage(`$0 zero-trust dex tests get <dex-test-id>
|
|
618
575
|
|
|
619
576
|
Fetch a single DEX test.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qg={command:`get <dex-test-id>`,describe:`Get Device DEX test`,builder:Kg,handler:async e=>u({command:`zero-trust dex tests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests/${e[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(e[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(e[`dex-test-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(Gg,{account_id:a,dex_test_id:e[`dex-test-id`]}));s(u,{successLabel:`Loaded`})})};var Jg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests`,query:[`page`,`per_page`,`testName`,`kind`]};function Yg(e){return e.usage(`$0 zero-trust dex tests list
|
|
620
577
|
|
|
@@ -628,8 +585,7 @@ List WARP configuration and enablement toggle change events by device.`).option(
|
|
|
628
585
|
|
|
629
586
|
Creates a DLP custom prompt topic entry.`).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`profile-id`,{type:`string`,description:`The profile_id field`}).option(`topic`,{type:`string`,description:`The topic field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A new custom prompt topic to create.`})}const f_={command:`create`,describe:`Create custom prompt topic`,builder:d_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp custom-prompt-topics create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),profile_id:_(e[`profile-id`],`profile-id`,`text`),topic:_(e.topic,`topic`,`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(u_,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`)),e.topic===void 0&&(e.topic=await y(`topic`,`The topic field`));let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),profile_id:_(e[`profile-id`],`profile-id`,`text`),topic:_(e.topic,`topic`,`text`)}),d=await l(`Creating`,async()=>n.send(u_,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var p_={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics/${t.entry_id}`};function m_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics delete <entry-id>
|
|
630
587
|
|
|
631
|
-
Deletes a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h_={command:`delete <entry-id>`,describe:`Delete custom prompt topic`,builder:m_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics 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 dlp custom-prompt-topics delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
632
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(p_,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Deleted`})})};var g_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics/${t.entry_id}`};function __(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics get <entry-id>
|
|
588
|
+
Deletes a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h_={command:`delete <entry-id>`,describe:`Delete custom prompt topic`,builder:m_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics 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 dlp custom-prompt-topics delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(p_,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Deleted`})})};var g_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics/${t.entry_id}`};function __(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics get <entry-id>
|
|
633
589
|
|
|
634
590
|
Fetches a DLP custom prompt topic entry by ID.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v_={command:`get <entry-id>`,describe:`Get custom prompt topic`,builder:__,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp custom-prompt-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(g_,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Loaded`})})};var y_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics`};function b_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics list
|
|
635
591
|
|
|
@@ -639,8 +595,7 @@ Updates a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,
|
|
|
639
595
|
|
|
640
596
|
Creates a data class for use in DLP profiles.`).option(`data-tags`,{type:`string`,array:!0,description:`The data_tags field`}).option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`The expression field`}).option(`name`,{type:`string`,description:`The name field`}).option(`sensitivity-levels`,{type:`string`,description:`The sensitivity_levels field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new data class.`})}const O_={command:`create`,describe:`Creates a new data class`,builder:D_,handler:async e=>u({command:`zero-trust dlp data-classes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-classes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),name:_(e.name,`name`,`text`),sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`)}):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(E_,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`data-tags`]===void 0)throw Error(`--data-tags is required (or pass --body with this field set).`);if(e.expression===void 0&&(e.expression=await y(`expression`,`The expression field`)),e.name===void 0&&(e.name=await y(`name`,`The name field`)),e[`sensitivity-levels`]===void 0)throw Error(`--sensitivity-levels is required (or pass --body with this field set).`);let u=g({data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),name:_(e.name,`name`,`text`),sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`)}),p=await l(`Creating`,async()=>n.send(E_,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var k_={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes/${t.data_class_id}`};function A_(e){return e.usage(`$0 zero-trust dlp data-classes delete <data-class-id>
|
|
641
597
|
|
|
642
|
-
Deletes a data class from the account.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j_={command:`delete <data-class-id>`,describe:`Delete a single data class`,builder:A_,handler:async e=>u({command:`zero-trust dlp data-classes 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 dlp data-classes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes/${e[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(e[`data-class-id`]))}`,pathParams:{"data-class-id":String(e[`data-class-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
643
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(k_,{account_id:a,data_class_id:e[`data-class-id`]}));s(u,{successLabel:`Deleted`})})};var M_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes/${t.data_class_id}`};function N_(e){return e.usage(`$0 zero-trust dlp data-classes get <data-class-id>
|
|
598
|
+
Deletes a data class from the account.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j_={command:`delete <data-class-id>`,describe:`Delete a single data class`,builder:A_,handler:async e=>u({command:`zero-trust dlp data-classes 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 dlp data-classes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes/${e[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(e[`data-class-id`]))}`,pathParams:{"data-class-id":String(e[`data-class-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(k_,{account_id:a,data_class_id:e[`data-class-id`]}));s(u,{successLabel:`Deleted`})})};var M_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes/${t.data_class_id}`};function N_(e){return e.usage(`$0 zero-trust dlp data-classes get <data-class-id>
|
|
644
599
|
|
|
645
600
|
Gets the configuration for a data class.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P_={command:`get <data-class-id>`,describe:`Retrieve a specific data class`,builder:N_,handler:async e=>u({command:`zero-trust dlp data-classes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-classes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes/${e[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(e[`data-class-id`]))}`,pathParams:{"data-class-id":String(e[`data-class-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(M_,{account_id:a,data_class_id:e[`data-class-id`]}));s(u,{successLabel:`Loaded`})})};var F_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes`};function I_(e){return e.usage(`$0 zero-trust dlp data-classes list
|
|
646
601
|
|
|
@@ -650,8 +605,7 @@ Updates the configuration for a data class.`).positional(`data-class-id`,{type:`
|
|
|
650
605
|
|
|
651
606
|
Creates a data tag category, optionally from a template.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tags`,{type:`string`,description:"Tags to create with the category. Mutually exclusive with `template_id`. Provide as a JSON array of objects or @path/to/file.json."}).option(`template-id`,{type:`string`,description:`The template_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new data tag category.`})}const W_={command:`create`,describe:`Creates a new data tag category.`,builder:U_,handler:async e=>u({command:`zero-trust dlp data-tag-categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tag-categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),tags:d(e.tags,`tags`),template_id:_(e[`template-id`],`template-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(H_,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),tags:d(e.tags,`tags`),template_id:_(e[`template-id`],`template-id`,`text`)}),p=await l(`Creating`,async()=>n.send(H_,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var G_={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}`};function K_(e){return e.usage(`$0 zero-trust dlp data-tag-categories delete <category-id>
|
|
652
607
|
|
|
653
|
-
Deletes a data tag category and its tags.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q_={command:`delete <category-id>`,describe:`Delete a single data tag category.`,builder:K_,handler:async e=>u({command:`zero-trust dlp data-tag-categories 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 dlp data-tag-categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
654
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(G_,{account_id:a,category_id:e[`category-id`]}));s(u,{successLabel:`Deleted`})})};var J_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}`};function Y_(e){return e.usage(`$0 zero-trust dlp data-tag-categories get <category-id>
|
|
608
|
+
Deletes a data tag category and its tags.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q_={command:`delete <category-id>`,describe:`Delete a single data tag category.`,builder:K_,handler:async e=>u({command:`zero-trust dlp data-tag-categories 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 dlp data-tag-categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-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(G_,{account_id:a,category_id:e[`category-id`]}));s(u,{successLabel:`Deleted`})})};var J_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}`};function Y_(e){return e.usage(`$0 zero-trust dlp data-tag-categories get <category-id>
|
|
655
609
|
|
|
656
610
|
Gets a data tag category and its tags.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X_={command:`get <category-id>`,describe:`Retrieve a specific data tag category.`,builder:Y_,handler:async e=>u({command:`zero-trust dlp data-tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-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(J_,{account_id:a,category_id:e[`category-id`]}));s(u,{successLabel:`Loaded`})})};var Z_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories`};function Q_(e){return e.usage(`$0 zero-trust dlp data-tag-categories list
|
|
657
611
|
|
|
@@ -665,8 +619,7 @@ Lists available data tag category templates.`).option(`dry-run`,{type:`boolean`,
|
|
|
665
619
|
|
|
666
620
|
Creates a data tag in a category.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new data tag.`})}const pv={command:`create <category-id>`,describe:`Creates a new data tag.`,builder:fv,handler:async e=>u({command:`zero-trust dlp data-tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`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(dv,{body:t,account_id:a,category_id:e[`category-id`]}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(dv,{body:u,account_id:a,category_id:e[`category-id`]}));s(d,{successLabel:`Created`})})};var mv={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags/${t.tag_id}`};function hv(e){return e.usage(`$0 zero-trust dlp data-tags delete <tag-id>
|
|
667
621
|
|
|
668
|
-
Deletes a data tag from a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const gv={command:`delete <tag-id>`,describe:`Delete a single data tag.`,builder:hv,handler:async e=>u({command:`zero-trust dlp data-tags 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 dlp data-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``),"tag-id":String(e[`tag-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
669
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(mv,{account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(u,{successLabel:`Deleted`})})};var _v={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags/${t.tag_id}`};function vv(e){return e.usage(`$0 zero-trust dlp data-tags get <tag-id>
|
|
622
|
+
Deletes a data tag from a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const gv={command:`delete <tag-id>`,describe:`Delete a single data tag.`,builder:hv,handler:async e=>u({command:`zero-trust dlp data-tags 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 dlp data-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``),"tag-id":String(e[`tag-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(mv,{account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(u,{successLabel:`Deleted`})})};var _v={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags/${t.tag_id}`};function vv(e){return e.usage(`$0 zero-trust dlp data-tags get <tag-id>
|
|
670
623
|
|
|
671
624
|
Gets a data tag from a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yv={command:`get <tag-id>`,describe:`Retrieve a specific data tag.`,builder:vv,handler:async e=>u({command:`zero-trust dlp data-tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``),"tag-id":String(e[`tag-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(_v,{account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(u,{successLabel:`Loaded`})})};var bv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags`};function xv(e){return e.usage(`$0 zero-trust dlp data-tags list
|
|
672
625
|
|
|
@@ -687,8 +640,7 @@ the same as 1.`}).option(`name`,{type:`string`,description:`The name field`}).op
|
|
|
687
640
|
If true, the response will include a secret to use with the EDM encoder.
|
|
688
641
|
If false, the response has no secret and the dataset is uploaded in plaintext.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset description.`})}const kv={command:`create`,describe:`Create a new dataset`,builder:Ov,handler:async e=>u({command:`zero-trust dlp datasets create`,classification:{safeFlags:[`case-sensitive`,`secret`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),encoding_version:e[`encoding-version`],name:_(e.name,`name`,`text`),secret:e.secret}):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(Dv,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),encoding_version:e[`encoding-version`],name:_(e.name,`name`,`text`),secret:e.secret}),d=await l(`Creating`,async()=>n.send(Dv,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Av={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}`,response:!1};function jv(e){return e.usage(`$0 zero-trust dlp datasets delete <dataset-id>
|
|
689
642
|
|
|
690
|
-
This deletes all versions of the dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Mv={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:jv,handler:async e=>u({command:`zero-trust dlp datasets 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 dlp datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
691
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Av,{account_id:a,dataset_id:e[`dataset-id`]}));s(u,{successLabel:`Deleted`})})};var Nv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}`};function Pv(e){return e.usage(`$0 zero-trust dlp datasets get <dataset-id>
|
|
643
|
+
This deletes all versions of the dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Mv={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:jv,handler:async e=>u({command:`zero-trust dlp datasets 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 dlp datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-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(Av,{account_id:a,dataset_id:e[`dataset-id`]}));s(u,{successLabel:`Deleted`})})};var Nv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}`};function Pv(e){return e.usage(`$0 zero-trust dlp datasets get <dataset-id>
|
|
692
644
|
|
|
693
645
|
Gets a dataset and its latest upload status.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fv={command:`get <dataset-id>`,describe:`Fetch a specific dataset`,builder:Pv,handler:async e=>u({command:`zero-trust dlp datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-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(Nv,{account_id:a,dataset_id:e[`dataset-id`]}));s(u,{successLabel:`Loaded`})})};var Iv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/datasets`};function Lv(e){return e.usage(`$0 zero-trust dlp datasets list
|
|
694
646
|
|
|
@@ -698,14 +650,13 @@ Creates a new version of a DLP dataset, allowing you to stage changes before act
|
|
|
698
650
|
|
|
699
651
|
Updates the configuration of an existing DLP dataset, such as its name, description, or detection settings.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`case-sensitive`,{type:`boolean`,description:`Determines if the words should be matched in a case-sensitive manner.
|
|
700
652
|
|
|
701
|
-
Only required for custom word lists.`}).option(`description`,{type:`string`,description:`The description of the dataset.`}).option(`name`,{type:`string`,description:`The name of the dataset, must be unique.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset description.`})}const Wv={command:`update <dataset-id>`,describe:`Update details about a dataset`,builder:Uv,handler:async e=>u({command:`zero-trust dlp datasets update`,classification:{safeFlags:[`case-sensitive`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),name:_(e.name,`name`,`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(`Updating`,async()=>n.send(Hv,{body:t,account_id:a,dataset_id:e[`dataset-id`]}));s(r,{successLabel:`Updated`});return}let u=g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Hv,{body:u,account_id:a,dataset_id:e[`dataset-id`]}));s(d,{successLabel:`Updated`})})};function Gv(e){return e.usage(`$0 zero-trust dlp datasets upload <version>
|
|
653
|
+
Only required for custom word lists.`}).option(`description`,{type:`string`,description:`The description of the dataset.`}).option(`name`,{type:`string`,description:`The name of the dataset, must be unique.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset description.`})}const Wv={command:`update <dataset-id>`,describe:`Update details about a dataset`,builder:Uv,handler:async e=>u({command:`zero-trust dlp datasets update`,classification:{safeFlags:[`case-sensitive`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),name:_(e.name,`name`,`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(`Updating`,async()=>n.send(Hv,{body:t,account_id:a,dataset_id:e[`dataset-id`]}));s(r,{successLabel:`Updated`});return}let u=g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Hv,{body:u,account_id:a,dataset_id:e[`dataset-id`]}));s(d,{successLabel:`Updated`})})};function Gv(e){return e.usage(`$0 zero-trust dlp datasets upload <dataset-version>
|
|
702
654
|
|
|
703
|
-
This is used for single-column EDMv1 and Custom Word Lists. The EDM format can only be created in the Cloudflare dashboard. For other clients, this operation can only be used for non-secret Custom Word Lists. The body must be a UTF-8 encoded, newline (NL or CRNL) separated list of words to be matched.`).positional(`version`,{type:`string`,description:`Version`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset. For custom wordlists this contains UTF-8 patterns separated by newline characters.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Kv={command:`upload <version>`,describe:`Upload a new version of a dataset`,builder:Gv,handler:async e=>u({command:`zero-trust dlp datasets upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/upload/${e
|
|
655
|
+
This is used for single-column EDMv1 and Custom Word Lists. The EDM format can only be created in the Cloudflare dashboard. For other clients, this operation can only be used for non-secret Custom Word Lists. The body must be a UTF-8 encoded, newline (NL or CRNL) separated list of words to be matched.`).positional(`dataset-version`,{type:`string`,description:`Version`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset. For custom wordlists this contains UTF-8 patterns separated by newline characters.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Kv={command:`upload <dataset-version>`,describe:`Upload a new version of a dataset`,builder:Gv,handler:async e=>u({command:`zero-trust dlp datasets upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/upload/${e[`dataset-version`]==null?`<dataset-version>`:encodeURIComponent(String(e[`dataset-version`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"dataset-version":String(e[`dataset-version`]??``)},bodyKind:`octet-stream`,body:e.body});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(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(e[`dataset-id`]))}/upload/${encodeURIComponent(String(e[`dataset-version`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));s(r,{successLabel:`Created`})}else if(e.body){let t=_(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(e[`dataset-id`]))}/upload/${encodeURIComponent(String(e[`dataset-version`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));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.`)})},qv={command:`datasets`,describe:`Data Loss Prevention - manage datasets, versions, and uploads`,builder:e=>e.command(kv).command(Mv).command(Fv).command(Rv).command(Vv).command(Wv).command(Kv).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Jv={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints`,body:`json`};function Yv(e){return e.usage(`$0 zero-trust dlp document-fingerprints create
|
|
704
656
|
|
|
705
657
|
Creates a new document fingerprint for DLP scanning. Document fingerprints detect documents that are structurally similar to the uploaded sample.`).option(`description`,{type:`string`,description:`The description field`,default:``}).option(`match-percent`,{type:`number`,description:`The match_percent field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new document fingerprint.`})}const Xv={command:`create`,describe:`Creates a new document fingerprint.`,builder:Yv,handler:async e=>u({command:`zero-trust dlp document-fingerprints create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp document-fingerprints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),match_percent:e[`match-percent`],name:_(e.name,`name`,`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(Jv,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`match-percent`]===void 0)throw Error(`--match-percent is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),match_percent:e[`match-percent`],name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(Jv,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Zv={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints/${t.document_fingerprint_id}`,response:!1};function Qv(e){return e.usage(`$0 zero-trust dlp document-fingerprints delete <document-fingerprint-id>
|
|
706
658
|
|
|
707
|
-
Removes a document fingerprint from DLP configuration. Documents matching this fingerprint will no longer be detected.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $v={command:`delete <document-fingerprint-id>`,describe:`Delete a single document fingerprint.`,builder:Qv,handler:async e=>u({command:`zero-trust dlp document-fingerprints 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 dlp document-fingerprints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
708
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Zv,{account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(u,{successLabel:`Deleted`})})};var ey={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints/${t.document_fingerprint_id}`};function ty(e){return e.usage(`$0 zero-trust dlp document-fingerprints get <document-fingerprint-id>
|
|
659
|
+
Removes a document fingerprint from DLP configuration. Documents matching this fingerprint will no longer be detected.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $v={command:`delete <document-fingerprint-id>`,describe:`Delete a single document fingerprint.`,builder:Qv,handler:async e=>u({command:`zero-trust dlp document-fingerprints 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 dlp document-fingerprints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-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(Zv,{account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(u,{successLabel:`Deleted`})})};var ey={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints/${t.document_fingerprint_id}`};function ty(e){return e.usage(`$0 zero-trust dlp document-fingerprints get <document-fingerprint-id>
|
|
709
660
|
|
|
710
661
|
Gets a document fingerprint and its latest upload status.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ny={command:`get <document-fingerprint-id>`,describe:`Retrieve data about a specific document fingerprint.`,builder:ty,handler:async e=>u({command:`zero-trust dlp document-fingerprints get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp document-fingerprints get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-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(ey,{account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(u,{successLabel:`Loaded`})})};var ry={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints`};function iy(e){return e.usage(`$0 zero-trust dlp document-fingerprints list
|
|
711
662
|
|
|
@@ -723,8 +674,7 @@ Reorders DLP email scanning rules by updating their priority values. Higher prio
|
|
|
723
674
|
|
|
724
675
|
Creates a new DLP email scanning rule that defines what content patterns to detect in email messages and what actions to take.`).option(`action-action`,{type:`string`,description:`The action.action field`,choices:[`Block`]}).coerce(`action-action`,e=>_(e,`action-action`,`text`)).option(`action-message`,{type:`string`,description:`The action.message field`}).option(`conditions`,{type:`string`,description:`Triggered if all conditions match. Provide as a JSON array of objects or @path/to/file.json.`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Rule description.`})}const wy={command:`create`,describe:`Create email scanner rule`,builder:Cy,handler:async e=>u({command:`zero-trust dlp email rules create`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({action:{action:e[`action-action`],message:_(e[`action-message`],`action-message`,`text`)},conditions:d(e.conditions,`conditions`),description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`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(Sy,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`action-action`]===void 0&&(e[`action-action`]=await b(`action-action`,`The action.action field`,[`Block`])),e.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({action:{action:e[`action-action`],message:_(e[`action-message`],`action-message`,`text`)},conditions:d(e.conditions,`conditions`),description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`)}),p=await l(`Creating`,async()=>n.send(Sy,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Ty={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules/${t.rule_id}`};function Ey(e){return e.usage(`$0 zero-trust dlp email rules delete <rule-id>
|
|
725
676
|
|
|
726
|
-
Removes a DLP email scanning rule. The rule will no longer be applied to email messages.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Dy={command:`delete <rule-id>`,describe:`Delete email scanner rule`,builder:Ey,handler:async e=>u({command:`zero-trust dlp email rules 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 dlp email rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
727
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Ty,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Oy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules/${t.rule_id}`};function ky(e){return e.usage(`$0 zero-trust dlp email rules get <rule-id>
|
|
677
|
+
Removes a DLP email scanning rule. The rule will no longer be applied to email messages.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Dy={command:`delete <rule-id>`,describe:`Delete email scanner rule`,builder:Ey,handler:async e=>u({command:`zero-trust dlp email rules 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 dlp email rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Ty,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Oy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules/${t.rule_id}`};function ky(e){return e.usage(`$0 zero-trust dlp email rules get <rule-id>
|
|
728
678
|
|
|
729
679
|
Gets detailed configuration for a specific DLP email scanning rule, including detection patterns and actions.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ay={command:`get <rule-id>`,describe:`Get an email scanner rule`,builder:ky,handler:async e=>u({command:`zero-trust dlp email rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Oy,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var jy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules`};function My(e){return e.usage(`$0 zero-trust dlp email rules list
|
|
730
680
|
|
|
@@ -734,24 +684,19 @@ Updates a DLP email scanning rule.`).positional(`rule-id`,{type:`string`,descrip
|
|
|
734
684
|
|
|
735
685
|
Creates a DLP custom entry.`).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`pattern-regex`,{type:`string`,description:`The pattern.regex field`}).option(`pattern-validation`,{type:`string`,description:`The pattern.validation field`,choices:[`luhn`]}).coerce(`pattern-validation`,e=>_(e,`pattern-validation`,`text`)).option(`profile-id`,{type:`string`,description:`The profile_id field`}).option(`validator-ids`,{type:`string`,array:!0,description:`Validators the new entry should reference, by id, at most 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A new entry to create.`})}const Vy={command:`create`,describe:`Create custom entry`,builder:By,handler:async e=>u({command:`zero-trust dlp entries create`,classification:{safeFlags:[`enabled`,`pattern-validation`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),pattern:{regex:_(e[`pattern-regex`],`pattern-regex`,`text`),validation:e[`pattern-validation`]},profile_id:_(e[`profile-id`],`profile-id`,`text`),validator_ids:e[`validator-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(zy,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`)),e[`pattern-regex`]===void 0&&(e[`pattern-regex`]=await y(`pattern-regex`,`The pattern.regex field`));let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),pattern:{regex:_(e[`pattern-regex`],`pattern-regex`,`text`),validation:e[`pattern-validation`]},profile_id:_(e[`profile-id`],`profile-id`,`text`),validator_ids:e[`validator-ids`]}),d=await l(`Creating`,async()=>n.send(zy,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Hy={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`};function Uy(e){return e.usage(`$0 zero-trust dlp entries delete <entry-id>
|
|
736
686
|
|
|
737
|
-
Deletes a DLP custom entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Wy={command:`delete <entry-id>`,describe:`Delete custom entry`,builder:Uy,handler:async e=>u({command:`zero-trust dlp entries 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 dlp entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
738
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Hy,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Deleted`})})};var Gy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`};function Ky(e){return e.usage(`$0 zero-trust dlp entries get <entry-id>
|
|
687
|
+
Deletes a DLP custom entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Wy={command:`delete <entry-id>`,describe:`Delete custom entry`,builder:Uy,handler:async e=>u({command:`zero-trust dlp entries 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 dlp entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(Hy,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Deleted`})})};var Gy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`};function Ky(e){return e.usage(`$0 zero-trust dlp entries get <entry-id>
|
|
739
688
|
|
|
740
689
|
Fetches a DLP entry by ID.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qy={command:`get <entry-id>`,describe:`Get DLP Entry`,builder:Ky,handler:async e=>u({command:`zero-trust dlp entries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(Gy,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Loaded`})})};var Jy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/entries`};function Yy(e){return e.usage(`$0 zero-trust dlp entries list
|
|
741
690
|
|
|
742
691
|
Lists all DLP entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xy={command:`list`,describe:`List all entries`,builder:Yy,handler:async e=>u({command:`zero-trust dlp entries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/entries`,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(Jy,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Zy={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`,body:`json`};function Qy(e){return e.usage(`$0 zero-trust dlp entries update <entry-id>
|
|
743
692
|
|
|
744
|
-
Updates a DLP entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`
|
|
745
|
-
|
|
746
|
-
Optional, unlike the rest of this body: omitting it leaves the current attachments alone, so a
|
|
747
|
-
client that predates validators cannot detach them by accident. Send \`[]\` to detach.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`custom`,`predefined`,`integration`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update to be applied to the entry.`}).check(e=>{if([`pattern-regex`,`pattern-validation`].some(t=>e[t]!==void 0)){let t=[`pattern-regex`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --pattern-* flag is set`)}return!0})}const $y={command:`update <entry-id>`,describe:`Update entry`,builder:Qy,handler:async e=>u({command:`zero-trust dlp entries update`,classification:{safeFlags:[`pattern-validation`,`type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),pattern:{regex:_(e[`pattern-regex`],`pattern-regex`,`text`),validation:e[`pattern-validation`]},validator_ids:e[`validator-ids`],type:e.type,enabled:e.enabled}):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(Zy,{body:t,account_id:a,entry_id:e[`entry-id`]}));s(r,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await b(`type`,`The type field`,[`custom`,`predefined`,`integration`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),pattern:{regex:_(e[`pattern-regex`],`pattern-regex`,`text`),validation:e[`pattern-validation`]},validator_ids:e[`validator-ids`],type:e.type,enabled:e.enabled}),d=await l(`Updating`,async()=>n.send(Zy,{body:u,account_id:a,entry_id:e[`entry-id`]}));s(d,{successLabel:`Updated`})})},eb={command:`entries`,describe:`Data Loss Prevention - list and manage detection entries`,builder:e=>e.command(Vy).command(Wy).command(qy).command(Xy).command($y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/limits`};function nb(e){return e.usage(`$0 zero-trust dlp limits list
|
|
693
|
+
Updates a DLP entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update to be applied to the entry.`})}const $y={command:`update <entry-id>`,describe:`Update entry`,builder:Qy,handler:async e=>u({command:`zero-trust dlp entries update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({enabled:e.enabled}):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(Zy,{body:t,account_id:a,entry_id:e[`entry-id`]}));s(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=g({enabled:e.enabled}),d=await l(`Updating`,async()=>n.send(Zy,{body:u,account_id:a,entry_id:e[`entry-id`]}));s(d,{successLabel:`Updated`})})},eb={command:`entries`,describe:`Data Loss Prevention - list and manage detection entries`,builder:e=>e.command(Vy).command(Wy).command(qy).command(Xy).command($y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/limits`};function nb(e){return e.usage(`$0 zero-trust dlp limits list
|
|
748
694
|
|
|
749
695
|
Retrieves current DLP usage limits and quotas for the account, including maximum allowed counts and current usage for custom entries, dataset cells, and document fingerprints.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rb={command:`list`,describe:`Fetch limits associated with DLP for account`,builder:nb,handler:async e=>u({command:`zero-trust dlp limits list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/limits`,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(tb,{account_id:a}));s(u,{successLabel:`Loaded`})})},ib={command:`limits`,describe:`Data Loss Prevention - view account limits and resource quotas`,builder:e=>e.command(rb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ab={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/patterns/validate`,body:`json`};function ob(e){return e.usage("$0 zero-trust dlp patterns validate\n\nValidates whether this pattern is a valid regular expression. Rejects it if the regular expression is too complex or can match an unbounded-length string. The regex will be rejected if it uses `*` or `+`. Bound the maximum number of characters that can be matched using a range, e.g. `{1,100}`.").option(`max-match-bytes`,{type:`number`,description:"Maximum number of bytes that the regular expression can match.\n\nIf this is `null` then there is no limit on the length. Patterns can use\n`*` and `+`. Otherwise repeats should use a range `{m,n}` to restrict\npatterns to the length. If this field is missing, then a default length\nlimit is used.\n\nNote that the length is specified in bytes. Since regular expressions\nuse UTF-8 the pattern `.` can match up to 4 bytes. Hence `.{1,256}`\nhas a maximum length of 1024 bytes."}).option(`regex`,{type:`string`,description:`The regex field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Validation query.`})}const sb={command:`validate`,describe:`Validate a DLP regex pattern`,builder:ob,handler:async e=>u({command:`zero-trust dlp patterns validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp patterns validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/patterns/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({max_match_bytes:e[`max-match-bytes`],regex:_(e.regex,`regex`,`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(`Validating`,async()=>n.send(ab,{body:t,account_id:a}));s(r,{successLabel:`Validated`});return}e.regex===void 0&&(e.regex=await y(`regex`,`The regex field`));let u=g({max_match_bytes:e[`max-match-bytes`],regex:_(e.regex,`regex`,`text`)}),d=await l(`Validating`,async()=>n.send(ab,{body:u,account_id:a}));s(d,{successLabel:`Validated`})})},cb={command:`patterns`,describe:`Data Loss Prevention - validate regular expressions used for content detection`,builder:e=>e.command(sb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lb={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom`,body:`json`};function ub(e){return e.usage(`$0 zero-trust dlp profiles custom create
|
|
750
696
|
|
|
751
697
|
Creates a DLP custom profile.`).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`,default:!1}).option(`allowed-match-count`,{type:`number`,description:`Related DLP policies will trigger when the match count exceeds the number set.`,default:0}).option(`confidence-threshold`,{type:`string`,description:`The confidence_threshold field`,default:`low`}).option(`context-awareness-enabled`,{type:`boolean`,description:`If true, scan the context of predefined entries to only return matches surrounded by keywords.`}).option(`context-awareness-skip-files`,{type:`boolean`,description:`If the content type is a file, skip context analysis and return all matches.`}).option(`data-classes`,{type:`string`,array:!0,description:`Data class IDs to associate with the profile.`}).option(`data-tags`,{type:`string`,array:!0,description:`Data tag IDs to associate with the profile.`}).option(`description`,{type:`string`,description:`The description of the profile.`}).option(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`,default:!1}).option(`sensitivity-levels`,{type:`string`,description:`Sensitivity levels to associate with the profile. Provide as a JSON array of objects or @path/to/file.json.`}).option(`shared-entries`,{type:`string`,description:`Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A new profile to create.`}).check(e=>{if([`context-awareness-enabled`,`context-awareness-skip-files`].some(t=>e[t]!==void 0)){let t=[`context-awareness-enabled`,`context-awareness-skip-files`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --context_awareness-* flag is set`)}return!0})}const db={command:`create`,describe:`Create custom profile`,builder:ub,handler:async e=>u({command:`zero-trust dlp profiles custom create`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp profiles custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}):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(lb,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}),p=await l(`Creating`,async()=>n.send(lb,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var fb={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom/${t.profile_id}`};function pb(e){return e.usage(`$0 zero-trust dlp profiles custom delete <profile-id>
|
|
752
698
|
|
|
753
|
-
Deletes a DLP custom profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mb={command:`delete <profile-id>`,describe:`Delete custom profile`,builder:pb,handler:async e=>u({command:`zero-trust dlp profiles custom 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 dlp profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
754
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(fb,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var hb={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom/${t.profile_id}`,body:`json`};function gb(e){return e.usage(`$0 zero-trust dlp profiles custom update <profile-id>
|
|
699
|
+
Deletes a DLP custom profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mb={command:`delete <profile-id>`,describe:`Delete custom profile`,builder:pb,handler:async e=>u({command:`zero-trust dlp profiles custom 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 dlp profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-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(fb,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var hb={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom/${t.profile_id}`,body:`json`};function gb(e){return e.usage(`$0 zero-trust dlp profiles custom update <profile-id>
|
|
755
700
|
|
|
756
701
|
Updates a DLP custom profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`}).option(`allowed-match-count`,{type:`number`,description:`The allowed_match_count field`}).option(`confidence-threshold`,{type:`string`,description:`The confidence_threshold field`}).option(`context-awareness-enabled`,{type:`boolean`,description:`If true, scan the context of predefined entries to only return matches surrounded by keywords.`}).option(`context-awareness-skip-files`,{type:`boolean`,description:`If the content type is a file, skip context analysis and return all matches.`}).option(`data-classes`,{type:`string`,array:!0,description:`Data class IDs to associate with the profile. If omitted, existing associations are unchanged.`}).option(`data-tags`,{type:`string`,array:!0,description:`Data tag IDs to associate with the profile. If omitted, existing associations are unchanged.`}).option(`description`,{type:`string`,description:`The description of the profile.`}).option(`entries`,{type:`string`,description:`Custom entries from this profile.
|
|
757
702
|
If this field is omitted, entries owned by this profile will not be changed. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`}).option(`sensitivity-levels`,{type:`string`,description:`Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. Provide as a JSON array of objects or @path/to/file.json.`}).option(`shared-entries`,{type:`string`,description:`Other entries, e.g. predefined or integration. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updated parameters for the profile.`}).check(e=>{if([`context-awareness-enabled`,`context-awareness-skip-files`].some(t=>e[t]!==void 0)){let t=[`context-awareness-enabled`,`context-awareness-skip-files`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --context_awareness-* flag is set`)}return!0})}const _b={command:`update <profile-id>`,describe:`Update custom profile`,builder:gb,handler:async e=>u({command:`zero-trust dlp profiles custom update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp profiles custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}):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(hb,{body:t,account_id:a,profile_id:e[`profile-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}),p=await l(`Updating`,async()=>n.send(hb,{body:u,account_id:a,profile_id:e[`profile-id`]}));s(p,{successLabel:`Updated`})})},vb={command:`custom`,describe:`Data Loss Prevention - manage custom profiles`,builder:e=>e.command(db).command(mb).command(_b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/${t.profile_id}`};function bb(e){return e.usage(`$0 zero-trust dlp profiles get <profile-id>
|
|
@@ -768,8 +713,7 @@ Lists available sensitivity group templates.`).option(`dry-run`,{type:`boolean`,
|
|
|
768
713
|
|
|
769
714
|
Creates a sensitivity group, optionally from a template.`).option(`description`,{type:`string`,description:`The description field`}).option(`levels`,{type:`string`,description:"Levels to create with the group. Mutually exclusive with `template_id`. Provide as a JSON array of objects or @path/to/file.json."}).option(`name`,{type:`string`,description:`The name field`}).option(`template-id`,{type:`string`,description:`The template_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new sensitivity group.`})}const zb={command:`create`,describe:`Creates a new sensitivity group.`,builder:Rb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),levels:d(e.levels,`levels`),name:_(e.name,`name`,`text`),template_id:_(e[`template-id`],`template-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(Lb,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),levels:d(e.levels,`levels`),name:_(e.name,`name`,`text`),template_id:_(e[`template-id`],`template-id`,`text`)}),p=await l(`Creating`,async()=>n.send(Lb,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Bb={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}`};function Vb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups delete <sensitivity-group-id>
|
|
770
715
|
|
|
771
|
-
Deletes a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Hb={command:`delete <sensitivity-group-id>`,describe:`Delete a single sensitivity group.`,builder:Vb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups 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 dlp sensitivity-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
772
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Bb,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Deleted`})})};var Ub={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/level_order`};function Wb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get-level-order <sensitivity-group-id>
|
|
716
|
+
Deletes a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Hb={command:`delete <sensitivity-group-id>`,describe:`Delete a single sensitivity group.`,builder:Vb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups 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 dlp sensitivity-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-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(Bb,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Deleted`})})};var Ub={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/level_order`};function Wb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get-level-order <sensitivity-group-id>
|
|
773
717
|
|
|
774
718
|
Gets the current order of sensitivity levels in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gb={command:`get-level-order <sensitivity-group-id>`,describe:`Retrieve the ordered list of level IDs for a sensitivity group.`,builder:Wb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups get-level-order`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups get-level-order`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-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(Ub,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Loaded`})})};var Kb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}`};function qb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get <sensitivity-group-id>
|
|
775
719
|
|
|
@@ -783,8 +727,7 @@ Updates a sensitivity group and its levels.`).positional(`sensitivity-group-id`,
|
|
|
783
727
|
|
|
784
728
|
Creates a sensitivity level in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new sensitivity level.`})}const sx={command:`create <sensitivity-group-id>`,describe:`Creates a new sensitivity level.`,builder:ox,handler:async e=>u({command:`zero-trust dlp sensitivity-levels create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`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(ax,{body:t,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(ax,{body:u,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(d,{successLabel:`Created`})})};var cx={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels/${t.sensitivity_level_id}`};function lx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels delete <sensitivity-level-id>
|
|
785
729
|
|
|
786
|
-
Deletes a sensitivity level from a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ux={command:`delete <sensitivity-level-id>`,describe:`Delete a single sensitivity level.`,builder:lx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels 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 dlp sensitivity-levels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
787
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(cx,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(u,{successLabel:`Deleted`})})};var dx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels/${t.sensitivity_level_id}`};function fx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels get <sensitivity-level-id>
|
|
730
|
+
Deletes a sensitivity level from a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ux={command:`delete <sensitivity-level-id>`,describe:`Delete a single sensitivity level.`,builder:lx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels 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 dlp sensitivity-levels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-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(cx,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(u,{successLabel:`Deleted`})})};var dx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels/${t.sensitivity_level_id}`};function fx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels get <sensitivity-level-id>
|
|
788
731
|
|
|
789
732
|
Gets a sensitivity level from a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const px={command:`get <sensitivity-level-id>`,describe:`Retrieve a specific sensitivity level.`,builder:fx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-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(dx,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(u,{successLabel:`Loaded`})})};var mx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels`};function hx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels list
|
|
790
733
|
|
|
@@ -792,8 +735,7 @@ Lists sensitivity levels in a sensitivity group.`).option(`sensitivity-group-id`
|
|
|
792
735
|
|
|
793
736
|
Updates a sensitivity level in a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the sensitivity level to update.`})}const yx={command:`update <sensitivity-level-id>`,describe:`Update the attributes of a single sensitivity level.`,builder:vx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`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(`Updating`,async()=>n.send(_x,{body:t,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(_x,{body:u,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(d,{successLabel:`Updated`})})},bx={command:`sensitivity-levels`,describe:`Data Loss Prevention - manage sensitivity levels within sensitivity groups`,builder:e=>e.command(sx).command(ux).command(px).command(gx).command(yx).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xx={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/settings`};function Sx(e){return e.usage(`$0 zero-trust dlp settings delete
|
|
794
737
|
|
|
795
|
-
Deletes account-level DLP settings and returns the initial values.`).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 Cx={command:`delete`,describe:`Delete (reset) DLP account-level settings to initial values.`,builder:Sx,handler:async e=>u({command:`zero-trust dlp settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
796
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(xx,{account_id:a}));s(u,{successLabel:`Deleted`})})};var wx={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dlp/settings`,body:`json`};function Tx(e){return e.usage(`$0 zero-trust dlp settings edit
|
|
738
|
+
Deletes account-level DLP settings and returns the initial values.`).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 Cx={command:`delete`,describe:`Delete (reset) DLP account-level settings to initial values.`,builder:Sx,handler:async e=>u({command:`zero-trust dlp settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/settings`,pathParams:{},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(xx,{account_id:a}));s(u,{successLabel:`Deleted`})})};var wx={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dlp/settings`,body:`json`};function Tx(e){return e.usage(`$0 zero-trust dlp settings edit
|
|
797
739
|
|
|
798
740
|
Missing fields keep their existing values.`).option(`ai-context-analysis`,{type:`boolean`,description:`Whether AI context analysis is enabled at the account level.`}).option(`ocr`,{type:`boolean`,description:`Whether OCR is enabled at the account level.`}).option(`payload-logging-masking-level`,{type:`string`,description:"Masking level for payload logs.\n\n- `full`: The entire payload is masked.\n- `partial`: Only partial payload content is masked.\n- `clear`: No masking is applied to the payload content.\n- `default`: DLP uses its default masking behavior.",choices:[`full`,`partial`,`clear`,`default`]}).coerce(`payload-logging-masking-level`,e=>_(e,`payload-logging-masking-level`,`text`)).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
|
|
799
741
|
|
|
@@ -819,8 +761,7 @@ Words are stored as sent.
|
|
|
819
761
|
|
|
820
762
|
For example, a validator for medical record numbers might use
|
|
821
763
|
\`[{"word": "patient", "weight": "strong"}, {"word": "diagnosis", "weight": "moderate"},
|
|
822
|
-
{"word": "mrn", "weight": "weak"}]\`. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new validator.`})}const Hx={command:`create`,describe:`Create a proximity word validator`,builder:Vx,handler:async e=>u({command:`zero-trust dlp validators proximity-words create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}):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(Bx,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e.words===void 0)throw Error(`--words is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}),p=await l(`Creating`,async()=>n.send(Bx,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Ux={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`};function Wx(e){return e.usage("$0 zero-trust dlp validators proximity-words delete <validator-id>\n\nDeletes a `proximity_words` validator. Fails with `409` while any detection entry is still attached to it; detach it from those entries first.").positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Gx={command:`delete <validator-id>`,describe:`Delete a proximity word validator`,builder:Wx,handler:async e=>u({command:`zero-trust dlp validators proximity-words 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 dlp validators proximity-words delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
823
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Ux,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Deleted`})})};var Kx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`};function qx(e){return e.usage(`$0 zero-trust dlp validators proximity-words get <validator-id>
|
|
764
|
+
{"word": "mrn", "weight": "weak"}]\`. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new validator.`})}const Hx={command:`create`,describe:`Create a proximity word validator`,builder:Vx,handler:async e=>u({command:`zero-trust dlp validators proximity-words create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}):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(Bx,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e.words===void 0)throw Error(`--words is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}),p=await l(`Creating`,async()=>n.send(Bx,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Ux={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`};function Wx(e){return e.usage("$0 zero-trust dlp validators proximity-words delete <validator-id>\n\nDeletes a `proximity_words` validator. Fails with `409` while any detection entry is still attached to it; detach it from those entries first.").positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Gx={command:`delete <validator-id>`,describe:`Delete a proximity word validator`,builder:Wx,handler:async e=>u({command:`zero-trust dlp validators proximity-words 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 dlp validators proximity-words delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(Ux,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Deleted`})})};var Kx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`};function qx(e){return e.usage(`$0 zero-trust dlp validators proximity-words get <validator-id>
|
|
824
765
|
|
|
825
766
|
Fetches a \`proximity_words\` validator by ID.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jx={command:`get <validator-id>`,describe:`Get a proximity word validator`,builder:qx,handler:async e=>u({command:`zero-trust dlp validators proximity-words get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(Kx,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Loaded`})})};var Yx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words`};function Xx(e){return e.usage(`$0 zero-trust dlp validators proximity-words list
|
|
826
767
|
|
|
@@ -834,8 +775,7 @@ For example, a validator for medical record numbers might use
|
|
|
834
775
|
\`[{"word": "patient", "weight": "strong"}, {"word": "diagnosis", "weight": "moderate"},
|
|
835
776
|
{"word": "mrn", "weight": "weak"}]\`. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the validator to update.`})}const eS={command:`update <validator-id>`,describe:`Update a proximity word validator`,builder:$x,handler:async e=>u({command:`zero-trust dlp validators proximity-words update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}):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(Qx,{body:t,account_id:a,validator_id:e[`validator-id`]}));s(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e.words===void 0)throw Error(`--words is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}),p=await l(`Updating`,async()=>n.send(Qx,{body:u,account_id:a,validator_id:e[`validator-id`]}));s(p,{successLabel:`Updated`})})},tS={command:`proximity-words`,describe:`Data Loss Prevention - manage proximity-word validators`,builder:e=>e.command(Hx).command(Gx).command(Jx).command(Zx).command(eS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nS={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker`,body:`json`};function rS(e){return e.usage(`$0 zero-trust dlp validators worker create
|
|
836
777
|
|
|
837
|
-
Registers a customer Worker as a validator. An account may own at most 100 validators across all kinds.`).option(`default`,{type:`string`,description:`The default field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`name`,{type:`string`,description:`A name for this validator, at most 50 characters.`}).option(`script-tag`,{type:`string`,description:`The public script tag of the customer's Worker that scores matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new validator.`})}const iS={command:`create`,describe:`Create a worker validator`,builder:rS,handler:async e=>u({command:`zero-trust dlp validators worker create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`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(nS,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await y(`script-tag`,`The public script tag of the customer's Worker that scores matches.`));let u=g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`text`)}),d=await l(`Creating`,async()=>n.send(nS,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var aS={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`};function oS(e){return e.usage("$0 zero-trust dlp validators worker delete <validator-id>\n\nDeletes a `worker` validator. Fails with `409` while any detection entry is still attached to it; detach it from those entries first.").positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const sS={command:`delete <validator-id>`,describe:`Delete a worker validator`,builder:oS,handler:async e=>u({command:`zero-trust dlp validators worker 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 dlp validators worker delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
838
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(aS,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Deleted`})})};var cS={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`};function lS(e){return e.usage(`$0 zero-trust dlp validators worker get <validator-id>
|
|
778
|
+
Registers a customer Worker as a validator. An account may own at most 100 validators across all kinds.`).option(`default`,{type:`string`,description:`The default field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`name`,{type:`string`,description:`A name for this validator, at most 50 characters.`}).option(`script-tag`,{type:`string`,description:`The public script tag of the customer's Worker that scores matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new validator.`})}const iS={command:`create`,describe:`Create a worker validator`,builder:rS,handler:async e=>u({command:`zero-trust dlp validators worker create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`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(nS,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await y(`script-tag`,`The public script tag of the customer's Worker that scores matches.`));let u=g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`text`)}),d=await l(`Creating`,async()=>n.send(nS,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var aS={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`};function oS(e){return e.usage("$0 zero-trust dlp validators worker delete <validator-id>\n\nDeletes a `worker` validator. Fails with `409` while any detection entry is still attached to it; detach it from those entries first.").positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const sS={command:`delete <validator-id>`,describe:`Delete a worker validator`,builder:oS,handler:async e=>u({command:`zero-trust dlp validators worker 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 dlp validators worker delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(aS,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Deleted`})})};var cS={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`};function lS(e){return e.usage(`$0 zero-trust dlp validators worker get <validator-id>
|
|
839
779
|
|
|
840
780
|
Fetches a \`worker\` validator by ID.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uS={command:`get <validator-id>`,describe:`Get a worker validator`,builder:lS,handler:async e=>u({command:`zero-trust dlp validators worker get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(cS,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Loaded`})})};var dS={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker`};function fS(e){return e.usage(`$0 zero-trust dlp validators worker list
|
|
841
781
|
|
|
@@ -853,8 +793,7 @@ Create a new Zero Trust certificate.`).option(`validity-period-days`,{type:`numb
|
|
|
853
793
|
|
|
854
794
|
Unbind a single Zero Trust certificate from the edge.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const BS={command:`deactivate <certificate-id>`,describe:`Deactivate a Zero Trust certificate`,builder:zS,handler:async e=>u({command:`zero-trust gateway certificates deactivate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway certificates deactivate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}/deactivate`,pathParams:{"certificate-id":String(e[`certificate-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,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Created`})})};var VS={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}`};function HS(e){return e.usage(`$0 zero-trust gateway certificates delete <certificate-id>
|
|
855
795
|
|
|
856
|
-
Delete a gateway-managed Zero Trust certificate. You must deactivate the certificate from the edge (inactive) before deleting it.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,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 US={command:`delete <certificate-id>`,describe:`Delete Zero Trust certificate`,builder:HS,handler:async e=>u({command:`zero-trust gateway certificates 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 gateway certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
857
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(VS,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Deleted`})})};var WS={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}`};function GS(e){return e.usage(`$0 zero-trust gateway certificates get <certificate-id>
|
|
796
|
+
Delete a gateway-managed Zero Trust certificate. You must deactivate the certificate from the edge (inactive) before deleting it.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,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 US={command:`delete <certificate-id>`,describe:`Delete Zero Trust certificate`,builder:HS,handler:async e=>u({command:`zero-trust gateway certificates 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 gateway certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-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(VS,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Deleted`})})};var WS={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}`};function GS(e){return e.usage(`$0 zero-trust gateway certificates get <certificate-id>
|
|
858
797
|
|
|
859
798
|
Get a single Zero Trust certificate.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const KS={command:`get <certificate-id>`,describe:`Get Zero Trust certificate details`,builder:GS,handler:async e=>u({command:`zero-trust gateway certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-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(WS,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Loaded`})})};var qS={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/certificates`};function JS(e){return e.usage(`$0 zero-trust gateway certificates list
|
|
860
799
|
|
|
@@ -872,8 +811,7 @@ Retrieve information about the current Zero Trust account.`).option(`dry-run`,{t
|
|
|
872
811
|
|
|
873
812
|
Creates a new Zero Trust list.`).option(`description`,{type:`string`,description:`Provide the list description.`}).option(`items`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Specify the list name.`}).option(`type`,{type:`string`,description:`Specify the list type.`,choices:[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yC={command:`create`,describe:`Create Zero Trust list`,builder:vC,handler:async e=>u({command:`zero-trust gateway lists create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),items:d(e.items,`items`),name:_(e.name,`name`,`text`),type:e.type}):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(_C,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`Specify the list name.`)),e.type===void 0&&(e.type=await b(`type`,`Specify the list type.`,[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]));let u=g({description:_(e.description,`description`,`text`),items:d(e.items,`items`),name:_(e.name,`name`,`text`),type:e.type}),p=await l(`Creating`,async()=>n.send(_C,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var bC={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`};function xC(e){return e.usage(`$0 zero-trust gateway lists delete <list-id>
|
|
874
813
|
|
|
875
|
-
Deletes a Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,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 SC={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:xC,handler:async e=>u({command:`zero-trust gateway lists 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 gateway lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
876
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(bC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`,body:`json`};function CC(e){return e.usage(`$0 zero-trust gateway lists edit <list-id>
|
|
814
|
+
Deletes a Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,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 SC={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:xC,handler:async e=>u({command:`zero-trust gateway lists 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 gateway lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-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(bC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`,body:`json`};function CC(e){return e.usage(`$0 zero-trust gateway lists edit <list-id>
|
|
877
815
|
|
|
878
816
|
Appends or removes an item from a configured Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`append`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`remove`,{type:`string`,array:!0,description:`Lists of item values you want to remove.`}).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 wC={command:`edit <list-id>`,describe:`Patch Zero Trust list.`,builder:CC,handler:async e=>u({command:`zero-trust gateway lists edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({append:d(e.append,`append`),remove:e.remove}):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($,{body:t,account_id:a,list_id:e[`list-id`]}));s(r,{successLabel:`Updated`});return}let u=g({append:d(e.append,`append`),remove:e.remove}),p=await l(`Updating`,async()=>n.send($,{body:u,account_id:a,list_id:e[`list-id`]}));s(p,{successLabel:`Updated`})})};var TC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`};function EC(e){return e.usage(`$0 zero-trust gateway lists get <list-id>
|
|
879
817
|
|
|
@@ -887,8 +825,7 @@ Updates a configured Zero Trust list. Skips updating list items if not included
|
|
|
887
825
|
|
|
888
826
|
Create a new Zero Trust Gateway location.`).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`,default:!1}).option(`dns64-enabled`,{type:`boolean`,description:`Enable DNS64 synthesis for DNS queries matched to this location. When updating a location, omitting this field resets it to false.`,default:!1}).option(`dns-destination-ips-id`,{type:`string`,description:`Specify the identifier of the pair of IPv4 addresses assigned to this location. When creating a location, if this field is absent or set to null, the pair of shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. When updating a location, if this field is absent or set to null, the pre-assigned pair remains unchanged.`}).option(`ecs-support`,{type:`boolean`,description:`Indicate whether the location must resolve EDNS queries.`,default:!1}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).option(`endpoints-doh-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-doh-require-token`,{type:`boolean`,description:`Specify whether the DOH endpoint requires user identity authentication.`}).option(`endpoints-dot-enabled`,{type:`boolean`,description:`Indicate whether the DOT endpoint is enabled for this location.`}).option(`endpoints-dot-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-ipv4-enabled`,{type:`boolean`,description:`Indicate whether the IPv4 endpoint is enabled for this location.`}).option(`endpoints-ipv6-enabled`,{type:`boolean`,description:`Indicate whether the IPV6 endpoint is enabled for this location.`}).option(`endpoints-ipv6-networks`,{type:`string`,description:`Specify the list of allowed source IPv6 network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`max-ttl-mode`,{type:`string`,description:"`inherit` uses the account `max_ttl_secs`. `override` uses this location's `ttl_secs`. `disabled` leaves returned TTLs unchanged.",choices:[`inherit`,`override`,`disabled`]}).coerce(`max-ttl-mode`,e=>_(e,`max-ttl-mode`,`text`)).option(`max-ttl-ttl-secs`,{type:`number`,description:"Location-specific cap on DNS response TTLs, in seconds. Required when `mode` is `override`. Must be omitted when `mode` is `inherit` or `disabled`."}).option(`name`,{type:`string`,description:`Specify the location name.`}).option(`networks`,{type:`string`,description:`Specify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0)){let t=[`max-ttl-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --max_ttl-* flag is set`)}return!0})}const VC={command:`create`,describe:`Create a Zero Trust Gateway location`,builder:BC,handler:async e=>u({command:`zero-trust gateway locations create`,classification:{safeFlags:[`client-default`,`dns64-enabled`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway locations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({client_default:e[`client-default`],dns64_enabled:e[`dns64-enabled`],dns_destination_ips_id:_(e[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:e[`ecs-support`],endpoints:{doh:{enabled:e[`endpoints-doh-enabled`],networks:d(e[`endpoints-doh-networks`],`endpoints-doh-networks`),require_token:e[`endpoints-doh-require-token`]},dot:{enabled:e[`endpoints-dot-enabled`],networks:d(e[`endpoints-dot-networks`],`endpoints-dot-networks`)},ipv4:{enabled:e[`endpoints-ipv4-enabled`]},ipv6:{enabled:e[`endpoints-ipv6-enabled`],networks:d(e[`endpoints-ipv6-networks`],`endpoints-ipv6-networks`)}},max_ttl:{mode:e[`max-ttl-mode`],ttl_secs:e[`max-ttl-ttl-secs`]},name:_(e.name,`name`,`text`),networks:d(e.networks,`networks`)}):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(zC,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`Specify the location name.`));let u=g({client_default:e[`client-default`],dns64_enabled:e[`dns64-enabled`],dns_destination_ips_id:_(e[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:e[`ecs-support`],endpoints:{doh:{enabled:e[`endpoints-doh-enabled`],networks:d(e[`endpoints-doh-networks`],`endpoints-doh-networks`),require_token:e[`endpoints-doh-require-token`]},dot:{enabled:e[`endpoints-dot-enabled`],networks:d(e[`endpoints-dot-networks`],`endpoints-dot-networks`)},ipv4:{enabled:e[`endpoints-ipv4-enabled`]},ipv6:{enabled:e[`endpoints-ipv6-enabled`],networks:d(e[`endpoints-ipv6-networks`],`endpoints-ipv6-networks`)}},max_ttl:{mode:e[`max-ttl-mode`],ttl_secs:e[`max-ttl-ttl-secs`]},name:_(e.name,`name`,`text`),networks:d(e.networks,`networks`)}),p=await l(`Creating`,async()=>n.send(zC,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var HC={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function UC(e){return e.usage(`$0 zero-trust gateway locations delete <location-id>
|
|
889
827
|
|
|
890
|
-
Delete a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const WC={command:`delete <location-id>`,describe:`Delete a Zero Trust Gateway location`,builder:UC,handler:async e=>u({command:`zero-trust gateway locations 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 gateway locations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations/${e[`location-id`]==null?`<location-id>`:encodeURIComponent(String(e[`location-id`]))}`,pathParams:{"location-id":String(e[`location-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
891
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(HC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Deleted`})})};var GC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function KC(e){return e.usage(`$0 zero-trust gateway locations get <location-id>
|
|
828
|
+
Delete a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const WC={command:`delete <location-id>`,describe:`Delete a Zero Trust Gateway location`,builder:UC,handler:async e=>u({command:`zero-trust gateway locations 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 gateway locations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations/${e[`location-id`]==null?`<location-id>`:encodeURIComponent(String(e[`location-id`]))}`,pathParams:{"location-id":String(e[`location-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(HC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Deleted`})})};var GC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function KC(e){return e.usage(`$0 zero-trust gateway locations get <location-id>
|
|
892
829
|
|
|
893
830
|
Get a single Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qC={command:`get <location-id>`,describe:`Get Zero Trust Gateway location details`,builder:KC,handler:async e=>u({command:`zero-trust gateway locations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations/${e[`location-id`]==null?`<location-id>`:encodeURIComponent(String(e[`location-id`]))}`,pathParams:{"location-id":String(e[`location-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(GC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Loaded`})})};var JC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations`,query:[`filter`,`search`,`order_by`,`direction`]};function YC(e){return e.usage(`$0 zero-trust gateway locations list
|
|
894
831
|
|
|
@@ -902,8 +839,7 @@ Update logging settings for the current Zero Trust account.`).option(`redact-pii
|
|
|
902
839
|
|
|
903
840
|
Create a new Zero Trust Gateway PAC file.`).option(`contents`,{type:`string`,description:`Actual contents of the PAC file`}).option(`description`,{type:`string`,description:`Detailed description of the PAC file.`}).option(`name`,{type:`string`,description:`Name of the PAC file.`}).option(`slug`,{type:`string`,description:`URL-friendly version of the PAC file name. If not provided, it will be auto-generated`}).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 uw={command:`create`,describe:`Create a PAC file`,builder:lw,handler:async e=>u({command:`zero-trust gateway pacfiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway pacfiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({contents:_(e.contents,`contents`,`text`),description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),slug:_(e.slug,`slug`,`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(cw,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.contents===void 0&&(e.contents=await y(`contents`,`Actual contents of the PAC file`)),e.name===void 0&&(e.name=await y(`name`,`Name of the PAC file.`));let u=g({contents:_(e.contents,`contents`,`text`),description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),slug:_(e.slug,`slug`,`text`)}),d=await l(`Creating`,async()=>n.send(cw,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var dw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function fw(e){return e.usage(`$0 zero-trust gateway pacfiles delete <pacfile-id>
|
|
904
841
|
|
|
905
|
-
Delete a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const pw={command:`delete <pacfile-id>`,describe:`Delete a PAC file`,builder:fw,handler:async e=>u({command:`zero-trust gateway pacfiles 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 gateway pacfiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles/${e[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(e[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(e[`pacfile-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
906
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(dw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Deleted`})})};var mw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function hw(e){return e.usage(`$0 zero-trust gateway pacfiles get <pacfile-id>
|
|
842
|
+
Delete a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const pw={command:`delete <pacfile-id>`,describe:`Delete a PAC file`,builder:fw,handler:async e=>u({command:`zero-trust gateway pacfiles 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 gateway pacfiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles/${e[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(e[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(e[`pacfile-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(dw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Deleted`})})};var mw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function hw(e){return e.usage(`$0 zero-trust gateway pacfiles get <pacfile-id>
|
|
907
843
|
|
|
908
844
|
Get a single Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gw={command:`get <pacfile-id>`,describe:`Get a PAC file`,builder:hw,handler:async e=>u({command:`zero-trust gateway pacfiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway pacfiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles/${e[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(e[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(e[`pacfile-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(mw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Loaded`})})};var _w={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles`,query:[`page`,`per_page`]};function vw(e){return e.usage(`$0 zero-trust gateway pacfiles list
|
|
909
845
|
|
|
@@ -913,8 +849,7 @@ Update a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type
|
|
|
913
849
|
|
|
914
850
|
Create a new Zero Trust Gateway proxy endpoint.`).option(`kind`,{type:`string`,description:`The proxy endpoint kind.`,choices:[`ip`,`identity`],default:`ip`}).coerce(`kind`,e=>_(e,`kind`,`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 Ew={command:`create`,describe:`Create a proxy endpoint`,builder:Tw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints create`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({kind:e.kind}):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(ww,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=g({kind:e.kind}),d=await l(`Creating`,async()=>n.send(ww,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Dw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`};function Ow(e){return e.usage(`$0 zero-trust gateway proxy-endpoints delete <proxy-endpoint-id>
|
|
915
851
|
|
|
916
|
-
Delete a configured Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpoint-id`,{type:`string`,description:`Proxy endpoint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const kw={command:`delete <proxy-endpoint-id>`,describe:`Delete a proxy endpoint`,builder:Ow,handler:async e=>u({command:`zero-trust gateway proxy-endpoints 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 gateway proxy-endpoints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints/${e[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(e[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(e[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
917
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Dw,{account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(u,{successLabel:`Deleted`})})};var Aw={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`,body:`json`};function jw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints edit <proxy-endpoint-id>
|
|
852
|
+
Delete a configured Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpoint-id`,{type:`string`,description:`Proxy endpoint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const kw={command:`delete <proxy-endpoint-id>`,describe:`Delete a proxy endpoint`,builder:Ow,handler:async e=>u({command:`zero-trust gateway proxy-endpoints 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 gateway proxy-endpoints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints/${e[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(e[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(e[`proxy-endpoint-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(Dw,{account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(u,{successLabel:`Deleted`})})};var Aw={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`,body:`json`};function jw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints edit <proxy-endpoint-id>
|
|
918
853
|
|
|
919
854
|
Update a configured Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpoint-id`,{type:`string`,description:`Proxy endpoint ID`,demandOption:!0}).option(`ips`,{type:`string`,array:!0,description:`Specify the list of CIDRs to restrict ingress connections.`}).option(`name`,{type:`string`,description:`Specify the name of the proxy endpoint.`}).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 Mw={command:`edit <proxy-endpoint-id>`,describe:`Update a proxy endpoint`,builder:jw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints/${e[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(e[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(e[`proxy-endpoint-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({ips:e.ips,name:_(e.name,`name`,`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(`Updating`,async()=>n.send(Aw,{body:t,account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(r,{successLabel:`Updated`});return}let u=g({ips:e.ips,name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Aw,{body:u,account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(d,{successLabel:`Updated`})})};var Nw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`};function Pw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints get <proxy-endpoint-id>
|
|
920
855
|
|
|
@@ -924,8 +859,7 @@ List all Zero Trust Gateway proxy endpoints for an account.`).option(`filter`,{t
|
|
|
924
859
|
|
|
925
860
|
Create a new Zero Trust Gateway rule.`).option(`action`,{type:`string`,description:"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",choices:[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`]}).coerce(`action`,e=>_(e,`action`,`text`)).option(`description`,{type:`string`,description:`Specify the rule description.`}).option(`device-posture`,{type:`string`,description:`Specify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`,default:``}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`,default:!1}).option(`expiration-duration`,{type:`number`,description:"Defines the default duration a policy active in minutes. Must set in order to use the `reset_expiration` endpoint on this rule."}).option(`expiration-expires-at`,{type:`string`,description:`The expiration.expires_at field`}).option(`filters`,{type:`string`,array:!0,description:`Specify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.`}).option(`identity`,{type:`string`,description:`Specify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`,default:``}).option(`name`,{type:`string`,description:`Specify the rule name.`}).option(`precedence`,{type:`number`,description:`Set the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) to manage precedence via Terraform.`}).option(`rule-settings-add-headers`,{type:`string`,description:"Add custom headers to allowed requests as key-value pairs. Use header names as keys that map to arrays of header values. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-allow-child-bypass`,{type:`boolean`,description:`Set to enable MSP children to bypass this rule. Only parent MSP accounts can set this. this rule. Settable for all types of rules.`}).option(`rule-settings-biso-admin-controls-copy`,{type:`string`,description:`Configure copy behavior. If set to remote_only, users cannot copy isolated content from the remote browser to the local clipboard. If this field is absent, copying remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-copy`,e=>_(e,`rule-settings-biso-admin-controls-copy`,`text`)).option(`rule-settings-biso-admin-controls-dcp`,{type:`boolean`,description:'Set to false to enable copy-pasting. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dd`,{type:`boolean`,description:'Set to false to enable downloading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dk`,{type:`boolean`,description:'Set to false to enable keyboard usage. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-download`,{type:`string`,description:`Configure download behavior. When set to remote_only, users can view downloads but cannot save them. If this field is absent, downloading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-download`,e=>_(e,`rule-settings-biso-admin-controls-download`,`text`)).option(`rule-settings-biso-admin-controls-dp`,{type:`boolean`,description:'Set to false to enable printing. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-du`,{type:`boolean`,description:'Set to false to enable uploading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-keyboard`,{type:`string`,description:`Configure keyboard usage behavior. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-keyboard`,e=>_(e,`rule-settings-biso-admin-controls-keyboard`,`text`)).option(`rule-settings-biso-admin-controls-paste`,{type:`string`,description:`Configure paste behavior. If set to remote_only, users cannot paste content from the local clipboard into isolated pages. If this field is absent, pasting remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-paste`,e=>_(e,`rule-settings-biso-admin-controls-paste`,`text`)).option(`rule-settings-biso-admin-controls-printing`,{type:`string`,description:`Configure print behavior. Default, Printing is enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-printing`,e=>_(e,`rule-settings-biso-admin-controls-printing`,`text`)).option(`rule-settings-biso-admin-controls-upload`,{type:`string`,description:`Configure upload behavior. If this field is absent, uploading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-upload`,e=>_(e,`rule-settings-biso-admin-controls-upload`,`text`)).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).coerce(`rule-settings-biso-admin-controls-version`,e=>_(e,`rule-settings-biso-admin-controls-version`,`text`)).option(`rule-settings-biso-admin-controls-wm-id`,{type:`string`,description:`Specify the watermark ID (UUID) to apply to the isolated browser session. When present, enables watermark rendering in the isolated browser.`}).option(`rule-settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-block-page-enabled`,{type:`boolean`,description:"Enable the custom block page. Settable only for `dns` rules with action `block`."}).option(`rule-settings-block-reason`,{type:`string`,description:"Explain why the rule blocks the request. The custom block page shows this text (if enabled). Settable only for `dns`, `l4`, and `http` rules when the action set to `block`."}).option(`rule-settings-bypass-parent-rule`,{type:`boolean`,description:`Set to enable MSP accounts to bypass their parent's rules. Only MSP child accounts can set this. Settable for all types of rules.`}).option(`rule-settings-check-session-duration`,{type:`string`,description:`Sets the required session freshness threshold. The API returns a normalized version of this value.`}).option(`rule-settings-check-session-enforce`,{type:`boolean`,description:`Enable session enforcement.`}).option(`rule-settings-delete-headers`,{type:`string`,array:!0,description:"Remove headers from allowed requests by name. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes. Settable only for `http` rules with the action set to `allow`."}).option(`rule-settings-dns-resolvers-ipv4`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv4 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-dns-resolvers-ipv6`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv6 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-egress-ipv4`,{type:`string`,description:`Specify the IPv4 address to use for egress.`}).option(`rule-settings-egress-ipv4-fallback`,{type:`string`,description:`Specify the fallback IPv4 address to use for egress when the primary IPv4 fails. Set '0.0.0.0' to indicate local egress via WARP IPs.`}).option(`rule-settings-egress-ipv6`,{type:`string`,description:`Specify the IPv6 range to use for egress.`}).option(`rule-settings-forensic-copy-enabled`,{type:`boolean`,description:`Enable sending the copy to storage.`}).option(`rule-settings-ignore-cname-category-matches`,{type:`boolean`,description:"Ignore category matches at CNAME domains in a response. When off, evaluate categories in this rule against all CNAME domain categories in the response. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-insecure-disable-dnssec-validation`,{type:`boolean`,description:"Specify whether to disable DNSSEC validation (for Allow actions) [INSECURE]. Settable only for `dns` rules."}).option(`rule-settings-ip-categories`,{type:`boolean`,description:"Enable IPs in DNS resolver category blocks. The system blocks only domain name categories unless you enable this setting. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-ip-indicator-feeds`,{type:`boolean`,description:"Indicates whether to include IPs in DNS resolver indicator feed blocks. Default, indicator feeds block only domain names. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-l4override-ip`,{type:`string`,description:`Defines the IPv4 or IPv6 address.`}).option(`rule-settings-l4override-port`,{type:`number`,description:`Defines a port number to use for TCP/UDP overrides.`}).option(`rule-settings-notification-settings-enabled`,{type:`boolean`,description:`Enable notification.`}).option(`rule-settings-notification-settings-include-context`,{type:`boolean`,description:`Indicates whether to pass the context information as query parameters.`}).option(`rule-settings-notification-settings-msg`,{type:`string`,description:`Customize the message shown in the notification.`}).option(`rule-settings-notification-settings-support-url`,{type:`string`,description:`Defines an optional URL to direct users to additional information. If unset, the notification opens a block page.`}).option(`rule-settings-override-host`,{type:`string`,description:"Defines a hostname for override, for the matching DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-override-ips`,{type:`string`,array:!0,description:"Defines a an IP or set of IPs for overriding matched DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-payload-log-enabled`,{type:`boolean`,description:`Enable DLP payload logging for this rule.`}).option(`rule-settings-quarantine-file-types`,{type:`string`,array:!0,description:`Specify the types of files to sandbox.`}).option(`rule-settings-redirect-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-redirect-preserve-path-and-query`,{type:`boolean`,description:`Specify whether to append the path and query parameters from the original request to target_uri.`}).option(`rule-settings-redirect-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-resolve-dns-internally-fallback`,{type:`string`,description:`Specify the fallback behavior to apply when the internal DNS response code differs from 'NOERROR' or when the response data contains only CNAME records for 'A' or 'AAAA' queries.`,choices:[`none`,`public_dns`]}).coerce(`rule-settings-resolve-dns-internally-fallback`,e=>_(e,`rule-settings-resolve-dns-internally-fallback`,`text`)).option(`rule-settings-resolve-dns-internally-view-id`,{type:`string`,description:`Specify the internal DNS view identifier to pass to the internal DNS service.`}).option(`rule-settings-resolve-dns-through-cloudflare`,{type:`boolean`,description:"Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot set when 'dns_resolvers' specified or 'resolve_dns_internally' is set. Only valid when a rule's action set to 'resolve'. Settable only for `dns_resolver` rules."}).option(`rule-settings-set-headers`,{type:`string`,description:"Replace existing headers on allowed requests with the specified key-value pairs. If a header does not exist, it is added. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-untrusted-cert-action`,{type:`string`,description:`Defines the action performed when an untrusted certificate seen. The default action an error with HTTP code 526.`,choices:[`pass_through`,`block`,`error`]}).coerce(`rule-settings-untrusted-cert-action`,e=>_(e,`rule-settings-untrusted-cert-action`,`text`)).option(`schedule-fri`,{type:`string`,description:`Specify the time intervals when the rule is active on Fridays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Fridays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-mon`,{type:`string`,description:`Specify the time intervals when the rule is active on Mondays, in the increasing order from 00:00-24:00(capped at maximum of 6 time splits). If this parameter omitted, the rule is deactivated on Mondays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sat`,{type:`string`,description:`Specify the time intervals when the rule is active on Saturdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Saturdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sun`,{type:`string`,description:`Specify the time intervals when the rule is active on Sundays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Sundays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-thu`,{type:`string`,description:`Specify the time intervals when the rule is active on Thursdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Thursdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-time-zone`,{type:`string`,description:`Specify the time zone for rule evaluation. When a [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) is provided, Gateway always uses the current time for that time zone. When this parameter is omitted, Gateway uses the time zone determined from the user's IP address. Colo time zone is used when the user's IP address does not resolve to a location.`}).option(`schedule-tue`,{type:`string`,description:`Specify the time intervals when the rule is active on Tuesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Tuesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-wed`,{type:`string`,description:`Specify the time intervals when the rule is active on Wednesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Wednesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`traffic`,{type:`string`,description:`Specify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`,default:``}).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)`}).check(e=>{if([`expiration-duration`,`expiration-expires-at`].some(t=>e[t]!==void 0)){let t=[`expiration-expires-at`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --expiration-* flag is set`)}return!0}).check(e=>{if((/* @__PURE__ */ `rule-settings-add-headers.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-biso-admin-controls-wm-id.rule-settings-block-page-include-context.rule-settings-block-page-target-uri.rule-settings-block-page-enabled.rule-settings-block-reason.rule-settings-bypass-parent-rule.rule-settings-check-session-duration.rule-settings-check-session-enforce.rule-settings-delete-headers.rule-settings-dns-resolvers-ipv4.rule-settings-dns-resolvers-ipv6.rule-settings-egress-ipv4.rule-settings-egress-ipv4-fallback.rule-settings-egress-ipv6.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-l4override-ip.rule-settings-l4override-port.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-notification-settings-msg.rule-settings-notification-settings-support-url.rule-settings-override-host.rule-settings-override-ips.rule-settings-payload-log-enabled.rule-settings-quarantine-file-types.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-redirect-target-uri.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-internally-view-id.rule-settings-resolve-dns-through-cloudflare.rule-settings-set-headers.rule-settings-untrusted-cert-action`.split(`.`)).some(t=>e[t]!==void 0)){let t=[`rule-settings-block-page-target-uri`,`rule-settings-redirect-target-uri`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --rule_settings-* flag is set`)}return!0})}const Hw={command:`create`,describe:`Create a Zero Trust Gateway rule`,builder:Vw,handler:async e=>u({command:`zero-trust gateway rules create`,classification:{safeFlags:/* @__PURE__ */ `action.enabled.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-block-page-include-context.rule-settings-block-page-enabled.rule-settings-bypass-parent-rule.rule-settings-check-session-enforce.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-payload-log-enabled.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-through-cloudflare.rule-settings-untrusted-cert-action.dry-run`.split(`.`)}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]):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(Bw,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.action===void 0&&(e.action=await b(`action`,"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`])),e.name===void 0&&(e.name=await y(`name`,`Specify the rule name.`));let u=g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]),p=await l(`Creating`,async()=>n.send(Bw,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Uw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`};function Ww(e){return e.usage(`$0 zero-trust gateway rules delete <rule-id>
|
|
926
861
|
|
|
927
|
-
Delete a Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,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 Gw={command:`delete <rule-id>`,describe:`Delete a Zero Trust Gateway rule`,builder:Ww,handler:async e=>u({command:`zero-trust gateway rules 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 gateway rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
928
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Uw,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Kw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`};function qw(e){return e.usage(`$0 zero-trust gateway rules get <rule-id>
|
|
862
|
+
Delete a Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,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 Gw={command:`delete <rule-id>`,describe:`Delete a Zero Trust Gateway rule`,builder:Ww,handler:async e=>u({command:`zero-trust gateway rules 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 gateway rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Uw,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Kw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`};function qw(e){return e.usage(`$0 zero-trust gateway rules get <rule-id>
|
|
929
863
|
|
|
930
864
|
Get a single Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jw={command:`get <rule-id>`,describe:`Get Zero Trust Gateway rule details.`,builder:qw,handler:async e=>u({command:`zero-trust gateway rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Kw,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var Yw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules/tenant`};function Xw(e){return e.usage(`$0 zero-trust gateway rules list-tenant
|
|
931
865
|
|
|
@@ -937,13 +871,11 @@ Update a configured Zero Trust Gateway rule.`).positional(`rule-id`,{type:`strin
|
|
|
937
871
|
|
|
938
872
|
Adds a new identity provider 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 dT={command:`create`,describe:`Add an Access identity provider`,builder:uT,handler:async e=>u({command:`zero-trust identity-providers 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 identity-providers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers`,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(lT,{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 fT={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`};function pT(e){return e.usage(`$0 zero-trust identity-providers delete <identity-provider-id>
|
|
939
873
|
|
|
940
|
-
Deletes an identity provider from Access.`).positional(`identity-provider-id`,{type:`string`,description:`UUID.`,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 mT={command:`delete <identity-provider-id>`,describe:`Delete an Access identity provider`,builder:pT,handler:async e=>u({command:`zero-trust identity-providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 identity-providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"identity-provider-id":String(e[`identity-provider-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force})){
|
|
941
|
-
`);return}let f=await l(`Deleting`,async()=>n.send(fT,{account_or_zone:u,account_or_zone_id:d,identity_provider_id:e[`identity-provider-id`]}));s(f,{successLabel:`Deleted`})})};var hT={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants`,body:`json`};function gT(e){return e.usage(`$0 zero-trust identity-providers federation-grants create
|
|
874
|
+
Deletes an identity provider from Access.`).positional(`identity-provider-id`,{type:`string`,description:`UUID.`,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 mT={command:`delete <identity-provider-id>`,describe:`Delete an Access identity provider`,builder:pT,handler:async e=>u({command:`zero-trust identity-providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 identity-providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"identity-provider-id":String(e[`identity-provider-id`]??``)},bodyKind:`none`});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,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(fT,{account_or_zone:u,account_or_zone_id:d,identity_provider_id:e[`identity-provider-id`]}));s(f,{successLabel:`Deleted`})})};var hT={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants`,body:`json`};function gT(e){return e.usage(`$0 zero-trust identity-providers federation-grants create
|
|
942
875
|
|
|
943
876
|
Creates an IdP federation grant for the specified identity provider, making it available for federation to other accounts in the same Cloudflare organization. The account must belong to a Cloudflare organization. One-time pin and Cloudflare-managed identity providers cannot be federated. An account can federate at most five identity providers at a time.`).option(`idp-id`,{type:`string`,description:`UID of the identity provider to federate. Must be an existing identity provider in this account. One-time pin and Cloudflare-managed identity providers cannot be federated.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _T={command:`create`,describe:`Create an IdP federation grant`,builder:gT,handler:async e=>u({command:`zero-trust identity-providers federation-grants create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers federation-grants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({idp_id:_(e[`idp-id`],`idp-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(hT,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`idp-id`]===void 0&&(e[`idp-id`]=await y(`idp-id`,`UID of the identity provider to federate. Must be an existing identity provider in this account. One-time pin and Cloudflare-managed identity providers cannot be federated.`));let u=g({idp_id:_(e[`idp-id`],`idp-id`,`text`)}),d=await l(`Creating`,async()=>n.send(hT,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var vT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants/${t.grant_id}`,errors:{404:`NotFoundError`}};function yT(e){return e.usage(`$0 zero-trust identity-providers federation-grants delete <grant-id>
|
|
944
877
|
|
|
945
|
-
Deletes an IdP federation grant. The identity provider remains in the account, but it is no longer available for federation to other accounts.`).positional(`grant-id`,{type:`string`,description:`UID of the IdP federation grant.`,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 bT={command:`delete <grant-id>`,describe:`Delete an IdP federation grant`,builder:yT,handler:async e=>u({command:`zero-trust identity-providers federation-grants 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 identity-providers federation-grants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"grant-id":String(e[`grant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
946
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(vT,{account_id:a,grant_id:e[`grant-id`]}));s(u,{successLabel:`Deleted`})})};var xT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants/${t.grant_id}`,errors:{404:`NotFoundError`}};function ST(e){return e.usage(`$0 zero-trust identity-providers federation-grants get <grant-id>
|
|
878
|
+
Deletes an IdP federation grant. The identity provider remains in the account, but it is no longer available for federation to other accounts.`).positional(`grant-id`,{type:`string`,description:`UID of the IdP federation grant.`,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 bT={command:`delete <grant-id>`,describe:`Delete an IdP federation grant`,builder:yT,handler:async e=>u({command:`zero-trust identity-providers federation-grants 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 identity-providers federation-grants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"grant-id":String(e[`grant-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(vT,{account_id:a,grant_id:e[`grant-id`]}));s(u,{successLabel:`Deleted`})})};var xT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants/${t.grant_id}`,errors:{404:`NotFoundError`}};function ST(e){return e.usage(`$0 zero-trust identity-providers federation-grants get <grant-id>
|
|
947
879
|
|
|
948
880
|
Retrieves a single IdP federation grant by its UID.`).positional(`grant-id`,{type:`string`,description:`UID of the IdP federation grant.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const CT={command:`get <grant-id>`,describe:`Get an IdP federation grant`,builder:ST,handler:async e=>u({command:`zero-trust identity-providers federation-grants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers federation-grants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"grant-id":String(e[`grant-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(xT,{account_id:a,grant_id:e[`grant-id`]}));s(u,{successLabel:`Loaded`})})};var wT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants`};function TT(e){return e.usage(`$0 zero-trust identity-providers federation-grants list
|
|
949
881
|
|
|
@@ -953,15 +885,13 @@ Fetches a configured identity provider.`).positional(`identity-provider-id`,{typ
|
|
|
953
885
|
|
|
954
886
|
Lists all configured identity providers.`).option(`scim-enabled`,{type:`string`,description:`Indicates to Access to only retrieve identity providers that have the System for Cross-Domain Identity Management (SCIM) enabled.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const NT={command:`list`,describe:`List Access identity providers`,builder:MT,handler:async e=>u({command:`zero-trust identity-providers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scim_enabled:e[`scim-enabled`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust identity-providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/identity_providers`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(jT,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var PT={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/saml_certificate`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function FT(e){return e.usage("$0 zero-trust identity-providers saml-certificate create <identity-provider-id>\n\nCreates a new SAML encryption certificate set and assigns it to the specified SAML Identity Provider. This endpoint is idempotent - if the IdP already has a certificate set assigned, the existing certificate set is returned with a 200 status. **Workflow for enabling SAML encryption:** 1. Call this endpoint to create and assign a certificate set to the IdP 2. Update the IdP configuration (PUT `/identity_providers/{id}`) with: - `config.enable_encryption: true` - `saml_certificate_set_id: <uid from step 1>` 3. Configure the certificate's public key in your external SAML Identity Provider").positional(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const IT={command:`create <identity-provider-id>`,describe:`Create SAML encryption certificate for Identity Provider`,builder:FT,handler:async e=>u({command:`zero-trust identity-providers saml-certificate create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers saml-certificate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/saml_certificate`,pathParams:{"identity-provider-id":String(e[`identity-provider-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(PT,{account_id:a,identity_provider_id:e[`identity-provider-id`]}));s(u,{successLabel:`Created`})})},LT={command:`saml-certificate`,describe:`Operations for identity-providers.saml-certificate`,builder:e=>e.command(IT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var RT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups/${t.group_id}`,response:!1};function zT(e){return e.usage(`$0 zero-trust identity-providers scim groups delete <group-id>
|
|
955
887
|
|
|
956
|
-
Deletes a SCIM Group resource from the identity provider's SCIM population.`).positional(`group-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,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 BT={command:`delete <group-id>`,describe:`Delete a SCIM Group resource`,builder:zT,handler:async e=>u({command:`zero-trust identity-providers scim groups 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 identity-providers scim groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
957
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(RT,{account_id:a,identity_provider_id:e[`identity-provider-id`],group_id:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var VT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups/${t.group_id}`};function HT(e){return e.usage(`$0 zero-trust identity-providers scim groups get <group-id>
|
|
888
|
+
Deletes a SCIM Group resource from the identity provider's SCIM population.`).positional(`group-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,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 BT={command:`delete <group-id>`,describe:`Delete a SCIM Group resource`,builder:zT,handler:async e=>u({command:`zero-trust identity-providers scim groups 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 identity-providers scim groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"group-id":String(e[`group-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(RT,{account_id:a,identity_provider_id:e[`identity-provider-id`],group_id:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var VT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups/${t.group_id}`};function HT(e){return e.usage(`$0 zero-trust identity-providers scim groups get <group-id>
|
|
958
889
|
|
|
959
890
|
Returns a SCIM Group resource, including its direct members, synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).positional(`group-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const UT={command:`get <group-id>`,describe:`Get a SCIM Group resource`,builder:HT,handler:async e=>u({command:`zero-trust identity-providers scim groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"group-id":String(e[`group-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(VT,{account_id:a,identity_provider_id:e[`identity-provider-id`],group_id:e[`group-id`]}));s(u,{successLabel:`Loaded`})})};var WT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups`,query:[`cf_resource_id`,`idp_resource_id`,`name`,`page`,`per_page`]};function GT(e){return e.usage(`$0 zero-trust identity-providers scim groups list
|
|
960
891
|
|
|
961
892
|
Lists SCIM Group resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`cf-resource-id`,{type:`string`,description:'The unique Cloudflare-generated Id of the SCIM Group resource; also known as the "Id".\nPass once for a single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to look up multiple groups in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `name`,\n`search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,description:'The IdP-generated Id of the SCIM Group resource; also known as the "external Id".\nPass once for a single lookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to look up multiple groups in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `name`,\n`search_contains`, and `search_starts_with`.'}).option(`name`,{type:`string`,description:`The display name of the SCIM Group resource.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const KT={command:`list`,describe:`List SCIM Group resources`,builder:GT,handler:async e=>u({command:`zero-trust identity-providers scim groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups`,pathParams:{"identity-provider-id":String(e[`identity-provider-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(WT,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},qT={command:`groups`,describe:`Operations for identity-providers.scim.groups`,builder:e=>e.command(BT).command(UT).command(KT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var JT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`,response:!1};function YT(e){return e.usage(`$0 zero-trust identity-providers scim users delete <user-id>
|
|
962
893
|
|
|
963
|
-
Deletes a SCIM User resource from the identity provider's SCIM population.`).positional(`user-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,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 XT={command:`delete <user-id>`,describe:`Delete a SCIM User resource`,builder:YT,handler:async e=>u({command:`zero-trust identity-providers scim users 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 identity-providers scim users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
964
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(JT,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var ZT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`};function QT(e){return e.usage(`$0 zero-trust identity-providers scim users get <user-id>
|
|
894
|
+
Deletes a SCIM User resource from the identity provider's SCIM population.`).positional(`user-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,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 XT={command:`delete <user-id>`,describe:`Delete a SCIM User resource`,builder:YT,handler:async e=>u({command:`zero-trust identity-providers scim users 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 identity-providers scim users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"user-id":String(e[`user-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(JT,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var ZT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`};function QT(e){return e.usage(`$0 zero-trust identity-providers scim users get <user-id>
|
|
965
895
|
|
|
966
896
|
Returns a SCIM User resource synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).positional(`user-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $T={command:`get <user-id>`,describe:`Get a SCIM User resource`,builder:QT,handler:async e=>u({command:`zero-trust identity-providers scim users get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"user-id":String(e[`user-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(ZT,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var eE={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users`,query:[`cf_resource_id`,`idp_resource_id`,`username`,`email`,`name`,`page`,`per_page`]};function tE(e){return e.usage(`$0 zero-trust identity-providers scim users list
|
|
967
897
|
|
|
@@ -988,8 +918,7 @@ Retrieves the detailed risk score breakdown for a specific user, including contr
|
|
|
988
918
|
Creates a new Zero Trust risk score integration, connecting external risk signals to Cloudflare's risk scoring system.`).option(`integration-type`,{type:`string`,description:`The integration_type field`,choices:[`Okta`]}).coerce(`integration-type`,e=>_(e,`integration-type`,`text`)).option(`reference-id`,{type:`string`,description:`A reference id that can be supplied by the client. Currently this should be set to the Access-Okta IDP ID (a UUIDv4).
|
|
989
919
|
https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider`}).option(`tenant-url`,{type:`string`,description:`The base url of the tenant, e.g. "https://tenant.okta.com".`}).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 RE={command:`create`,describe:`Create new risk score integration.`,builder:LE,handler:async e=>u({command:`zero-trust risk-scoring integrations create`,classification:{safeFlags:[`integration-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({integration_type:e[`integration-type`],reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`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(IE,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`integration-type`]===void 0&&(e[`integration-type`]=await b(`integration-type`,`The integration_type field`,[`Okta`])),e[`tenant-url`]===void 0&&(e[`tenant-url`]=await y(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=g({integration_type:e[`integration-type`],reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`text`)}),d=await l(`Creating`,async()=>n.send(IE,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var zE={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function BE(e){return e.usage(`$0 zero-trust risk-scoring integrations delete <integration-id>
|
|
990
920
|
|
|
991
|
-
Removes a Zero Trust risk score integration, disconnecting the external risk signal source.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const VE={command:`delete <integration-id>`,describe:`Delete a risk score integration.`,builder:BE,handler:async e=>u({command:`zero-trust risk-scoring integrations 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 risk-scoring integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
992
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(zE,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var HE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function UE(e){return e.usage(`$0 zero-trust risk-scoring integrations get <integration-id>
|
|
921
|
+
Removes a Zero Trust risk score integration, disconnecting the external risk signal source.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const VE={command:`delete <integration-id>`,describe:`Delete a risk score integration.`,builder:BE,handler:async e=>u({command:`zero-trust risk-scoring integrations 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 risk-scoring integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-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(zE,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var HE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function UE(e){return e.usage(`$0 zero-trust risk-scoring integrations get <integration-id>
|
|
993
922
|
|
|
994
923
|
Gets a Zero Trust risk score integration by ID.`).positional(`integration-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 WE={command:`get <integration-id>`,describe:`Get risk score integration by id.`,builder:UE,handler:async e=>u({command:`zero-trust risk-scoring integrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-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(HE,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Loaded`})})};var GE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations`};function KE(e){return e.usage(`$0 zero-trust risk-scoring integrations list
|
|
995
924
|
|
|
@@ -1000,13 +929,10 @@ Retrieves a Zero Trust risk score integration using its external reference ID.`)
|
|
|
1000
929
|
Overwrite the reference_id, tenant_url, and active values with the ones provided.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`active`,{type:`boolean`,description:`Whether this integration is enabled. If disabled, no risk changes will be exported to the third-party.`}).option(`reference-id`,{type:`string`,description:`A reference id that can be supplied by the client. Currently this should be set to the Access-Okta IDP ID (a UUIDv4).
|
|
1001
930
|
https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider`}).option(`tenant-url`,{type:`string`,description:`The base url of the tenant, e.g. "https://tenant.okta.com".`}).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 eD={command:`update <integration-id>`,describe:`Update a risk score integration.`,builder:$E,handler:async e=>u({command:`zero-trust risk-scoring integrations update`,classification:{safeFlags:[`active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({active:e.active,reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`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(`Updating`,async()=>n.send(QE,{body:t,account_id:a,integration_id:e[`integration-id`]}));s(r,{successLabel:`Updated`});return}if(e.active===void 0)throw Error(`--active is required (or pass --body with this field set).`);e[`tenant-url`]===void 0&&(e[`tenant-url`]=await y(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=g({active:e.active,reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`text`)}),d=await l(`Updating`,async()=>n.send(QE,{body:u,account_id:a,integration_id:e[`integration-id`]}));s(d,{successLabel:`Updated`})})},tD={command:`integrations`,describe:`User Risk Scoring - manage integrations that provide risk score signals`,builder:e=>e.command(RE).command(VE).command(WE).command(qE).command(eD).command(ZE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nD={method:`POST`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/${t.user_id}/reset`};function rD(e){return e.usage(`$0 zero-trust risk-scoring reset <user-id>
|
|
1002
931
|
|
|
1003
|
-
Resets risk scores for specified users, clearing their accumulated risk history.`).positional(`user-id`,{type:`string`,description:`User ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const iD={command:`reset <user-id>`,describe:`Clear the risk score for a particular user`,builder:rD,handler:async e=>u({command:`zero-trust risk-scoring reset`,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 risk-scoring reset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/reset`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`This operation wipes risk-scoring history.`})){
|
|
1004
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(nD,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var aD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/summary`};function oD(e){return e.usage(`$0 zero-trust risk-scoring summary get
|
|
932
|
+
Resets risk scores for specified users, clearing their accumulated risk history.`).positional(`user-id`,{type:`string`,description:`User ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const iD={command:`reset <user-id>`,describe:`Clear the risk score for a particular user`,builder:rD,handler:async e=>u({command:`zero-trust risk-scoring reset`,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 risk-scoring reset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/reset`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`This operation wipes risk-scoring history.`}))return;let u=await l(`Deleting`,async()=>n.send(nD,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var aD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/summary`};function oD(e){return e.usage(`$0 zero-trust risk-scoring summary get
|
|
1005
933
|
|
|
1006
934
|
Gets an aggregate summary of risk scores across the account, including distribution and trends.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sD={command:`get`,describe:`Get risk score info for all users in the account`,builder:oD,handler:async e=>u({command:`zero-trust risk-scoring summary get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust risk-scoring summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zt_risk_scoring/summary`,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(aD,{account_id:a}));s(u,{successLabel:`Loaded`})})},cD={command:`summary`,describe:`User Risk Scoring - retrieve account risk score summaries`,builder:e=>e.command(sD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},lD={command:`risk-scoring`,describe:`User Risk Scoring - retrieve and reset user risk scores`,builder:e=>e.command(FE).command(iD).command(ME).command(tD).command(cD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var uD={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/access/seats`,body:`json`};function dD(e){return e.usage("$0 zero-trust seats edit\n\nRemoves a user from a Zero Trust seat when both `access_seat` and `gateway_seat` are set to false.").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 fD={command:`edit`,describe:`Update a user seat`,builder:dD,handler:async e=>u({command:`zero-trust seats edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust seats edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/seats`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0: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(uD,{body:t,account_id:a}));s(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},pD={command:`seats`,describe:`Operations for seats`,builder:e=>e.command(fD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var mD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/mfa_authenticators/${t.authenticator_id}`};function hD(e){return e.usage(`$0 zero-trust users mfa authenticators delete <authenticator-id>
|
|
1007
935
|
|
|
1008
|
-
Deletes a specific MFA device or passkey, including a PIV key or FIDO2 key enrollment, for a user. Admin deletion remains available when MFA is disabled. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,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 gD={command:`delete <authenticator-id>`,describe:`Delete a user's authenticator`,builder:hD,handler:async e=>u({command:`zero-trust users mfa authenticators 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 users mfa authenticators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/mfa_authenticators/${e[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(e[`authenticator-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``),"authenticator-id":String(e[`authenticator-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
1009
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(mD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},_D={command:`authenticators`,describe:`Operations for users.mfa.authenticators`,builder:e=>e.command(gD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vD={command:`mfa`,describe:`Operations for users.mfa`,builder:e=>e.command(_D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/passkeys/${t.authenticator_id}`};function bD(e){return e.usage(`$0 zero-trust users passkeys delete <authenticator-id>
|
|
936
|
+
Deletes a specific MFA device or passkey, including a PIV key or FIDO2 key enrollment, for a user. Admin deletion remains available when MFA is disabled. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,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 gD={command:`delete <authenticator-id>`,describe:`Delete a user's authenticator`,builder:hD,handler:async e=>u({command:`zero-trust users mfa authenticators 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 users mfa authenticators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/mfa_authenticators/${e[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(e[`authenticator-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``),"authenticator-id":String(e[`authenticator-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(mD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},_D={command:`authenticators`,describe:`Operations for users.mfa.authenticators`,builder:e=>e.command(gD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vD={command:`mfa`,describe:`Operations for users.mfa`,builder:e=>e.command(_D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/passkeys/${t.authenticator_id}`};function bD(e){return e.usage(`$0 zero-trust users passkeys delete <authenticator-id>
|
|
1010
937
|
|
|
1011
|
-
Alias of the authenticator deletion endpoint for passkey management. The identifier is the passkey's authenticator ID from the last-seen identity response. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,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 xD={command:`delete <authenticator-id>`,describe:`Delete a user's passkey`,builder:bD,handler:async e=>u({command:`zero-trust users passkeys 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 users passkeys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/passkeys/${e[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(e[`authenticator-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``),"authenticator-id":String(e[`authenticator-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force})){
|
|
1012
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(yD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},SD={command:`passkeys`,describe:`Operations for users.passkeys`,builder:e=>e.command(xD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},CD={command:`users`,describe:`Operations for users`,builder:e=>e.command(vD).command(SD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wD={command:`zero-trust`,describe:`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,builder:e=>e.command(Pa).command(Mc).command(zc).command(Zd).command(eh).command(l_).command(CS).command(cT).command(cE).command(TE).command(lD).command(pD).command(CD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{wD as default};
|
|
938
|
+
Alias of the authenticator deletion endpoint for passkey management. The identifier is the passkey's authenticator ID from the last-seen identity response. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,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 xD={command:`delete <authenticator-id>`,describe:`Delete a user's passkey`,builder:bD,handler:async e=>u({command:`zero-trust users passkeys 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 users passkeys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/passkeys/${e[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(e[`authenticator-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``),"authenticator-id":String(e[`authenticator-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(yD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},SD={command:`passkeys`,describe:`Operations for users.passkeys`,builder:e=>e.command(xD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},CD={command:`users`,describe:`Operations for users`,builder:e=>e.command(vD).command(SD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wD={command:`zero-trust`,describe:`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,builder:e=>e.command(Pa).command(Mc).command(zc).command(Zd).command(eh).command(l_).command(CS).command(cT).command(cE).command(TE).command(lD).command(pD).command(CD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{wD as default};
|