cf 1.0.0-beta.2 → 1.0.0-beta.3

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.
Files changed (305) hide show
  1. package/README.md +1 -0
  2. package/dist/_meta/commands.json +28025 -30372
  3. package/dist/_meta/hand-written-commands.json +72 -49
  4. package/dist/_meta/schemas.json +18618 -20269
  5. package/dist/{abuse-reports-JcwSaW-c.mjs → abuse-reports-CWX7WKhe.mjs} +1 -1
  6. package/dist/access-2aKv_Dya.mjs +2 -0
  7. package/dist/{account-CLsfIk5j.mjs → account-CnZO9-bl.mjs} +1 -1
  8. package/dist/{account-tags-BJdDiyDi.mjs → account-tags-ClLZOfTA.mjs} +1 -1
  9. package/dist/{accounts-6eXqIqSW.mjs → accounts-Cbj9aFyY.mjs} +1 -1
  10. package/dist/{acm-ChNLnPqM.mjs → acm-wGJ9cnzE.mjs} +1 -1
  11. package/dist/{addressing-z8ei_TCh.mjs → addressing-YvHX2dAb.mjs} +5 -5
  12. package/dist/{agent-memory-Un0usAVF.mjs → agent-memory-B4N-lmLb.mjs} +1 -1
  13. package/dist/{ai-audit-FR6QuDK_.mjs → ai-audit-CG_DG6N7.mjs} +1 -1
  14. package/dist/ai-gateway-DUttjxrN.mjs +80 -0
  15. package/dist/{ai-Bj8kgDf7.mjs → ai-lziiVEGR.mjs} +1 -1
  16. package/dist/{ai-search-BvMeOKK6.mjs → ai-search-k63uopiK.mjs} +1 -1
  17. package/dist/{ai-security-BHvDKoM1.mjs → ai-security-D10lzYTn.mjs} +1 -1
  18. package/dist/{alerting-DmRZCAjg.mjs → alerting-c4ICS8KO.mjs} +1 -1
  19. package/dist/{analytics-DqidJ4qc.mjs → analytics-CEQ0EVTq.mjs} +1 -1
  20. package/dist/{analytics_engine-I7N0I6yP.mjs → analytics_engine-B9kiAPbY.mjs} +1 -1
  21. package/dist/{api-security-BMNhdDyR.mjs → api-security-6LlxeiOi.mjs} +1 -1
  22. package/dist/{argo-U5TIBcub.mjs → argo-BCcp1ybr.mjs} +1 -1
  23. package/dist/{artifacts-Byw1W73U.mjs → artifacts-PoO3rAvo.mjs} +1 -1
  24. package/dist/{audit-logs-C6zyFeKM.mjs → audit-logs-Vt3NbAA1.mjs} +1 -1
  25. package/dist/{auth-B5p3SIhO.mjs → auth-3bFlHTVl.mjs} +2 -2
  26. package/dist/{auth-CosaKfuk.mjs → auth-BfYtTyXo.mjs} +1 -1
  27. package/dist/{autoconfig-DED3bWob.mjs → autoconfig-DqgOi1kW.mjs} +28 -28
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-ClclgnBn.mjs} +1 -1
  29. package/dist/{billing-BS1raRJt.mjs → billing-DVrpin2a.mjs} +1 -1
  30. package/dist/{bot-management-Cn6xfGzJ.mjs → bot-management-Bw-GZWoT.mjs} +1 -1
  31. package/dist/{botnet-feed-DtWOPNfw.mjs → botnet-feed-ov970cZf.mjs} +1 -1
  32. package/dist/{brand-protection-BcEQ66bT.mjs → brand-protection-C7WOvdx6.mjs} +1 -1
  33. package/dist/{browser-run-RZ7ZPRop.mjs → browser-run-DhnKUXVv.mjs} +1 -1
  34. package/dist/build-CVvo9BvP.mjs +2 -0
  35. package/dist/{build-DG8NfVjJ.mjs → build-vfD1txJe.mjs} +1 -1
  36. package/dist/{builds-AOCMH4CE.mjs → builds-BIqfNXEE.mjs} +1 -1
  37. package/dist/{cache-D_EBxDff.mjs → cache-Dzl3kth1.mjs} +1 -1
  38. package/dist/{certificate-authorities-B6rtjuaT.mjs → certificate-authorities-CQinLiq_.mjs} +1 -1
  39. package/dist/{cf--3tGe71B.mjs → cf-O3gEaXYZ.mjs} +11 -11
  40. package/dist/{chunk-M77HNR46-BqG3fjQz.mjs → chunk-M77HNR46-DPbhuhiy.mjs} +1 -1
  41. package/dist/{chunk-RV27PEH3-C8_6bMgi.mjs → chunk-RV27PEH3-Cws_30ln.mjs} +30 -30
  42. package/dist/cli-ZXrxm369.mjs +6 -0
  43. package/dist/{client-certificates-uBOjGcgo.mjs → client-certificates--vw-4vvy.mjs} +1 -1
  44. package/dist/{client-side-security-Bm7JwGaG.mjs → client-side-security-YCsdeK3e.mjs} +1 -1
  45. package/dist/{cloud-connector-69M2Dx8h.mjs → cloud-connector-CwSi4zZI.mjs} +1 -1
  46. package/dist/{cloudflared-Ba5LySkU.mjs → cloudflared-CH8rOneA.mjs} +1 -1
  47. package/dist/{cloudforce-one-Xn2mlAPv.mjs → cloudforce-one-hEykJeqy.mjs} +1 -1
  48. package/dist/command-Axp5Wfpj.mjs +2 -0
  49. package/dist/command-BH-TMJWp.mjs +2 -0
  50. package/dist/command-C1CwuI4O.mjs +2 -0
  51. package/dist/{command-Cb0pS8T5.mjs → command-CIZDQPmS.mjs} +1 -1
  52. package/dist/{command-DEC5PwJo.mjs → command-CeL8kQCM.mjs} +1 -1
  53. package/dist/command-ChDtawgh.mjs +2 -0
  54. package/dist/{command-DCpX9Cem.mjs → command-D5nZoVE1.mjs} +1 -1
  55. package/dist/command-DBCoI1fN.mjs +2 -0
  56. package/dist/command-DBpr6U4L.mjs +2 -0
  57. package/dist/command-DrQKTf1O.mjs +2 -0
  58. package/dist/{command-Cz_bKDWf.mjs → command-IuYNIUk9.mjs} +1 -1
  59. package/dist/command-L0y09SE5.mjs +2 -0
  60. package/dist/{command-BxQbIQWT.mjs → command-ZSxcR8-J.mjs} +1 -1
  61. package/dist/command-egPOyKbx.mjs +2 -0
  62. package/dist/command-jJKEah9i.mjs +2 -0
  63. package/dist/{completions-DZDltM9V.mjs → completions-DNisLHie.mjs} +26 -26
  64. package/dist/{connector-interrupts-DTy6laab.mjs → connector-interrupts-uIHLde10.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-CJqGGvFJ.mjs → connector-telemetry-events-D2MH0OSs.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-BPxhPhr6.mjs → connector-telemetry-snapshots-CQICQaGf.mjs} +1 -1
  67. package/dist/{connectors-CdfCcZuA.mjs → connectors-BXwvP7SF.mjs} +1 -1
  68. package/dist/{containers-C7z53QcY.mjs → containers-ClK7HGfx.mjs} +88 -90
  69. package/dist/{containers-VMqcxH5a.mjs → containers-DOyOrVV9.mjs} +1 -1
  70. package/dist/{content-scan-BirgZrmr.mjs → content-scan-B71JZ7G6.mjs} +1 -1
  71. package/dist/{context-Dzzbc9RK.mjs → context-5JRcefHh.mjs} +2 -2
  72. package/dist/{cps-DzFm3zKp.mjs → cps-CzNfFv-5.mjs} +1 -1
  73. package/dist/{csamScanner-D2_OO5-1.mjs → csamScanner-BfZcrcjk.mjs} +1 -1
  74. package/dist/{ct-alerting-B7wQkFVl.mjs → ct-alerting-Cm8YLmXE.mjs} +1 -1
  75. package/dist/{custom-certificates-BKcCfbH8.mjs → custom-certificates-DFMRe9_D.mjs} +1 -1
  76. package/dist/{custom-csrs-CXoOxir4.mjs → custom-csrs-B5njuvdd.mjs} +1 -1
  77. package/dist/{custom-hostnames-CNYfnCOd.mjs → custom-hostnames-D06jQfNs.mjs} +1 -1
  78. package/dist/{custom-nameservers-BlLM7a4L.mjs → custom-nameservers-CKwKLqbF.mjs} +1 -1
  79. package/dist/{custom-pages-BcWoypet.mjs → custom-pages-D339_r6I.mjs} +1 -1
  80. package/dist/{d1-CvrHsqYY.mjs → d1-CHXmF-Ga.mjs} +1 -1
  81. package/dist/{dcv-delegation-9_Hl-5v-.mjs → dcv-delegation-BAnTwW8J.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BlXYtvTd.mjs → deploy-CsQbufsL.mjs} +1 -1
  84. package/dist/{deploy-input-DTXVZ2QJ.mjs → deploy-input-dwBe8pSi.mjs} +1 -1
  85. package/dist/{dev-reqdKM28.mjs → dev-BpvWl6pG.mjs} +1 -1
  86. package/dist/{diagnostics-BxHs1EJB.mjs → diagnostics-BEUAWeLH.mjs} +1 -1
  87. package/dist/{dialog-ClHoC_cG.mjs → dialog-BlUXJKbA.mjs} +1 -1
  88. package/dist/discover-DmIsaE54.mjs +2 -0
  89. package/dist/{dist-CmyJy57B.mjs → dist-CpufWpsP.mjs} +14 -14
  90. package/dist/{dist-Cpb7_h4N.mjs → dist-DW47TUGh.mjs} +1 -1
  91. package/dist/{dist-cGGV-p_F.mjs → dist-DfMipWKR.mjs} +3 -3
  92. package/dist/{dls-D7GXW-N3.mjs → dls-CXS7bPlj.mjs} +1 -1
  93. package/dist/{dns-B0mdWJO5.mjs → dns-Dx7oPdtH.mjs} +1 -1
  94. package/dist/{dns-firewall-BG0bzuL3.mjs → dns-firewall-wcP1fgB-.mjs} +1 -1
  95. package/dist/{dot-prop-IITUZ2XW-BO5KJUwL.mjs → dot-prop-IITUZ2XW-BilKo4kO.mjs} +1 -1
  96. package/dist/dotenv-CcQjGlV0.mjs +4 -0
  97. package/dist/dry-run-Bq0JAsbX.mjs +2 -0
  98. package/dist/{durable-objects-DW0CsJzR.mjs → durable-objects-DmieQflu.mjs} +1 -1
  99. package/dist/{email-auth-Ls-7Yijm.mjs → email-auth-DiO-k5wt.mjs} +1 -1
  100. package/dist/{email-routing-DVaFhg-3.mjs → email-routing-CycPV4UR.mjs} +1 -1
  101. package/dist/{email-security-vnwkqlgp.mjs → email-security-DhtBU1X_.mjs} +1 -1
  102. package/dist/{email-sending-CbMUicJz.mjs → email-sending-BjgiwUht.mjs} +1 -1
  103. package/dist/error-sanitization-Cu-8OKRA.mjs +2 -0
  104. package/dist/{error-sanitization-TV6O0aCD.mjs → error-sanitization-Dc4bLj8k.mjs} +1 -1
  105. package/dist/{fieldExtractors-2EkDoJg8.mjs → fieldExtractors-BOBRZ8gw.mjs} +1 -1
  106. package/dist/{firewall-BK4QYqRe.mjs → firewall-Dc0Xm26N.mjs} +1 -1
  107. package/dist/{flagship--lHQ0H3n.mjs → flagship-BRqR3ioN.mjs} +1 -1
  108. package/dist/{fraud-CaoRrQ8W.mjs → fraud-Czu1ed5n.mjs} +1 -1
  109. package/dist/generate-BAHK895m.mjs +2 -0
  110. package/dist/{generate-CrKNH6ms.mjs → generate-DWW1YPjv.mjs} +1 -1
  111. package/dist/{google-tag-gateway-DDzLPmk5.mjs → google-tag-gateway-DsZA0a1r.mjs} +1 -1
  112. package/dist/gt-DmcMNPX6.mjs +2 -0
  113. package/dist/{healthchecks-Q2uXvt4m.mjs → healthchecks-CFH5bIAG.mjs} +1 -1
  114. package/dist/{hostnames-CsaYnis6.mjs → hostnames-CKDSQsXT.mjs} +1 -1
  115. package/dist/{hyperdrive-DDr6sAkw.mjs → hyperdrive-BLiI7eoy.mjs} +1 -1
  116. package/dist/{iam-CmzocepZ.mjs → iam-B5mdfq5e.mjs} +1 -1
  117. package/dist/{images-Ux0Phsbi.mjs → images-IVRjrB4_.mjs} +1 -1
  118. package/dist/index.mjs +1 -1
  119. package/dist/{init-Nx4RRgfT.mjs → init-C6pA2OKl.mjs} +2 -2
  120. package/dist/{intel-bgS4g7nx.mjs → intel-CvesITo3.mjs} +1 -1
  121. package/dist/interactive-SgAjen2z.mjs +2 -0
  122. package/dist/{ips-BDiolgWF.mjs → ips-DT9GaimG.mjs} +1 -1
  123. package/dist/{keyless-certificates-C_TwTMql.mjs → keyless-certificates-B0Xe5WqA.mjs} +1 -1
  124. package/dist/{keys-Cr8AqQDY.mjs → keys-BfcwaSGe.mjs} +1 -1
  125. package/dist/kv-BAKDr9h1.mjs +15 -0
  126. package/dist/lazy-command-BR3u8SQ2.mjs +2 -0
  127. package/dist/{leaked-credential-checks-De7ph4VA.mjs → leaked-credential-checks-gRpF7J9-.mjs} +1 -1
  128. package/dist/{load-balancers-DXt4ndF4.mjs → load-balancers-CLVWIN9d.mjs} +1 -1
  129. package/dist/local-22UA5g9y.mjs +2 -0
  130. package/dist/{local-OKXweFsd.mjs → local-CxYne8s2.mjs} +1 -1
  131. package/dist/{local-runtime-tTYpniPS.mjs → local-runtime-C_fR3pz4.mjs} +1 -1
  132. package/dist/{login-BurQ63Ws.mjs → login-B2IW-LZC.mjs} +1 -1
  133. package/dist/{login-CmlHvH5k.mjs → login-BKQI53YQ.mjs} +1 -1
  134. package/dist/{logo-matches-CQ60P96J.mjs → logo-matches-CmCWQC_j.mjs} +1 -1
  135. package/dist/{logos-u7UwT8MH.mjs → logos-DoGIvvML.mjs} +1 -1
  136. package/dist/{logpush-IoIe8e80.mjs → logpush-C2fS4mz8.mjs} +1 -1
  137. package/dist/{logs-ih5tyXEE.mjs → logs-DOchrxC9.mjs} +1 -1
  138. package/dist/{magic-cloud-networking-CWNFnjcY.mjs → magic-cloud-networking-BTWKttlB.mjs} +1 -1
  139. package/dist/{magic-network-monitoring-ClfZleF8.mjs → magic-network-monitoring-C_6hCn_f.mjs} +1 -1
  140. package/dist/{magic-transit-D69pkEVW.mjs → magic-transit-B-Rmmg-Z.mjs} +1 -1
  141. package/dist/{managed-defense-BHdmL0vx.mjs → managed-defense-BPSLbGgV.mjs} +1 -1
  142. package/dist/{managed-transforms-DbCR4LUg.mjs → managed-transforms-BqiDVQD6.mjs} +1 -1
  143. package/dist/{matches-Cou6RVkh.mjs → matches-wLc335So.mjs} +1 -1
  144. package/dist/{mcp-CQYfM19s.mjs → mcp-CmQOrkzP.mjs} +1 -1
  145. package/dist/{mesh-CXqaAFS4.mjs → mesh-DRuFq2pw.mjs} +1 -1
  146. package/dist/migrate-DBwOnU6B.mjs +2 -0
  147. package/dist/{mtls-certificates-DNeId8xS.mjs → mtls-certificates-BUcQwJGQ.mjs} +1 -1
  148. package/dist/{network-B7V3JbU7.mjs → network-BuXy0ysq.mjs} +1 -1
  149. package/dist/{network-interconnects-BNon8iUs.mjs → network-interconnects-BzfPaxkW.mjs} +1 -1
  150. package/dist/{oauth-CeXh-ACI.mjs → oauth-BYmfy7l7.mjs} +1 -1
  151. package/dist/{oauth-DM8q-TYg.mjs → oauth-BlFK0DPZ.mjs} +1 -1
  152. package/dist/{oauth-clients-gGmWIWHl.mjs → oauth-clients-CnABE4xT.mjs} +1 -1
  153. package/dist/{oauth-scopes-DSEu331u.mjs → oauth-scopes-BFy1Hw7K.mjs} +1 -1
  154. package/dist/{observability-_VJhfwM1.mjs → observability-B1IkzeE0.mjs} +1 -1
  155. package/dist/{open-PCXX3ZDZ-DobJT1Mj.mjs → open-PCXX3ZDZ-BKRik1gi.mjs} +3 -3
  156. package/dist/{organization-DW4EpwGl.mjs → organization-DeIzTyFr.mjs} +1 -1
  157. package/dist/{organizations-DE1g2wVq.mjs → organizations-dpNO5XaQ.mjs} +1 -1
  158. package/dist/{origin-ca-certificates-D3ULDV__.mjs → origin-ca-certificates-B-1YtC61.mjs} +1 -1
  159. package/dist/{origin-post-quantum-encryption-BLropaz7.mjs → origin-post-quantum-encryption-DdvwucsG.mjs} +1 -1
  160. package/dist/{origin-tls-client-auth-C87TG2i_.mjs → origin-tls-client-auth-CzfpVmTE.mjs} +1 -1
  161. package/dist/{output-CZt-berV.mjs → output-CvQFJkvi.mjs} +1 -1
  162. package/dist/{page-rules-tlb9P-7V.mjs → page-rules--wnIp30C.mjs} +1 -1
  163. package/dist/pages-DvhJZv5S.mjs +60 -0
  164. package/dist/{pay-per-crawl-C50wI-Iz.mjs → pay-per-crawl-lqX3Rwt9.mjs} +1 -1
  165. package/dist/{pay-per-use-DHHIvynU.mjs → pay-per-use-BRKnBlz2.mjs} +1 -1
  166. package/dist/{pipelines-Y2icOwuf.mjs → pipelines-CvePummb.mjs} +1 -1
  167. package/dist/{precursor-DeyurJSC.mjs → precursor-DgotmHQd.mjs} +1 -1
  168. package/dist/previews-Brsuhzmk.mjs +4 -0
  169. package/dist/{progress-C9dWgc3J.mjs → progress-DUeNqM-j.mjs} +1 -1
  170. package/dist/{prompt-Mh69ni1N.mjs → prompt-DV6YTdoa.mjs} +1 -1
  171. package/dist/{queries-DyUJefwL.mjs → queries-CLqy4AM6.mjs} +1 -1
  172. package/dist/{queues-CdNe4tGY.mjs → queues-D0Y4LNP1.mjs} +1 -1
  173. package/dist/r2-D_FuuTGm.mjs +132 -0
  174. package/dist/{r2-data-catalog-D_zDlmVD.mjs → r2-data-catalog-D5Fvpr3C.mjs} +1 -1
  175. package/dist/{radar-CSguicKC.mjs → radar-B6bYFNVn.mjs} +1 -1
  176. package/dist/{raw-fetch-1ygCOcT_.mjs → raw-fetch-Cp3EaTcj.mjs} +1 -1
  177. package/dist/{realtime-CvWs5pi3.mjs → realtime-BTBZoZNW.mjs} +1 -1
  178. package/dist/{registrar-DQUxn0FK.mjs → registrar-CFh4TCkC.mjs} +1 -1
  179. package/dist/{registrar-sandbox-Q7ZEmg2x.mjs → registrar-sandbox-By6ukXxf.mjs} +1 -1
  180. package/dist/{registry-4Sw95M5_.mjs → registry-kYRASukx.mjs} +1 -1
  181. package/dist/{reporting-DJShxeDv.mjs → reporting-Cf3q4cuO.mjs} +1 -1
  182. package/dist/{request-headers-DFBBErJg.mjs → request-headers-jdUlF-_S.mjs} +1 -1
  183. package/dist/{request-tracers-DD8HlG61.mjs → request-tracers-CqNmb-dS.mjs} +1 -1
  184. package/dist/resolve-PZuJ878-.mjs +2 -0
  185. package/dist/{resource-sharing-J46JMWQP.mjs → resource-sharing-vDvq5J5a.mjs} +1 -1
  186. package/dist/{resource-tagging-DLZJLIqy.mjs → resource-tagging-DRCkpRmf.mjs} +1 -1
  187. package/dist/{rules-D068LfBR.mjs → rules-D-IfU82u.mjs} +1 -1
  188. package/dist/{rulesets-Cz6P7Oje.mjs → rulesets-ezJUnXm7.mjs} +1 -1
  189. package/dist/{rum-C6GQC2vI.mjs → rum-G42H7AXu.mjs} +1 -1
  190. package/dist/run-BhfDNWCI.mjs +2 -0
  191. package/dist/run-djd1-6kN.mjs +2 -0
  192. package/dist/{schema-flags-BmY0Nzp0.mjs → schema-flags-yDMur8UR.mjs} +1 -1
  193. package/dist/{schema-VZPw_2CY.mjs → schema-s22s29sJ.mjs} +1 -1
  194. package/dist/{scim-DMTp_Zhc.mjs → scim-DgRlqTtE.mjs} +1 -1
  195. package/dist/{sdk-BuF3fTHr.mjs → sdk-Bx29ZKK3.mjs} +2 -2
  196. package/dist/{secrets-store-C2epk0sQ.mjs → secrets-store-DcNmMGG2.mjs} +1 -1
  197. package/dist/{security-center-DwMdQ02Y.mjs → security-center-CZwVaL7t.mjs} +1 -1
  198. package/dist/{security-txt-CORQfMul.mjs → security-txt-CD0RAEsU.mjs} +1 -1
  199. package/dist/{session-BEXskZi2.mjs → session-CjQFm10R.mjs} +1 -1
  200. package/dist/shared-Cfuwhk19.mjs +2 -0
  201. package/dist/{smart-shield-BZ0xjy_6.mjs → smart-shield-C72SYuAe.mjs} +1 -1
  202. package/dist/{snippets-LSkJGDOc.mjs → snippets-Bl4Rfvdf.mjs} +1 -1
  203. package/dist/spawn-PBhhCQdl.mjs +10 -0
  204. package/dist/{spectrum-zU8_GFTV.mjs → spectrum-BgOMd04u.mjs} +1 -1
  205. package/dist/{speed-4XbFmeYM.mjs → speed-dahwVmv-.mjs} +1 -1
  206. package/dist/src-npcmT3gh.mjs +109 -0
  207. package/dist/{ssl-DiCsMY_a.mjs → ssl-BMZZPgJx.mjs} +1 -1
  208. package/dist/startup-profile-B0UCc9_J.mjs +2 -0
  209. package/dist/{startup-profile-6fCkD04r.mjs → startup-profile-DrV846S5.mjs} +3 -3
  210. package/dist/{state-DiHwKWTy.mjs → state-DhHOAdTo.mjs} +1 -1
  211. package/dist/state-Dyo8DcW7.mjs +2 -0
  212. package/dist/{stream-BG3NUAVE.mjs → stream-CsQ8wMMF.mjs} +1 -1
  213. package/dist/{submit-CKSaSFS1.mjs → submit-DdoTeeRt.mjs} +1 -1
  214. package/dist/{tags-uT9Mi-bX.mjs → tags-BESTUjkv.mjs} +1 -1
  215. package/dist/telemetry-CVjp5qaj.mjs +2 -0
  216. package/dist/telemetry-iBZ-f6og.mjs +2 -0
  217. package/dist/{tenant--UrYFHM0.mjs → tenant-COyp8x56.mjs} +1 -1
  218. package/dist/{tenant-custom-nameservers-8Z4TVJtr.mjs → tenant-custom-nameservers-BdrnvyTk.mjs} +1 -1
  219. package/dist/{tools-DNGD0l7I.mjs → tools-LlzHD_86.mjs} +1 -1
  220. package/dist/{tunnels-5lGSXYpl.mjs → tunnels-CjDCYR0_.mjs} +1 -1
  221. package/dist/{turnstile-CT3AkMPV.mjs → turnstile-crX-kMig.mjs} +1 -1
  222. package/dist/{ui-D1hhIDIs.mjs → ui-BQxRjahW.mjs} +1 -1
  223. package/dist/update-check-BpLdkJeA.mjs +2 -0
  224. package/dist/update-check-CtmTFJ-O.mjs +2 -0
  225. package/dist/update-check-worker.mjs +1 -1
  226. package/dist/{url-info-DvpNcNl8.mjs → url-info-CSU3TaVe.mjs} +1 -1
  227. package/dist/{url-normalization-C9URZnpq.mjs → url-normalization-DKZYH3Tv.mjs} +1 -1
  228. package/dist/{url-scanner-CIwK3wB5.mjs → url-scanner-mtiMlSyE.mjs} +1 -1
  229. package/dist/{user-DGA7cqdf.mjs → user-DuDnsFvs.mjs} +1 -1
  230. package/dist/{values-BzS0b25w.mjs → values-B4gL0UvN.mjs} +1 -1
  231. package/dist/{vectorize-DtDjl2fJ.mjs → vectorize-CEC7tpRJ.mjs} +1 -1
  232. package/dist/version-CPwqVR_p.mjs +2 -0
  233. package/dist/{waiting-rooms-CjTh4F3B.mjs → waiting-rooms-CosskYpi.mjs} +1 -1
  234. package/dist/{web-assets-4l1B5V9b.mjs → web-assets-Do2JEl4p.mjs} +1 -1
  235. package/dist/{web3-C0Z4AJjC.mjs → web3-C3sb4DR8.mjs} +1 -1
  236. package/dist/workers-ByA4Nddg.mjs +36 -0
  237. package/dist/{workers-builds-DYGeoxmX.mjs → workers-builds-CDE-wcw-.mjs} +1 -1
  238. package/dist/{workers-for-platforms-CSw0K8Nl.mjs → workers-for-platforms-CvZI2B1d.mjs} +1 -1
  239. package/dist/{workers-vpc-DJ7Couct.mjs → workers-vpc-WbwBVV_L.mjs} +1 -1
  240. package/dist/{workflows-Dm03QT8U.mjs → workflows-Ch7cNhhq.mjs} +1 -1
  241. package/dist/{zaraz-DJbWUUe3.mjs → zaraz-BO7WT_U7.mjs} +1 -1
  242. package/dist/{zero-trust-DiMY-pN5.mjs → zero-trust-CTKtzxxW.mjs} +431 -281
  243. package/dist/{zone-BWjBv1yy.mjs → zone-DSHj2Vv2.mjs} +1 -1
  244. package/dist/{zones-zGqcQvcY.mjs → zones-CeFb9USG.mjs} +1 -1
  245. package/package.json +1 -1
  246. package/dist/access-B3TvAe5h.mjs +0 -27
  247. package/dist/ai-gateway-DrQhTvKf.mjs +0 -147
  248. package/dist/build-kgS7iKwi.mjs +0 -2
  249. package/dist/cli-Ct980dyx.mjs +0 -3
  250. package/dist/command-B7SzqjQM.mjs +0 -2
  251. package/dist/command-BLHcNQ8m.mjs +0 -2
  252. package/dist/command-C0SMCHZp.mjs +0 -2
  253. package/dist/command-CE8k5TuK.mjs +0 -2
  254. package/dist/command-CPiCDUth.mjs +0 -2
  255. package/dist/command-DHjsstFb.mjs +0 -2
  256. package/dist/command-MTUsmZU5.mjs +0 -2
  257. package/dist/command-Sb9lOxWT.mjs +0 -2
  258. package/dist/command-sQ8yswii.mjs +0 -2
  259. package/dist/config-DcppJ5D2.mjs +0 -2
  260. package/dist/data-security-BxzLSdGk.mjs +0 -71
  261. package/dist/dry-run-BmzTxDtZ.mjs +0 -2
  262. package/dist/error-sanitization-cyGBhW1Z.mjs +0 -2
  263. package/dist/generate-Djb5Af37.mjs +0 -2
  264. package/dist/interactive-B_dcVghB.mjs +0 -2
  265. package/dist/kv-DmAQCqXl.mjs +0 -21
  266. package/dist/lazy-command-B_bwSa2F.mjs +0 -2
  267. package/dist/local-CFd107fr.mjs +0 -2
  268. package/dist/migrate-CXMbQPyC.mjs +0 -2
  269. package/dist/pages-CjPErYik.mjs +0 -60
  270. package/dist/previews-Dj_LcGRd.mjs +0 -4
  271. package/dist/r2-C0W2J4sT.mjs +0 -127
  272. package/dist/resolve-BVxXAYG7.mjs +0 -2
  273. package/dist/run-C_qUgBTs.mjs +0 -2
  274. package/dist/run-DK1d9BJz.mjs +0 -2
  275. package/dist/shared--lvrXmXY.mjs +0 -2
  276. package/dist/spawn-Da3HnlmB.mjs +0 -10
  277. package/dist/src-BLLpnbzC.mjs +0 -109
  278. package/dist/startup-profile-Cw-_akjQ.mjs +0 -2
  279. package/dist/state-CcktNox9.mjs +0 -2
  280. package/dist/telemetry-C0k8vfbq.mjs +0 -2
  281. package/dist/telemetry-Dh-8kdfY.mjs +0 -5
  282. package/dist/telemetry-IrDBqbQW.mjs +0 -2
  283. package/dist/update-check-BYJnL8J8.mjs +0 -2
  284. package/dist/update-check-DFoSm5GT.mjs +0 -2
  285. package/dist/version-B47pK_PZ.mjs +0 -2
  286. package/dist/workers-CNBv6GxE.mjs +0 -36
  287. package/dist/zt-Bt4Q6iM1.mjs +0 -110
  288. /package/dist/{Page-BchtVjAO.mjs → Page-CjJht2qT.mjs} +0 -0
  289. /package/dist/{alerts-DY_7Nknx.mjs → alerts-DqZgVSCT.mjs} +0 -0
  290. /package/dist/{autorag-K396-M2S.mjs → autorag-Cq9k9Ye6.mjs} +0 -0
  291. /package/dist/{body-parser-BpPZBRMr.mjs → body-parser-hh2avzkz.mjs} +0 -0
  292. /package/dist/{brands-Uy0Cmv1w.mjs → brands-DeLbFxSt.mjs} +0 -0
  293. /package/dist/{browser-extension-D_siSsD9.mjs → browser-extension-C1zmKFDG.mjs} +0 -0
  294. /package/dist/{chunk-U6NEESU5-CAnOLcsu.mjs → chunk-U6NEESU5-BhF4rnpx.mjs} +0 -0
  295. /package/dist/{chunk-WMOON6TZ-D3H84qpM.mjs → chunk-WMOON6TZ-D_ToS88f.mjs} +0 -0
  296. /package/dist/{clear-CpcO2ExU.mjs → clear-CRfI7WS7.mjs} +0 -0
  297. /package/dist/{cli-types-B6tm-8uL.mjs → cli-types-DoVT5q_M.mjs} +0 -0
  298. /package/dist/{connector-telemetry-events-latest-oguk5Zyj.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
  299. /package/dist/{connector-telemetry-snapshots-latest-B6zuxkr0.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
  300. /package/dist/{delegate-CCGgla7X.mjs → delegate-B6LetRpZ.mjs} +0 -0
  301. /package/dist/{input-validation-D3e278L_.mjs → input-validation-Dk52b0me.mjs} +0 -0
  302. /package/dist/{interactive-D80kbTap.mjs → interactive-C-o16XQs.mjs} +0 -0
  303. /package/dist/{lifecycle-Cyc3fmyN.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
  304. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-DO6njFg_.mjs} +0 -0
  305. /package/dist/{resolve-qPFfBMrn.mjs → resolve-BCTrtcx7.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-BpPZBRMr.mjs";import{n as m,t as h}from"./input-validation-D3e278L_.mjs";import{a as g,i as _,n as v}from"./prompt-Mh69ni1N.mjs";import{t as y}from"./cli-types-B6tm-8uL.mjs";import{n as ee,t as te}from"./raw-fetch-1ygCOcT_.mjs";function b(e){return e.usage(`$0 zero-trust access applications cas create <app-id>
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m,t as h}from"./input-validation-Dk52b0me.mjs";import{a as g,i as _,n as v}from"./prompt-DV6YTdoa.mjs";import{t as y}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-Cp3EaTcj.mjs";function b(e){return e.usage(`$0 zero-trust access applications cas create <app-id>
3
3
 
4
4
  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 x={command:`create <app-id>`,describe:`Create a short-lived certificate CA`,builder:b,handler:async i=>l({command:`zero-trust access applications cas create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust access applications cas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${i[`app-id`]==null?`<app-id>`:encodeURIComponent(String(i[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"app-id":String(i[`app-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Creating`,async()=>l.zeroTrust.access.applications.cas.create({account_or_zone:u,account_or_zone_id:d,app_id:i[`app-id`]})),{successLabel:`Created`})})};function S(e){return e.usage(`$0 zero-trust access applications cas delete <app-id>
5
5
 
@@ -173,513 +173,663 @@ Get a tag`).positional(`tag-name`,{type:`string`,description:`The name of the ta
173
173
 
174
174
  List tags`).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 Un={command:`list`,describe:`List tags`,builder:Hn,handler:async n=>l({command:`zero-trust access tags list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust access tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/tags`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.access.tags.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Wn(e){return e.usage(`$0 zero-trust access tags update <tag-name>
175
175
 
176
- Update a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,demandOption:!0}).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:`A tag`})}const Gn={command:`update <tag-name>`,describe:`Update a tag`,builder:Wn,handler:async n=>l({command:`zero-trust access tags update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/tags/${n[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(n[`tag-name`]))}`,pathParams:{"tag-name":String(n[`tag-name`]??``)},bodyKind:`json`,body:n.body===void 0?p({name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.access.tags.update({...e,account_id:l,tag_name:n[`tag-name`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`The name of the tag`));let u=p({name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.access.tags.update({...u,account_id:l,tag_name:n[`tag-name`]})),{successLabel:`Updated`})})},Kn={command:`tags`,describe:`Operations for access.tags`,builder:e=>e.command(Ln).command(zn).command(Vn).command(Un).command(Gn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qn(e){return e.usage(`$0 zero-trust access users active-sessions get <nonce>
176
+ Update a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,demandOption:!0}).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:`A tag`})}const Gn={command:`update <tag-name>`,describe:`Update a tag`,builder:Wn,handler:async n=>l({command:`zero-trust access tags update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/tags/${n[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(n[`tag-name`]))}`,pathParams:{"tag-name":String(n[`tag-name`]??``)},bodyKind:`json`,body:n.body===void 0?p({name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.access.tags.update({...e,account_id:l,tag_name:n[`tag-name`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`The name of the tag`));let u=p({name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.access.tags.update({...u,account_id:l,tag_name:n[`tag-name`]})),{successLabel:`Updated`})})},Kn={command:`tags`,describe:`Operations for access.tags`,builder:e=>e.command(Ln).command(zn).command(Vn).command(Un).command(Gn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qn(e){return e.usage(`$0 zero-trust access targets bulk delete
177
177
 
178
- Get an active session for a single user.`).positional(`nonce`,{type:`string`,description:`Nonce`,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})}const Jn={command:`get <nonce>`,describe:`Get single active session`,builder:qn,handler:async n=>l({command:`zero-trust access users active-sessions get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users active-sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/active_sessions/${n.nonce==null?`<nonce>`:encodeURIComponent(String(n.nonce))}`,pathParams:{"user-id":String(n[`user-id`]??``),nonce:String(n.nonce??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.activeSessions.get({account_id:l,user_id:n[`user-id`],nonce:n.nonce})),{successLabel:`Loaded`})})};function Yn(e){return e.usage(`$0 zero-trust access users active-sessions list
178
+ Removes one or more targets.`).option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).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:`delete`,describe:`Delete targets`,builder:qn,handler:async n=>l({command:`zero-trust access targets bulk delete`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({target_ids:n[`target-ids`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.access.targets.bulk.delete({...e,account_id:l})),{successLabel:`Created`});return}if(n[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let u=p({target_ids:n[`target-ids`]});o(await c(`Creating`,async()=>i.zeroTrust.access.targets.bulk.delete({...u,account_id:l})),{successLabel:`Created`})})};function Yn(e){return e.usage(`$0 zero-trust access targets bulk replace-tags
179
179
 
180
- Get active sessions 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 Xn={command:`list`,describe:`Get active sessions`,builder:Yn,handler:async n=>l({command:`zero-trust access users active-sessions list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users active-sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/active_sessions`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.activeSessions.list({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})},Zn={command:`active-sessions`,describe:`Operations for access.users.active-sessions`,builder:e=>e.command(Jn).command(Xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qn(e){return e.usage(`$0 zero-trust access users create
180
+ Replaces tags for one or more existing infrastructure access targets.`).option(`items`,{type:`string`,description:`The items 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:`Raw JSON request body (bypasses individual flags)`})}const Xn={command:`replace-tags`,describe:`Replace tags on existing targets`,builder:Yn,handler:async n=>l({command:`zero-trust access targets bulk replace-tags`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets bulk replace-tags`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets/batch_tags`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({items:f(n.items,`items`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.access.targets.bulk.replaceTags({...e,account_id:l})),{successLabel:`Created`});return}if(n.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let u=p({items:f(n.items,`items`)});o(await c(`Creating`,async()=>i.zeroTrust.access.targets.bulk.replaceTags({...u,account_id:l})),{successLabel:`Created`})})};function Zn(e){return e.usage(`$0 zero-trust access targets bulk update
181
181
 
182
- 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 $n={command:`create`,describe:`Create a user`,builder:Qn,handler:async n=>l({command:`zero-trust access users create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.access.users.create({...e,account_id:l})),{successLabel:`Created`});return}n.email===void 0&&(n.email=await g(`email`,`The email of the user.`));let u=p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.access.users.create({...u,account_id:l})),{successLabel:`Created`})})};function er(e){return e.usage(`$0 zero-trust access users delete <user-id>
182
+ Adds one or more targets.`).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 Qn={command:`update`,describe:`Create new targets`,builder:Zn,handler:async n=>l({command:`zero-trust access targets bulk update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets/batch`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.access.targets.bulk.update({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},$n={command:`bulk`,describe:`Operations for access.targets.bulk`,builder:e=>e.command(Jn).command(Xn).command(Qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function er(e){return e.usage(`$0 zero-trust access targets create
183
183
 
184
- 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 tr={command:`delete <user-id>`,describe:`Delete a user`,builder:er,handler:async n=>l({command:`zero-trust access users delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
185
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.access.users.delete({account_id:l,user_id:n[`user-id`]})),{successLabel:`Deleted`})})};function nr(e){return e.usage(`$0 zero-trust access users failed-logins list
184
+ Creates a new infrastructure access target in the account.`).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
185
+ length of 255 characters, supports the use of special characters dash
186
+ and period, does not support spaces, and must start and end with an
187
+ 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(`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 tr={command:`create`,describe:`Create new target`,builder:er,handler:async n=>l({command:`zero-trust access targets create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({hostname:m(n.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:m(n[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:m(n[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.access.targets.create({...e,account_id:l})),{successLabel:`Created`});return}n.hostname===void 0&&(n.hostname=await g(`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=p({hostname:m(n.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:m(n[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:m(n[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});o(await c(`Creating`,async()=>i.zeroTrust.access.targets.create({...u,account_id:l})),{successLabel:`Created`})})};function nr(e){return e.usage(`$0 zero-trust access targets delete <target-id>
186
188
 
187
- 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 rr={command:`list`,describe:`Get failed logins`,builder:nr,handler:async n=>l({command:`zero-trust access users failed-logins list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users failed-logins list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/failed_logins`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.failedLogins.list({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})},ir={command:`failed-logins`,describe:`Operations for access.users.failed-logins`,builder:e=>e.command(rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ar(e){return e.usage(`$0 zero-trust access users get <user-id>
189
+ 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 rr={command:`delete <target-id>`,describe:`Delete target`,builder:nr,handler:async n=>l({command:`zero-trust access targets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets/${n[`target-id`]==null?`<target-id>`:encodeURIComponent(String(n[`target-id`]))}`,pathParams:{"target-id":String(n[`target-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
190
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.access.targets.delete({account_id:l,target_id:n[`target-id`]})),{successLabel:`Deleted`})})};function ir(e){return e.usage(`$0 zero-trust access targets get <target-id>
188
191
 
189
- Gets a specific user for an account.`).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})}const or={command:`get <user-id>`,describe:`Get a user`,builder:ar,handler:async n=>l({command:`zero-trust access users get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.get({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})};function sr(e){return e.usage(`$0 zero-trust access users last-seen-identity get <user-id>
192
+ 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 ar={command:`get <target-id>`,describe:`Get target`,builder:ir,handler:async n=>l({command:`zero-trust access targets get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets/${n[`target-id`]==null?`<target-id>`:encodeURIComponent(String(n[`target-id`]))}`,pathParams:{"target-id":String(n[`target-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.targets.get({account_id:l,target_id:n[`target-id`]})),{successLabel:`Loaded`})})};function or(e){return e.usage(`$0 zero-trust access targets list
190
193
 
191
- Get last seen identity for a single 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})}const cr={command:`get <user-id>`,describe:`Get last seen identity`,builder:sr,handler:async n=>l({command:`zero-trust access users last-seen-identity get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users last-seen-identity get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/last_seen_identity`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.lastSeenIdentity.get({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})},lr={command:`last-seen-identity`,describe:`Operations for access.users.last-seen-identity`,builder:e=>e.command(cr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ur(e){return e.usage(`$0 zero-trust access users list
194
+ Lists and sorts an account's targets. Filters are optional and are ANDed together.`).option(`hostname`,{type:`string`,description:`Hostname of a target`}).option(`hostname-contains`,{type:`string`,description:`Partial match to the hostname of a target`}).option(`virtual-network-id`,{type:`string`,description:`Private virtual network identifier of the target`}).option(`ip-v4`,{type:`string`,description:`IPv4 address of the target`}).option(`ip-v6`,{type:`string`,description:`IPv6 address of the target`}).option(`created-before`,{type:`string`,description:`Date and time at which the target was created before (inclusive)`}).option(`created-after`,{type:`string`,description:`Date and time at which the target was created after (inclusive)`}).option(`modified-before`,{type:`string`,description:`Date and time at which the target was modified before (inclusive)`}).option(`modified-after`,{type:`string`,description:`Date and time at which the target was modified after (inclusive)`}).option(`ips`,{type:`string`,description:"Filters for targets that have any of the following IP addresses. Specify\n`ips` multiple times in query parameter to build list of candidates."}).option(`target-ids`,{type:`string`,description:`Filters for targets that have any of the following UUIDs. Specify
195
+ \`target_ids\` multiple times in query parameter to build list of
196
+ candidates.`}).option(`ip-like`,{type:`string`,description:"Filters for targets whose IP addresses look like the specified string.\nSupports `*` as a wildcard character"}).option(`ipv4-start`,{type:`string`,description:"Defines an IPv4 filter range's starting value (inclusive). Requires\n`ipv4_end` to be specified as well."}).option(`ipv4-end`,{type:`string`,description:"Defines an IPv4 filter range's ending value (inclusive). Requires\n`ipv4_start` to be specified as well."}).option(`ipv6-start`,{type:`string`,description:"Defines an IPv6 filter range's starting value (inclusive). Requires\n`ipv6_end` to be specified as well."}).option(`ipv6-end`,{type:`string`,description:"Defines an IPv6 filter range's ending value (inclusive). Requires\n`ipv6_start` to be specified as well."}).option(`tag`,{type:`string`,description:"Filter by tag key:value pairs. Multiple `tag` params are AND'd.\nFormat: `tag=key:value` (e.g., `tag=environment:production`).\nKey and value must both be non-empty; `tag=:value` and `tag=key:` return 400."}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`order`,{type:`string`,description:`The field to sort by.`,choices:[`hostname`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sr={command:`list`,describe:`List all targets`,builder:y(or),handler:async n=>l({command:`zero-trust access targets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},n,async()=>{let i={hostname:n.hostname,hostname_contains:n[`hostname-contains`],virtual_network_id:n[`virtual-network-id`],ip_v4:n[`ip-v4`],ip_v6:n[`ip-v6`],created_before:n[`created-before`],created_after:n[`created-after`],modified_before:n[`modified-before`],modified_after:n[`modified-after`],ips:n.ips,target_ids:n[`target-ids`],ip_like:n[`ip-like`],ipv4_start:n[`ipv4-start`],ipv4_end:n[`ipv4-end`],ipv6_start:n[`ipv6-start`],ipv6_end:n[`ipv6-end`],tag:n.tag,page:n.page,per_page:n[`per-page`],order:n.order,direction:n.direction};if(n.dryRun){s({command:`cf zero-trust access targets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.access.targets.list({account_id:u,...i})),{successLabel:`Loaded`})})};function cr(e){return e.usage(`$0 zero-trust access targets update <target-id>
192
197
 
193
- 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 dr={command:`list`,describe:`Get users`,builder:ur,handler:async n=>l({command:`zero-trust access users list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={name:n.name,email:n.email,search:n.search,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust access users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.access.users.list({account_id:u,...i})),{successLabel:`Loaded`})})};function fr(e){return e.usage(`$0 zero-trust access users update <user-id>
198
+ Updates an existing infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
199
+ length of 255 characters, supports the use of special characters dash
200
+ and period, does not support spaces, and must start and end with an
201
+ 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(`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 lr={command:`update <target-id>`,describe:`Update target`,builder:cr,handler:async n=>l({command:`zero-trust access targets update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access targets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/infrastructure/targets/${n[`target-id`]==null?`<target-id>`:encodeURIComponent(String(n[`target-id`]))}`,pathParams:{"target-id":String(n[`target-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({hostname:m(n.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:m(n[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:m(n[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.access.targets.update({...e,account_id:l,target_id:n[`target-id`]})),{successLabel:`Updated`});return}n.hostname===void 0&&(n.hostname=await g(`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=p({hostname:m(n.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:m(n[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:m(n[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:m(n[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});o(await c(`Updating`,async()=>i.zeroTrust.access.targets.update({...u,account_id:l,target_id:n[`target-id`]})),{successLabel:`Updated`})})},ur={command:`targets`,describe:`Operations for access.targets`,builder:e=>e.command(tr).command(rr).command(ar).command(sr).command(lr).command($n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dr(e){return e.usage(`$0 zero-trust access users active-sessions get <nonce>
194
202
 
195
- 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 pr={command:`update <user-id>`,describe:`Update a user`,builder:fr,handler:async n=>l({command:`zero-trust access users update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.access.users.update({...e,account_id:l,user_id:n[`user-id`]})),{successLabel:`Updated`});return}n.email===void 0&&(n.email=await g(`email`,`The email of the user.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the user.`));let u=p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.access.users.update({...u,account_id:l,user_id:n[`user-id`]})),{successLabel:`Updated`})})},mr={command:`users`,describe:`Operations for access.users`,builder:e=>e.command($n).command(tr).command(or).command(dr).command(pr).command(Zn).command(ir).command(lr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},hr={command:`access`,describe:`Operations for access`,builder:e=>e.command(_e).command(be).command(je).command(qe).command(ot).command(pt).command(wt).command(Nt).command(Bt).command($t).command(dn).command(bn).command(Fn).command(Kn).command(mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gr(e){return e.usage(`$0 zero-trust apps policies make reusable update <policy-id>
203
+ Get an active session for a single user.`).positional(`nonce`,{type:`string`,description:`Nonce`,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})}const fr={command:`get <nonce>`,describe:`Get single active session`,builder:dr,handler:async n=>l({command:`zero-trust access users active-sessions get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users active-sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/active_sessions/${n.nonce==null?`<nonce>`:encodeURIComponent(String(n.nonce))}`,pathParams:{"user-id":String(n[`user-id`]??``),nonce:String(n.nonce??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.activeSessions.get({account_id:l,user_id:n[`user-id`],nonce:n.nonce})),{successLabel:`Loaded`})})};function pr(e){return e.usage(`$0 zero-trust access users active-sessions list
196
204
 
197
- Converts an application-scoped policy to a reusable policy. The policy will no longer be exclusively scoped to the application. Further updates to the policy should go through the /accounts/{account_id}/policies/{uid} endpoint.`).positional(`policy-id`,{type:`string`,description:`The policy ID.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The application ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _r={command:`update <policy-id>`,describe:`Convert an Access application policy to a reusable policy`,builder:gr,handler:async n=>l({command:`zero-trust apps policies make reusable update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust apps policies make reusable update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/apps/${n[`app-id`]==null?`<app-id>`:encodeURIComponent(String(n[`app-id`]))}/policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}/make_reusable`,pathParams:{"app-id":String(n[`app-id`]??``),"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Updating`,async()=>i.zeroTrust.apps.policies.make.reusable.update({account_id:l,app_id:n[`app-id`],policy_id:n[`policy-id`]})),{successLabel:`Updated`})})},vr={command:`reusable`,describe:`Operations for apps.policies.make.reusable`,builder:e=>e.command(_r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yr={command:`make`,describe:`Operations for apps.policies.make`,builder:e=>e.command(vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},br={command:`policies`,describe:`Operations for apps.policies`,builder:e=>e.command(yr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xr(e){return e.usage(`$0 zero-trust apps review status list
205
+ Get active sessions 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 mr={command:`list`,describe:`Get active sessions`,builder:pr,handler:async n=>l({command:`zero-trust access users active-sessions list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users active-sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/active_sessions`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.activeSessions.list({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})},hr={command:`active-sessions`,describe:`Operations for access.users.active-sessions`,builder:e=>e.command(fr).command(mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gr(e){return e.usage(`$0 zero-trust access users create
198
206
 
199
- Retrieve the statuses of your applications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sr={command:`list`,describe:`List applications review statuses`,builder:xr,handler:async n=>l({command:`zero-trust apps review status list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust apps review status list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/apps/review_status`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.apps.review.status.list({account_id:l})),{successLabel:`Loaded`})})};function Cr(e){return e.usage(`$0 zero-trust apps review status update
207
+ 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 _r={command:`create`,describe:`Create a user`,builder:gr,handler:async n=>l({command:`zero-trust access users create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.access.users.create({...e,account_id:l})),{successLabel:`Created`});return}n.email===void 0&&(n.email=await g(`email`,`The email of the user.`));let u=p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.access.users.create({...u,account_id:l})),{successLabel:`Created`})})};function vr(e){return e.usage(`$0 zero-trust access users delete <user-id>
200
208
 
201
- Update the statuses of your applications.`).option(`approved-apps`,{type:`string`,array:!0,description:`Contains the ids of the approved applications.`}).option(`in-review-apps`,{type:`string`,array:!0,description:`Contains the ids of the applications in review.`}).option(`unapproved-apps`,{type:`string`,array:!0,description:`Contains the ids of the unapproved applications.`}).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 wr={command:`update`,describe:`Update applications review statuses`,builder:Cr,handler:async n=>l({command:`zero-trust apps review status update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust apps review status update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/apps/review_status`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({approved_apps:n[`approved-apps`],in_review_apps:n[`in-review-apps`],unapproved_apps:n[`unapproved-apps`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.apps.review.status.update({...e,account_id:l})),{successLabel:`Updated`});return}if(n[`approved-apps`]===void 0)throw Error(`--approved-apps is required (or pass --body with this field set).`);if(n[`in-review-apps`]===void 0)throw Error(`--in-review-apps is required (or pass --body with this field set).`);if(n[`unapproved-apps`]===void 0)throw Error(`--unapproved-apps is required (or pass --body with this field set).`);let u=p({approved_apps:n[`approved-apps`],in_review_apps:n[`in-review-apps`],unapproved_apps:n[`unapproved-apps`]});o(await c(`Updating`,async()=>i.zeroTrust.apps.review.status.update({...u,account_id:l})),{successLabel:`Updated`})})},Tr={command:`status`,describe:`Operations for apps.review.status`,builder:e=>e.command(Sr).command(wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Er={command:`review`,describe:`Operations for apps.review`,builder:e=>e.command(Tr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dr={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(br).command(Er).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Or(e){return e.usage(`$0 zero-trust casb applications auth-methods list
209
+ 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 yr={command:`delete <user-id>`,describe:`Delete a user`,builder:vr,handler:async n=>l({command:`zero-trust access users delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
210
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.access.users.delete({account_id:l,user_id:n[`user-id`]})),{successLabel:`Deleted`})})};function br(e){return e.usage(`$0 zero-trust access users failed-logins list
202
211
 
203
- Returns available auth methods for the specified vendor, including credential schema, instructions, and example payloads. Use this to understand what credentials are required before calling POST /v2/integrations.`).option(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kr={command:`list`,describe:`Get auth methods`,builder:y(Or),handler:async n=>l({command:`zero-trust casb applications auth-methods list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,page_size:n[`page-size`]};if(n.dryRun){s({command:`cf zero-trust casb applications auth-methods list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/applications/${n[`application-id`]==null?`<application-id>`:encodeURIComponent(String(n[`application-id`]))}/auth-methods`,pathParams:{"application-id":String(n[`application-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.applications.authMethods.list({account_id:u,application_id:n[`application-id`],...i})),{successLabel:`Loaded`})})},Ar={command:`auth-methods`,describe:`Operations for casb.applications.auth-methods`,builder:e=>e.command(kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jr(e){return e.usage(`$0 zero-trust casb applications get <application-id>
212
+ 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 xr={command:`list`,describe:`Get failed logins`,builder:br,handler:async n=>l({command:`zero-trust access users failed-logins list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users failed-logins list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/failed_logins`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.failedLogins.list({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})},Sr={command:`failed-logins`,describe:`Operations for access.users.failed-logins`,builder:e=>e.command(xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cr(e){return e.usage(`$0 zero-trust access users get <user-id>
204
213
 
205
- Returns full application details including auth methods, use cases, and permissions.`).positional(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mr={command:`get <application-id>`,describe:`Get application details`,builder:y(jr),handler:async n=>l({command:`zero-trust casb applications get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/applications/${n[`application-id`]==null?`<application-id>`:encodeURIComponent(String(n[`application-id`]))}`,pathParams:{"application-id":String(n[`application-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.applications.get({account_id:l,application_id:n[`application-id`]})),{successLabel:`Loaded`})})};function Nr(e){return e.usage(`$0 zero-trust casb applications list
214
+ Gets a specific user for an account.`).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})}const wr={command:`get <user-id>`,describe:`Get a user`,builder:Cr,handler:async n=>l({command:`zero-trust access users get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.get({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})};function Tr(e){return e.usage(`$0 zero-trust access users last-seen-identity get <user-id>
206
215
 
207
- Returns a list of available applications with use cases and permissions.`).option(`environment`,{type:`string`,description:`Filter by supported environment (standard, fedramp).`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pr={command:`list`,describe:`List applications`,builder:Nr,handler:async n=>l({command:`zero-trust casb applications list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={environment:n.environment,page:n.page,page_size:n[`page-size`]};if(n.dryRun){s({command:`cf zero-trust casb applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/applications`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.applications.list({account_id:u,...i})),{successLabel:`Loaded`})})},Fr={command:`applications`,describe:`Operations for casb.applications`,builder:e=>e.command(Mr).command(Pr).command(Ar).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ir(e){return e.usage(`$0 zero-trust casb integrations create
216
+ Get last seen identity for a single 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})}const Er={command:`get <user-id>`,describe:`Get last seen identity`,builder:Tr,handler:async n=>l({command:`zero-trust access users last-seen-identity get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users last-seen-identity get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/last_seen_identity`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.access.users.lastSeenIdentity.get({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})},Dr={command:`last-seen-identity`,describe:`Operations for access.users.last-seen-identity`,builder:e=>e.command(Er).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Or(e){return e.usage(`$0 zero-trust access users list
208
217
 
209
- 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",choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`]}).option(`auth-method`,{type:`string`,description:`Authentication method slug (uses default if omitted).`}).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 (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 Lr={command:`create`,describe:`Create integration`,builder:Ir,handler:async n=>l({command:`zero-trust casb integrations create`,classification:{safeFlags:[`application`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({application:m(n.application,`application`,`text`),auth_method:m(n[`auth-method`],`auth-method`,`text`),dlp_profiles:n[`dlp-profiles`],name:m(n.name,`name`,`text`),permissions:n.permissions,use_cases:n[`use-cases`]}):d(n.body)});return}let l=await a(n),f=n.local?e:await r();if(n.accountId=f,n.file){let e=h(n.file);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${f}/one/integrations`,{body:e,headers:{"Content-Type":`text/plain;charset=UTF-8`}})),{successLabel:`Created`});return}if(n.body){let e=d(n.body);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${f}/one/integrations`,{body:e})),{successLabel:`Created`});return}n.application===void 0&&(n.application=await _(`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",[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`])),n.name===void 0&&(n.name=await g(`name`,`Name of the integration.`));let v={};n.application!==void 0&&u(v,[`application`],m(n.application,`application`,`text`)),n[`auth-method`]!==void 0&&u(v,[`auth_method`],m(n[`auth-method`],`auth-method`,`text`)),n[`dlp-profiles`]!==void 0&&u(v,[`dlp_profiles`],n[`dlp-profiles`]),n.name!==void 0&&u(v,[`name`],m(n.name,`name`,`text`)),n.permissions!==void 0&&u(v,[`permissions`],n.permissions),n[`use-cases`]!==void 0&&u(v,[`use_cases`],n[`use-cases`]),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${f}/one/integrations`,{body:Object.keys(v).length>0?v:void 0})),{successLabel:`Created`})})};function Rr(e){return e.usage(`$0 zero-trust casb integrations delete <id>
218
+ 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 kr={command:`list`,describe:`Get users`,builder:Or,handler:async n=>l({command:`zero-trust access users list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={name:n.name,email:n.email,search:n.search,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust access users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.access.users.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Ar(e){return e.usage(`$0 zero-trust access users update <user-id>
210
219
 
211
- 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 zr={command:`delete <id>`,describe:`Delete integration`,builder:Rr,handler:async n=>l({command:`zero-trust casb integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
212
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.casb.integrations.delete({account_id:l,id:n.id})),{successLabel:`Deleted`})})};function Br(e){return e.usage(`$0 zero-trust casb integrations get <id>
220
+ 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 jr={command:`update <user-id>`,describe:`Update a user`,builder:Ar,handler:async n=>l({command:`zero-trust access users update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust access users update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.access.users.update({...e,account_id:l,user_id:n[`user-id`]})),{successLabel:`Updated`});return}n.email===void 0&&(n.email=await g(`email`,`The email of the user.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the user.`));let u=p({email:m(n.email,`email`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.access.users.update({...u,account_id:l,user_id:n[`user-id`]})),{successLabel:`Updated`})})},Mr={command:`users`,describe:`Operations for access.users`,builder:e=>e.command(_r).command(yr).command(wr).command(kr).command(jr).command(hr).command(Sr).command(Dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nr={command:`access`,describe:`Operations for access`,builder:e=>e.command(_e).command(be).command(je).command(qe).command(ot).command(pt).command(wt).command(Nt).command(Bt).command($t).command(dn).command(bn).command(Fn).command(Kn).command(ur).command(Mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pr(e){return e.usage(`$0 zero-trust apps policies make reusable update <policy-id>
213
221
 
214
- 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 Vr={command:`get <id>`,describe:`Get integration details`,builder:Br,handler:async n=>l({command:`zero-trust casb integrations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.integrations.get({account_id:l,id:n.id})),{successLabel:`Loaded`})})};function Hr(e){return e.usage(`$0 zero-trust casb integrations list
222
+ Converts an application-scoped policy to a reusable policy. The policy will no longer be exclusively scoped to the application. Further updates to the policy should go through the /accounts/{account_id}/policies/{uid} endpoint.`).positional(`policy-id`,{type:`string`,description:`The policy ID.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The application ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fr={command:`update <policy-id>`,describe:`Convert an Access application policy to a reusable policy`,builder:Pr,handler:async n=>l({command:`zero-trust apps policies make reusable update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust apps policies make reusable update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/apps/${n[`app-id`]==null?`<app-id>`:encodeURIComponent(String(n[`app-id`]))}/policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}/make_reusable`,pathParams:{"app-id":String(n[`app-id`]??``),"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Updating`,async()=>i.zeroTrust.apps.policies.make.reusable.update({account_id:l,app_id:n[`app-id`],policy_id:n[`policy-id`]})),{successLabel:`Updated`})})},Ir={command:`reusable`,describe:`Operations for apps.policies.make.reusable`,builder:e=>e.command(Fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lr={command:`make`,describe:`Operations for apps.policies.make`,builder:e=>e.command(Ir).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rr={command:`policies`,describe:`Operations for apps.policies`,builder:e=>e.command(Lr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zr(e){return e.usage(`$0 zero-trust apps review status list
215
223
 
216
- Returns a paginated list of integrations for the account.`).option(`application`,{type:`string`,description:`Filter by application/vendor (e.g., GOOGLE_WORKSPACE, MICROSOFT_INTERNAL).`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-enabled`,{type:`boolean`,description:`Filter by DLP enabled status (true/false).`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`application`,`created`,`name`,`status`]}).option(`page`,{type:`number`,description:`Page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results per page.`}).option(`search`,{type:`string`,description:`Search integrations by name or application.`}).option(`status`,{type:`string`,description:`Filter by integration status.`,choices:[`Healthy`,`Initializing`,`Offline`,`Unhealthy`]}).option(`use-cases`,{type:`string`,description:`Filter by enabled use cases (e.g., casb, ces). Matches integrations enrolled in any of the specified values. Can be specified multiple times.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ur={command:`list`,describe:`List integrations`,builder:y(Hr),handler:async n=>l({command:`zero-trust casb integrations list`,classification:{safeFlags:[`direction`,`dlp-enabled`,`order`,`status`,`dry-run`]}},n,async()=>{let i={application:n.application,direction:n.direction,dlp_enabled:n[`dlp-enabled`],order:n.order,page:n.page,page_size:n[`page-size`],search:n.search,status:n.status,use_cases:n[`use-cases`]};if(n.dryRun){s({command:`cf zero-trust casb integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.integrations.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Wr(e){return e.usage(`$0 zero-trust casb integrations pause <id>
224
+ Retrieve the statuses of your applications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Br={command:`list`,describe:`List applications review statuses`,builder:zr,handler:async n=>l({command:`zero-trust apps review status list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust apps review status list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/apps/review_status`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.apps.review.status.list({account_id:l})),{successLabel:`Loaded`})})};function Vr(e){return e.usage(`$0 zero-trust apps review status update
217
225
 
218
- Pauses an integration, stopping all crawlers.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gr={command:`pause <id>`,describe:`Pause integration`,builder:Wr,handler:async n=>l({command:`zero-trust casb integrations pause`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations pause`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}/pause`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.casb.integrations.pause({account_id:l,id:n.id})),{successLabel:`Created`})})};function Kr(e){return e.usage(`$0 zero-trust casb integrations resume <id>
226
+ Update the statuses of your applications.`).option(`approved-apps`,{type:`string`,array:!0,description:`Contains the ids of the approved applications.`}).option(`in-review-apps`,{type:`string`,array:!0,description:`Contains the ids of the applications in review.`}).option(`unapproved-apps`,{type:`string`,array:!0,description:`Contains the ids of the unapproved applications.`}).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 Hr={command:`update`,describe:`Update applications review statuses`,builder:Vr,handler:async n=>l({command:`zero-trust apps review status update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust apps review status update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/apps/review_status`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({approved_apps:n[`approved-apps`],in_review_apps:n[`in-review-apps`],unapproved_apps:n[`unapproved-apps`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.apps.review.status.update({...e,account_id:l})),{successLabel:`Updated`});return}if(n[`approved-apps`]===void 0)throw Error(`--approved-apps is required (or pass --body with this field set).`);if(n[`in-review-apps`]===void 0)throw Error(`--in-review-apps is required (or pass --body with this field set).`);if(n[`unapproved-apps`]===void 0)throw Error(`--unapproved-apps is required (or pass --body with this field set).`);let u=p({approved_apps:n[`approved-apps`],in_review_apps:n[`in-review-apps`],unapproved_apps:n[`unapproved-apps`]});o(await c(`Updating`,async()=>i.zeroTrust.apps.review.status.update({...u,account_id:l})),{successLabel:`Updated`})})},Ur={command:`status`,describe:`Operations for apps.review.status`,builder:e=>e.command(Br).command(Hr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wr={command:`review`,describe:`Operations for apps.review`,builder:e=>e.command(Ur).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Gr={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(Rr).command(Wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Kr(e){return e.usage(`$0 zero-trust casb applications auth-methods list
219
227
 
220
- Resumes a paused integration, restarting crawlers.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qr={command:`resume <id>`,describe:`Resume integration`,builder:Kr,handler:async n=>l({command:`zero-trust casb integrations resume`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations resume`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}/resume`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.casb.integrations.resume({account_id:l,id:n.id})),{successLabel:`Created`})})};function Jr(e){return e.usage(`$0 zero-trust casb integrations update <id>
228
+ Returns available auth methods for the specified vendor, including credential schema, instructions, and example payloads. Use this to understand what credentials are required before calling POST /v2/integrations.`).option(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qr={command:`list`,describe:`Get auth methods`,builder:y(Kr),handler:async n=>l({command:`zero-trust casb applications auth-methods list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,page_size:n[`page-size`]};if(n.dryRun){s({command:`cf zero-trust casb applications auth-methods list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/applications/${n[`application-id`]==null?`<application-id>`:encodeURIComponent(String(n[`application-id`]))}/auth-methods`,pathParams:{"application-id":String(n[`application-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.applications.authMethods.list({account_id:u,application_id:n[`application-id`],...i})),{successLabel:`Loaded`})})},Jr={command:`auth-methods`,describe:`Operations for casb.applications.auth-methods`,builder:e=>e.command(qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yr(e){return e.usage(`$0 zero-trust casb applications get <application-id>
221
229
 
222
- Updates an integration's name, permissions, DLP profiles, use cases, or credentials.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dlp-profiles`,{type:`string`,array:!0,description:`List of DLP profile IDs to associate with the integration.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes granted to the integration.`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll (e.g., ['casb', 'ces', 'auto_remediation']).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Serializer for v2 integration PATCH requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Yr={command:`update <id>`,describe:`Update integration`,builder:Jr,handler:async n=>l({command:`zero-trust casb integrations update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`json`,body:n.body===void 0?p({dlp_profiles:n[`dlp-profiles`],name:m(n.name,`name`,`text`),permissions:n.permissions,use_cases:n[`use-cases`]}):d(n.body)});return}let l=await a(n),f=n.local?e:await r();if(n.accountId=f,n.file){let e=h(n.file);o(await c(`Updating`,async()=>i(l,`PATCH`,`/accounts/${f}/one/integrations/${encodeURIComponent(String(n.id))}`,{body:e,headers:{"Content-Type":`text/plain;charset=UTF-8`}})),{successLabel:`Updated`});return}if(n.body){let e=d(n.body);o(await c(`Updating`,async()=>i(l,`PATCH`,`/accounts/${f}/one/integrations/${encodeURIComponent(String(n.id))}`,{body:e})),{successLabel:`Updated`});return}let g={};n[`dlp-profiles`]!==void 0&&u(g,[`dlp_profiles`],n[`dlp-profiles`]),n.name!==void 0&&u(g,[`name`],m(n.name,`name`,`text`)),n.permissions!==void 0&&u(g,[`permissions`],n.permissions),n[`use-cases`]!==void 0&&u(g,[`use_cases`],n[`use-cases`]),o(await c(`Updating`,async()=>i(l,`PATCH`,`/accounts/${f}/one/integrations/${encodeURIComponent(String(n.id))}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`})})},Xr={command:`integrations`,describe:`Operations for casb.integrations`,builder:e=>e.command(Lr).command(zr).command(Vr).command(Ur).command(Gr).command(qr).command(Yr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zr={command:`casb`,describe:`Operations for casb`,builder:e=>e.command(Fr).command(Xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qr(e){return e.usage(`$0 zero-trust connectivity-settings edit
230
+ Returns full application details including auth methods, use cases, and permissions.`).positional(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xr={command:`get <application-id>`,describe:`Get application details`,builder:y(Yr),handler:async n=>l({command:`zero-trust casb applications get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/applications/${n[`application-id`]==null?`<application-id>`:encodeURIComponent(String(n[`application-id`]))}`,pathParams:{"application-id":String(n[`application-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.applications.get({account_id:l,application_id:n[`application-id`]})),{successLabel:`Loaded`})})};function Zr(e){return e.usage(`$0 zero-trust casb applications list
223
231
 
224
- Updates the Zero Trust Connectivity Settings for the given account.`).option(`icmp-proxy-enabled`,{type:`boolean`,description:`A flag to enable the ICMP proxy for the account network.`}).option(`offramp-warp-enabled`,{type:`boolean`,description:`A flag to enable WARP to WARP traffic.`}).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 $r={command:`edit`,describe:`Updates the Zero Trust Connectivity Settings`,builder:Qr,handler:async n=>l({command:`zero-trust connectivity-settings edit`,classification:{safeFlags:[`icmp-proxy-enabled`,`offramp-warp-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust connectivity-settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zerotrust/connectivity_settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({icmp_proxy_enabled:n[`icmp-proxy-enabled`],offramp_warp_enabled:n[`offramp-warp-enabled`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.connectivitySettings.edit({...e,account_id:l})),{successLabel:`Updated`});return}let u=p({icmp_proxy_enabled:n[`icmp-proxy-enabled`],offramp_warp_enabled:n[`offramp-warp-enabled`]});o(await c(`Updating`,async()=>i.zeroTrust.connectivitySettings.edit({...u,account_id:l})),{successLabel:`Updated`})})};function ei(e){return e.usage(`$0 zero-trust connectivity-settings get
232
+ Returns a list of available applications with use cases and permissions.`).option(`environment`,{type:`string`,description:`Filter by supported environment (standard, fedramp).`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qr={command:`list`,describe:`List applications`,builder:Zr,handler:async n=>l({command:`zero-trust casb applications list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={environment:n.environment,page:n.page,page_size:n[`page-size`]};if(n.dryRun){s({command:`cf zero-trust casb applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/applications`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.applications.list({account_id:u,...i})),{successLabel:`Loaded`})})},$r={command:`applications`,describe:`Operations for casb.applications`,builder:e=>e.command(Xr).command(Qr).command(Jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ei(e){return e.usage(`$0 zero-trust casb content export
225
233
 
226
- Gets the Zero Trust Connectivity Settings for the given account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ti={command:`get`,describe:`Get Zero Trust Connectivity Settings`,builder:ei,handler:async n=>l({command:`zero-trust connectivity-settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust connectivity-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zerotrust/connectivity_settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.connectivitySettings.get({account_id:l})),{successLabel:`Loaded`})})},ni={command:`connectivity-settings`,describe:`Operations for connectivity-settings`,builder:e=>e.command($r).command(ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ri(e){return e.usage(`$0 zero-trust dex colos list
234
+ Creates a CSV export for content and accepts optional filters in the payload.`).option(`dlp-profile-id`,{type:`string`,array:!0,description:`Filter by DLP profile IDs.`}).option(`dlp-profile-information`,{type:`string`,description:`DLP profile metadata for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view content flagged on or before this date.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view content flagged on or after this date.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`Search term to filter content.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating content exports.`})}const ti={command:`export`,describe:`Create a content export`,builder:ei,handler:async n=>l({command:`zero-trust casb content export`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb content export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/content/export`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({dlp_profile_id:n[`dlp-profile-id`],dlp_profile_information:f(n[`dlp-profile-information`],`dlp-profile-information`),integration_id:n[`integration-id`],max_affliction_date:m(n[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:m(n[`min-affliction-date`],`min-affliction-date`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`),vendors:n.vendors}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Loading`,async()=>i.zeroTrust.casb.content.export({...e,account_id:l})),{successLabel:`Loaded`});return}if(n[`dlp-profile-information`]===void 0)throw Error(`--dlp-profile-information is required (or pass --body with this field set).`);let u=p({dlp_profile_id:n[`dlp-profile-id`],dlp_profile_information:f(n[`dlp-profile-information`],`dlp-profile-information`),integration_id:n[`integration-id`],max_affliction_date:m(n[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:m(n[`min-affliction-date`],`min-affliction-date`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`),vendors:n.vendors});o(await c(`Loading`,async()=>i.zeroTrust.casb.content.export({...u,account_id:l})),{successLabel:`Loaded`})})};function ni(e){return e.usage(`$0 zero-trust casb content list
227
235
 
228
- List Cloudflare colos that account's devices were connected to during a time period, sorted by usage starting from the most used colo. Colos without traffic are also returned and sorted alphabetically.`).option(`from`,{type:`string`,description:`Start time for connection period in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for connection period in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`sort-by`,{type:`string`,description:`Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically.`,choices:[`fleet-status-usage`,`application-tests-usage`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ii={command:`list`,describe:`List Cloudflare colos`,builder:y(ri),handler:async n=>l({command:`zero-trust dex colos list`,classification:{safeFlags:[`sort-by`,`dry-run`]}},n,async()=>{let i={from:n.from,to:n.to,sortBy:n[`sort-by`]};if(n.dryRun){s({command:`cf zero-trust dex colos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/colos`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.colos.list({account_id:u,...i})),{successLabel:`Loaded`})})},ai={command:`colos`,describe:`Operations for dex.colos`,builder:e=>e.command(ii).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oi(e){return e.usage(`$0 zero-trust dex commands create
236
+ List DLP content findings`).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-profile-id`,{type:`string`,description:`Filter by an DLP profile ID`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering content assets.`,choices:[`asset_name`,`dlp_profile_count`,`integration_name`,`latest_affliction_date`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ri={command:`list`,describe:`List DLP content findings`,builder:y(ni),handler:async n=>l({command:`zero-trust casb content list`,classification:{safeFlags:[`direction`,`order`,`vendor`,`dry-run`]}},n,async()=>{let i={direction:n.direction,dlp_profile_id:n[`dlp-profile-id`],integration_id:n[`integration-id`],max_affliction_date:n[`max-affliction-date`],min_affliction_date:n[`min-affliction-date`],order:n.order,page:n.page,per_page:n[`per-page`],search:n.search,vendor:n.vendor};if(n.dryRun){s({command:`cf zero-trust casb content list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/content`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.content.list({account_id:u,...i})),{successLabel:`Loaded`})})},ii={command:`content`,describe:`Operations for casb.content`,builder:e=>e.command(ti).command(ri).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ai(e){return e.usage(`$0 zero-trust casb exports get <id>
229
237
 
230
- Initiate commands for up to 10 devices per account.`).option(`commands`,{type:`string`,description:`List of device-level commands to execute. 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 si={command:`create`,describe:`Create account commands`,builder:oi,handler:async n=>l({command:`zero-trust dex commands create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex commands create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({commands:f(n.commands,`commands`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dex.commands.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.commands===void 0)throw Error(`--commands is required (or pass --body with this field set).`);let u=p({commands:f(n.commands,`commands`)});o(await c(`Creating`,async()=>i.zeroTrust.dex.commands.create({...u,account_id:l})),{successLabel:`Created`})})};function ci(e){return e.usage(`$0 zero-trust dex commands eligible-devices list
238
+ Retrieves a single export job by its unique identifier`).positional(`id`,{type:`string`,description:`Unique identifier for the export job`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oi={command:`get <id>`,describe:`Get a single export job`,builder:ai,handler:async n=>l({command:`zero-trust casb exports get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb exports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/exports/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.exports.get({account_id:l,id:n.id})),{successLabel:`Loaded`})})};function si(e){return e.usage(`$0 zero-trust casb exports list
231
239
 
232
- List devices with WARP client support for remote captures which have been connected in the last 1 hour.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`search`,{type:`string`,description:`Filter devices by name or email.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const li={command:`list`,describe:`List devices eligible for remote captures`,builder:ci,handler:async n=>l({command:`zero-trust dex commands eligible-devices list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],search:n.search};if(n.dryRun){s({command:`cf zero-trust dex commands eligible-devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands/devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.commands.eligibleDevices.list({account_id:u,...i})),{successLabel:`Loaded`})})},ui={command:`eligible-devices`,describe:`Operations for dex.commands.eligible-devices`,builder:e=>e.command(li).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function di(e){return e.usage(`$0 zero-trust dex commands list
240
+ List all export jobs for a given requestor's organization`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`status`,{type:`string`,description:`Filter on export job's status`,choices:[`Pending`,`Success`,`Failure`,`Rescheduled`,`In-Progress`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ci={command:`list`,describe:`List all export jobs`,builder:y(si),handler:async n=>l({command:`zero-trust casb exports list`,classification:{safeFlags:[`status`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],status:n.status};if(n.dryRun){s({command:`cf zero-trust casb exports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/exports`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.exports.list({account_id:u,...i})),{successLabel:`Loaded`})})},li={command:`exports`,describe:`Operations for casb.exports`,builder:e=>e.command(oi).command(ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ui(e){return e.usage(`$0 zero-trust casb finding-types get <finding-type-id>
233
241
 
234
- Retrieves a paginated list of commands issued to devices under the specified account, optionally filtered by time range, device, or other parameters`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`}).option(`device-id`,{type:`string`,description:`Unique identifier for a device.`}).option(`user-email`,{type:`string`,description:`Email tied to the device.`}).option(`command-type`,{type:`string`,description:`Optionally filter executed commands by command type.`,choices:[`pcap`,`speed-test`,`warp-diag`]}).option(`status`,{type:`string`,description:`Optionally filter executed commands by status.`,choices:[`PENDING_EXEC`,`PENDING_UPLOAD`,`SUCCESS`,`FAILED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fi={command:`list`,describe:`List account commands`,builder:y(di),handler:async n=>l({command:`zero-trust dex commands list`,classification:{safeFlags:[`command-type`,`status`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],from:n.from,to:n.to,device_id:n[`device-id`],user_email:n[`user-email`],command_type:n[`command-type`],status:n.status};if(n.dryRun){s({command:`cf zero-trust dex commands list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.commands.list({account_id:u,...i})),{successLabel:`Loaded`})})};function pi(e){return e.usage(`$0 zero-trust dex commands quota get
242
+ 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 di={command:`get <finding-type-id>`,describe:`Get finding by ID`,builder:ui,handler:async n=>l({command:`zero-trust casb finding-types get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb finding-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/finding_types/${n[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(n[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(n[`finding-type-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.findingTypes.get({account_id:l,finding_type_id:n[`finding-type-id`]})),{successLabel:`Loaded`})})};function fi(e){return e.usage(`$0 zero-trust casb finding-types list
235
243
 
236
- Retrieves the current quota usage and limits for device commands within a specific account, including the time when the quota will reset`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mi={command:`get`,describe:`Returns account commands usage, quota, and reset time`,builder:pi,handler:async n=>l({command:`zero-trust dex commands quota get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex commands quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands/quota`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.commands.quota.get({account_id:l})),{successLabel:`Loaded`})})},hi={command:`quota`,describe:`Operations for dex.commands.quota`,builder:e=>e.command(mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gi(e){return e.usage(`$0 zero-trust dex commands results get <filename>
244
+ List all available finding types with pagination support.`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`vendors`,{type:`string`,description:`Filter finding types by vendor. Supports multiple comma-separated values. Each value may be either the vendor enum (GOOGLE_WORKSPACE) or the friendly name returned by the read routes (Google Workspace).`}).option(`search`,{type:`string`,description:`Filter finding types by name or ID (case-insensitive substring match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pi={command:`list`,describe:`List all finding types`,builder:y(fi),handler:async n=>l({command:`zero-trust casb finding-types list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],vendors:n.vendors,search:n.search};if(n.dryRun){s({command:`cf zero-trust casb finding-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/finding_types`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.findingTypes.list({account_id:u,...i})),{successLabel:`Loaded`})})};function mi(e){return e.usage("$0 zero-trust casb finding-types remediation-types list\n\nList all remediation types for a given finding type. This endpoint supports both cursor and offset pagination. Note that `cursor` and `page` are mutually exclusive.").option(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hi={command:`list`,describe:`List remediation types for a finding type`,builder:mi,handler:async n=>l({command:`zero-trust casb finding-types remediation-types list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={integration_id:n[`integration-id`],cursor:n.cursor,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust casb finding-types remediation-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/finding_types/${n[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(n[`finding-type-id`]))}/remediation_types`,pathParams:{"finding-type-id":String(n[`finding-type-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.findingTypes.remediationTypes.list({account_id:u,finding_type_id:n[`finding-type-id`],...i})),{successLabel:`Loaded`})})},gi={command:`remediation-types`,describe:`Operations for casb.finding-types.remediation-types`,builder:e=>e.command(hi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_i={command:`finding-types`,describe:`Operations for casb.finding-types`,builder:e=>e.command(di).command(pi).command(gi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vi(e){return e.usage(`$0 zero-trust casb findings export
237
245
 
238
- Downloads artifacts for an executed command. Bulk downloads are not supported`).positional(`filename`,{type:`string`,description:"The name of the file to be downloaded, including the `.zip` extension.",demandOption:!0}).option(`command-id`,{type:`string`,description:`Unique identifier for command.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const _i={command:`get <filename>`,describe:`Download command output file`,builder:gi,handler:async n=>l({command:`zero-trust dex commands results get`,classification:{safeFlags:[`dry-run`,`text`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex commands results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands/${n[`command-id`]==null?`<command-id>`:encodeURIComponent(String(n[`command-id`]))}/downloads/${n.filename==null?`<filename>`:encodeURIComponent(String(n.filename))}`,pathParams:{"command-id":String(n[`command-id`]??``),filename:String(n.filename??``)},bodyKind:`none`});return}await a(n);let i=n.local?e:await r();n.accountId=i;let o=await c(`Loading`,async()=>te(`/accounts/${i}/dex/commands/${encodeURIComponent(String(n[`command-id`]))}/downloads/${encodeURIComponent(String(n.filename))}`,{method:`GET`,local:n.local===!0,persistTo:n.persistTo}));ee(n.text===!0?o.toString(`utf-8`):o)})},vi={command:`results`,describe:`Operations for dex.commands.results`,builder:e=>e.command(_i).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yi={command:`commands`,describe:`Operations for dex.commands`,builder:e=>e.command(si).command(fi).command(ui).command(hi).command(vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bi(e){return e.usage(`$0 zero-trust dex devices aggregates live get
246
+ Creates a CSV export for findings and accepts optional filters in the payload.`).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see active items.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`severities`,{type:`string`,array:!0,description:`Filter by severity levels.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for findings export jobs.`})}const yi={command:`export`,describe:`Create new findings export request`,builder:vi,handler:async n=>l({command:`zero-trust casb findings export`,classification:{safeFlags:[`ignored`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/export`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ignored:n.ignored,integration_id:n[`integration-id`],max_affliction_date:m(n[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:m(n[`min-affliction-date`],`min-affliction-date`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`),severities:n.severities,vendors:n.vendors}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Loading`,async()=>i.zeroTrust.casb.findings.export({...e,account_id:l})),{successLabel:`Loaded`});return}let u=p({ignored:n.ignored,integration_id:n[`integration-id`],max_affliction_date:m(n[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:m(n[`min-affliction-date`],`min-affliction-date`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`),severities:n.severities,vendors:n.vendors});o(await c(`Loading`,async()=>i.zeroTrust.casb.findings.export({...u,account_id:l})),{successLabel:`Loaded`})})};function bi(e){return e.usage(`$0 zero-trust casb findings get <finding-id>
239
247
 
240
- Get details for live (up to 60 minutes) devices using WARP.`).option(`since-minutes`,{type:`number`,description:`Number of minutes before current time.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xi={command:`get`,describe:`Get live aggregate device details by dimension`,builder:bi,handler:async n=>l({command:`zero-trust dex devices aggregates live get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={since_minutes:n[`since-minutes`]};if(n.dryRun){s({command:`cf zero-trust dex devices aggregates live get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/fleet-status/live`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.aggregates.live.get({account_id:u,...i})),{successLabel:`Loaded`})})},Si={command:`live`,describe:`Operations for dex.devices.aggregates.live`,builder:e=>e.command(xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ci(e){return e.usage(`$0 zero-trust dex devices aggregates over-time get
248
+ Gets a security Finding that has been identified as being problematic.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xi={command:`get <finding-id>`,describe:`Get a posture finding`,builder:bi,handler:async n=>l({command:`zero-trust casb findings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}`,pathParams:{"finding-id":String(n[`finding-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.findings.get({account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Loaded`})})};function Si(e){return e.usage(`$0 zero-trust casb findings ignore
241
249
 
242
- Get aggregate details for devices using WARP, up to 7 days.`).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Cloudflare colo airport code.`}).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wi={command:`get`,describe:`Get over time aggregate details for devices by dimension`,builder:Ci,handler:async n=>l({command:`zero-trust dex devices aggregates over-time get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={to:n.to,from:n.from,colo:n.colo,device_id:n[`device-id`]};if(n.dryRun){s({command:`cf zero-trust dex devices aggregates over-time get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/fleet-status/over-time`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.aggregates.overTime.get({account_id:u,...i})),{successLabel:`Loaded`})})},Ti={command:`over-time`,describe:`Operations for dex.devices.aggregates.over-time`,builder:e=>e.command(wi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ei={command:`aggregates`,describe:`Operations for dex.devices.aggregates`,builder:e=>e.command(Si).command(Ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Di(e){return e.usage(`$0 zero-trust dex devices get <device-id>
250
+ Given a list of findings, mark as ignored. Does nothing if Finding is already ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const Ci={command:`ignore`,describe:`Mark a finding as ignored`,builder:Si,handler:async n=>l({command:`zero-trust casb findings ignore`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings ignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/ignore`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({checks:n.checks}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.ignore({body:e,account_id:l})),{successLabel:`Created`});return}if(n.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=p({checks:n.checks});o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.ignore({body:u,account_id:l})),{successLabel:`Created`})})};function wi(e){return e.usage(`$0 zero-trust casb findings instances archive <finding-id>
243
251
 
244
- Get the latest status of a device given device_id from the device_state table.`).positional(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`since-minutes`,{type:`number`,description:`Number of minutes before current time.`,demandOption:!0}).option(`time-now`,{type:`string`,description:`Current time in ISO format.`}).option(`colo`,{type:`string`,description:`List of data centers to filter results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oi={command:`get <device-id>`,describe:`Get the latest status of a device.`,builder:Di,handler:async n=>l({command:`zero-trust dex devices get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={since_minutes:n[`since-minutes`],time_now:n[`time-now`],colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}/fleet-status/live`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.get({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})};function ki(e){return e.usage(`$0 zero-trust dex devices list
252
+ Archive one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Ti={command:`archive <finding-id>`,describe:`Archive a finding`,builder:wi,handler:async n=>l({command:`zero-trust casb findings instances archive`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings instances archive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}/instances/archive`,pathParams:{"finding-id":String(n[`finding-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({check_instances:n[`check-instances`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.instances.archive({body:e,account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`});return}if(n[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=p({check_instances:n[`check-instances`]});o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.instances.archive({body:u,account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`})})};function Ei(e){return e.usage("$0 zero-trust casb findings instances export <finding-namespace-id>\n\nCreates a CSV export for Finding instances and accepts optional filters in the payload. Identify the finding as `<integration_id>-<finding_type_id>`: join the `integration.id` and `finding.id` of the finding (from the List posture findings response) with a hyphen.").positional(`finding-namespace-id`,{type:`string`,description:"Identifies the finding whose instances to export, in the form `<integration_id>-<finding_type_id>`. Take `integration.id` and `finding.id` from the finding in the List posture findings response and join them with a hyphen.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Filter for archived status.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for finding instance exports.`})}const Di={command:`export <finding-namespace-id>`,describe:`Create a finding instances export`,builder:Ei,handler:async n=>l({command:`zero-trust casb findings instances export`,classification:{safeFlags:[`archived`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings instances export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-namespace-id`]==null?`<finding-namespace-id>`:encodeURIComponent(String(n[`finding-namespace-id`]))}/instances/export`,pathParams:{"finding-namespace-id":String(n[`finding-namespace-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({archived:n.archived,max_affliction_date:m(n[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:m(n[`min-affliction-date`],`min-affliction-date`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`)}):d(n.body)});return}let l=await a(n),h=n.local?e:await r();if(n.accountId=h,n.body){let e=d(n.body);o(await c(`Loading`,async()=>i(l,`POST`,`/accounts/${h}/data-security/posture/findings/${encodeURIComponent(String(n[`finding-namespace-id`]))}/instances/export`,{body:e})),{successLabel:`Loaded`});return}let g={};n.archived!==void 0&&u(g,[`archived`],n.archived),n[`max-affliction-date`]!==void 0&&u(g,[`max_affliction_date`],m(n[`max-affliction-date`],`max-affliction-date`,`text`)),n[`min-affliction-date`]!==void 0&&u(g,[`min_affliction_date`],m(n[`min-affliction-date`],`min-affliction-date`,`text`)),n.orders!==void 0&&u(g,[`orders`],f(n.orders,`orders`)),n.search!==void 0&&u(g,[`search`],m(n.search,`search`,`text`)),o(await c(`Loading`,async()=>i(l,`POST`,`/accounts/${h}/data-security/posture/findings/${encodeURIComponent(String(n[`finding-namespace-id`]))}/instances/export`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Loaded`})})};function Oi(e){return e.usage(`$0 zero-trust casb findings instances get <instance-id>
245
253
 
246
- List details of devices using WARP.`).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`sort-by`,{type:`string`,description:`Dimension to sort results by.`,choices:[`colo`,`device_id`,`mode`,`platform`,`status`,`timestamp`,`version`]}).option(`colo`,{type:`string`,description:`Cloudflare colo airport code.`}).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`}).option(`status`,{type:`string`,description:`Network status.`}).option(`platform`,{type:`string`,description:`Operating system.`}).option(`version`,{type:`string`,description:`WARP client version.`}).option(`source`,{type:`string`,description:"Source:\n * `hourly` - device details aggregated hourly, up to 7 days prior\n * `last_seen` - device details, up to 60 minutes prior. Time windows exceeding 60 minutes will be rejected from June 1st, 2026. Please use 'hourly' or 'raw' instead for longer time ranges.\n * `raw` - device details, up to 7 days prior",choices:[`last_seen`,`hourly`,`raw`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ai={command:`list`,describe:`List details of devices using WARP.`,builder:y(ki),handler:async n=>l({command:`zero-trust dex devices list`,classification:{safeFlags:[`sort-by`,`source`,`dry-run`]}},n,async()=>{let i={to:n.to,from:n.from,page:n.page,per_page:n[`per-page`],sort_by:n[`sort-by`],colo:n.colo,device_id:n[`device-id`],status:n.status,platform:n.platform,version:n.version,source:n.source};if(n.dryRun){s({command:`cf zero-trust dex devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/fleet-status/devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.list({account_id:u,...i})),{successLabel:`Loaded`})})};function ji(e){return e.usage(`$0 zero-trust dex devices over-time get <device-id>
254
+ Gets a security Finding instance by id.`).positional(`instance-id`,{type:`string`,description:`A uuid ID identifying this Finding instance.`,demandOption:!0}).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ki={command:`get <instance-id>`,describe:`Get a finding instance using an instance ID`,builder:Oi,handler:async n=>l({command:`zero-trust casb findings instances get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}/instances/${n[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(n[`instance-id`]))}`,pathParams:{"finding-id":String(n[`finding-id`]??``),"instance-id":String(n[`instance-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.findings.instances.get({account_id:l,finding_id:n[`finding-id`],instance_id:n[`instance-id`]})),{successLabel:`Loaded`})})};function Ai(e){return e.usage(`$0 zero-trust casb findings instances list
247
255
 
248
- Get time-bucketed status metrics for a specific device.`).positional(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`List of data centers to filter results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mi={command:`get <device-id>`,describe:`Get the status over time for a device`,builder:y(ji),handler:async n=>l({command:`zero-trust dex devices over-time get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={from:n.from,to:n.to,interval:n.interval,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex devices over-time get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}/fleet-status/over-time`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.overTime.get({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})},Ni={command:`over-time`,describe:`Operations for dex.devices.over-time`,builder:e=>e.command(Mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pi={command:`devices`,describe:`Operations for dex.devices`,builder:e=>e.command(Oi).command(Ai).command(Ei).command(Ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fi(e){return e.usage(`$0 zero-trust dex isps list
256
+ Lists all security finding instances for a given security finding.`).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Archived`}).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering the Finding's instances.
257
+ When ordering by 'remediation.status', only the most recent non-stale remediation job is considered. Stale jobs (created before the instance's affliction_date) are treated as having no status for ordering purposes.`,choices:[`affliction_date`,`asset.name`,`remediation.status`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`remediation-statuses`,{type:`string`,description:`Filter finding instances by most recent remediation job status. Supports multiple comma-separated values.
258
+ Use 'none' to filter instances with no remediation jobs or instances where the most recent job is stale.
259
+ Note: Stale jobs (created before the instance's affliction_date) are ignored for filtering purposes, but are still included in the 'remediations' array with stale=true.`}).option(`finding-instance-ids`,{type:`string`,description:`Filter finding instances by an array of finding instance IDs. Supports multiple comma-separated values.`}).option(`asset-ids`,{type:`string`,description:`Filter finding instances by an array of asset IDs. Supports multiple comma-separated values.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ji={command:`list`,describe:`List instances of a finding`,builder:y(Ai),handler:async n=>l({command:`zero-trust casb findings instances list`,classification:{safeFlags:[`archived`,`direction`,`order`,`dry-run`]}},n,async()=>{let i={archived:n.archived,cursor:n.cursor,direction:n.direction,max_affliction_date:n[`max-affliction-date`],min_affliction_date:n[`min-affliction-date`],order:n.order,page:n.page,per_page:n[`per-page`],search:n.search,remediation_statuses:n[`remediation-statuses`],finding_instance_ids:n[`finding-instance-ids`],asset_ids:n[`asset-ids`]};if(n.dryRun){s({command:`cf zero-trust casb findings instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}/instances`,pathParams:{"finding-id":String(n[`finding-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.findings.instances.list({account_id:u,finding_id:n[`finding-id`],...i})),{successLabel:`Loaded`})})};function Mi(e){return e.usage(`$0 zero-trust casb findings instances unarchive <finding-id>
249
260
 
250
- List ISP information observed for a specific device during traceroute tests.`).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results. Mutually exclusive with cursor.`}).option(`per-page`,{type:`number`,description:`Number of items per page`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Cursor for cursor-based pagination. Mutually exclusive with page.`}).option(`sort-by`,{type:`string`,description:`The field to sort results by.`,choices:[`time_start`]}).option(`sort-order`,{type:`string`,description:`The order to sort results.`,choices:[`ASC`,`DESC`]}).option(`from`,{type:`string`,description:`Start time for the query in ISO 8601 format.`}).option(`to`,{type:`string`,description:`End time for the query in ISO 8601 format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ii={command:`list`,describe:`List device ISPs`,builder:y(Fi),handler:async n=>l({command:`zero-trust dex isps list`,classification:{safeFlags:[`sort-by`,`sort-order`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],cursor:n.cursor,sort_by:n[`sort-by`],sort_order:n[`sort-order`],from:n.from,to:n.to};if(n.dryRun){s({command:`cf zero-trust dex isps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}/isps`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.isps.list({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})},Li={command:`isps`,describe:`Operations for dex.isps`,builder:e=>e.command(Ii).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ri(e){return e.usage(`$0 zero-trust dex overview tests list
261
+ Remove the archive marking from one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Ni={command:`unarchive <finding-id>`,describe:`Remove the archive marking from a finding instance`,builder:Mi,handler:async n=>l({command:`zero-trust casb findings instances unarchive`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings instances unarchive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}/instances/unarchive`,pathParams:{"finding-id":String(n[`finding-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({check_instances:n[`check-instances`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.instances.unarchive({body:e,account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`});return}if(n[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=p({check_instances:n[`check-instances`]});o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.instances.unarchive({body:u,account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`})})},Pi={command:`instances`,describe:`Operations for casb.findings.instances`,builder:e=>e.command(Ti).command(Di).command(ki).command(ji).command(Ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fi(e){return e.usage(`$0 zero-trust casb findings list
251
262
 
252
- List DEX tests with overview metrics.`).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`registration-id`,{type:`string`,description:`Optionally filter results to a specific device registration. Must be used in combination with a single deviceId.`}).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`kind`,{type:`string`,description:`Filter by test type.`,choices:[`http`,`traceroute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zi={command:`list`,describe:`List DEX test analytics`,builder:y(Ri),handler:async n=>l({command:`zero-trust dex overview tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},n,async()=>{let i={colo:n.colo,testName:n[`test-name`],deviceId:n[`device-id`],registration_id:n[`registration-id`],page:n.page,per_page:n[`per-page`],kind:n.kind};if(n.dryRun){s({command:`cf zero-trust dex overview tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/tests/overview`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.overview.tests.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Bi(e){return e.usage(`$0 zero-trust dex overview tests unique-devices get
263
+ List all security findings that have been identified as being problematic. This will return a list of findings regardless if they have been ignored or not.`).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see "active" items`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`observation`,{type:`string`,description:`Filter by observation type of the finding`,choices:[`Activity`,`Insight`,`Issue`]}).option(`order`,{type:`string`,description:`Which field to use when ordering the findings.`,choices:[`finding.name`,`instance_count`,`integration.name`,`latest_affliction_date`,`severity`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`product`,{type:`string`,description:`Filter by product category of the finding`,choices:[`Cloud`,`Saas`]}).option(`search`,{type:`string`,description:`A search term.`}).option(`severity`,{type:`string`,description:`Filter by severity`,choices:[`Critical`,`High`,`Medium`,`Low`]}).option(`type`,{type:`string`,description:`Filter by type of the finding`,choices:[`Content`,`Posture`]}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`finding-type-ids`,{type:`string`,description:`A comma separated list of UUIDs identifying the finding type(s).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ii={command:`list`,describe:`List posture findings`,builder:y(Fi),handler:async n=>l({command:`zero-trust casb findings list`,classification:{safeFlags:[`direction`,`ignored`,`observation`,`order`,`product`,`severity`,`type`,`vendor`,`dry-run`]}},n,async()=>{let i={cursor:n.cursor,direction:n.direction,ignored:n.ignored,integration_id:n[`integration-id`],max_affliction_date:n[`max-affliction-date`],min_affliction_date:n[`min-affliction-date`],observation:n.observation,order:n.order,page:n.page,per_page:n[`per-page`],product:n.product,search:n.search,severity:n.severity,type:n.type,vendor:n.vendor,finding_type_ids:n[`finding-type-ids`]};if(n.dryRun){s({command:`cf zero-trust casb findings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.findings.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Li(e){return e.usage(`$0 zero-trust casb findings reset-severity <finding-id>
253
264
 
254
- Returns unique count of devices that have run synthetic application monitoring tests in the past 7 days.`).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vi={command:`get`,describe:`Get count of devices targeted`,builder:Bi,handler:async n=>l({command:`zero-trust dex overview tests unique-devices get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={testName:n[`test-name`],deviceId:n[`device-id`]};if(n.dryRun){s({command:`cf zero-trust dex overview tests unique-devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/tests/unique-devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.overview.tests.uniqueDevices.get({account_id:u,...i})),{successLabel:`Loaded`})})},Hi={command:`unique-devices`,describe:`Operations for dex.overview.tests.unique-devices`,builder:e=>e.command(Vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ui={command:`tests`,describe:`Operations for dex.overview.tests`,builder:e=>e.command(zi).command(Hi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wi={command:`overview`,describe:`Operations for dex.overview`,builder:e=>e.command(Ui).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gi(e){return e.usage(`$0 zero-trust dex rules create
265
+ If a Finding's severity has been changed, reset it back to default value. Does nothing if no override exists.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ri={command:`reset-severity <finding-id>`,describe:`Reset severity for a finding back to the default`,builder:Li,handler:async n=>l({command:`zero-trust casb findings reset-severity`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings reset-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}/reset_finding_severity`,pathParams:{"finding-id":String(n[`finding-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.resetSeverity({account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`})})};function zi(e){return e.usage(`$0 zero-trust casb findings tune-severity <finding-id>
255
266
 
256
- 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 Ki={command:`create`,describe:`Create a DEX Rule`,builder:Gi,handler:async n=>l({command:`zero-trust dex rules create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dex.rules.create({...e,account_id:l})),{successLabel:`Created`});return}n.match===void 0&&(n.match=await g(`match`,`The wirefilter expression to match.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the Rule.`));let u=p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dex.rules.create({...u,account_id:l})),{successLabel:`Created`})})};function qi(e){return e.usage(`$0 zero-trust dex rules delete <rule-id>
267
+ Update the severity of a Finding. This will update the \`severity_override\` field on the Finding payload with the new severity value.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`new-severity`,{type:`number`,description:`The numeric severity value to apply to the finding.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a finding's severity.`})}const Bi={command:`tune-severity <finding-id>`,describe:`Update the severity for a finding`,builder:zi,handler:async n=>l({command:`zero-trust casb findings tune-severity`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings tune-severity`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/${n[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(n[`finding-id`]))}/tune_finding_severity`,pathParams:{"finding-id":String(n[`finding-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({new_severity:n[`new-severity`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.tuneSeverity({...e,account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`});return}if(n[`new-severity`]===void 0)throw Error(`--new-severity is required (or pass --body with this field set).`);let u=p({new_severity:n[`new-severity`]});o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.tuneSeverity({...u,account_id:l,finding_id:n[`finding-id`]})),{successLabel:`Created`})})};function Vi(e){return e.usage(`$0 zero-trust casb findings unignore
257
268
 
258
- 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 Ji={command:`delete <rule-id>`,describe:`Delete a DEX Rule`,builder:qi,handler:async n=>l({command:`zero-trust dex rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
259
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dex.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function Yi(e){return e.usage(`$0 zero-trust dex rules get <rule-id>
269
+ Ability to un-ignore a Finding if it's previously been ignored. Does nothing if the Finding is not ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on findings.`})}const Hi={command:`unignore`,describe:`Remove ignore marker from a finding`,builder:Vi,handler:async n=>l({command:`zero-trust casb findings unignore`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb findings unignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/findings/unignore`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({checks:n.checks}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.unignore({body:e,account_id:l})),{successLabel:`Created`});return}if(n.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=p({checks:n.checks});o(await c(`Creating`,async()=>i.zeroTrust.casb.findings.unignore({body:u,account_id:l})),{successLabel:`Created`})})},Ui={command:`findings`,describe:`Operations for casb.findings`,builder:e=>e.command(yi).command(xi).command(Ci).command(Ii).command(Ri).command(Bi).command(Hi).command(Pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wi(e){return e.usage(`$0 zero-trust casb integrations create
260
270
 
261
- 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 Xi={command:`get <rule-id>`,describe:`Get DEX Rule`,builder:Yi,handler:async n=>l({command:`zero-trust dex rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function Zi(e){return e.usage(`$0 zero-trust dex rules list
271
+ 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",choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`]}).option(`auth-method`,{type:`string`,description:`Authentication method slug (uses default if omitted).`}).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 (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 Gi={command:`create`,describe:`Create integration`,builder:Wi,handler:async n=>l({command:`zero-trust casb integrations create`,classification:{safeFlags:[`application`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({application:m(n.application,`application`,`text`),auth_method:m(n[`auth-method`],`auth-method`,`text`),dlp_profiles:n[`dlp-profiles`],name:m(n.name,`name`,`text`),permissions:n.permissions,use_cases:n[`use-cases`]}):d(n.body)});return}let l=await a(n),f=n.local?e:await r();if(n.accountId=f,n.file){let e=h(n.file);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${f}/one/integrations`,{body:e,headers:{"Content-Type":`text/plain;charset=UTF-8`}})),{successLabel:`Created`});return}if(n.body){let e=d(n.body);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${f}/one/integrations`,{body:e})),{successLabel:`Created`});return}n.application===void 0&&(n.application=await _(`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",[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`])),n.name===void 0&&(n.name=await g(`name`,`Name of the integration.`));let v={};n.application!==void 0&&u(v,[`application`],m(n.application,`application`,`text`)),n[`auth-method`]!==void 0&&u(v,[`auth_method`],m(n[`auth-method`],`auth-method`,`text`)),n[`dlp-profiles`]!==void 0&&u(v,[`dlp_profiles`],n[`dlp-profiles`]),n.name!==void 0&&u(v,[`name`],m(n.name,`name`,`text`)),n.permissions!==void 0&&u(v,[`permissions`],n.permissions),n[`use-cases`]!==void 0&&u(v,[`use_cases`],n[`use-cases`]),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${f}/one/integrations`,{body:Object.keys(v).length>0?v:void 0})),{successLabel:`Created`})})};function Ki(e){return e.usage(`$0 zero-trust casb integrations delete <id>
262
272
 
263
- List DEX Rules.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`sort-order`,{type:`string`,description:`Sort direction for sort_by property.`,choices:[`ASC`,`DESC`]}).option(`sort-by`,{type:`string`,description:`Which property to sort results by.`,choices:[`name`,`created_at`,`updated_at`]}).option(`name`,{type:`string`,description:`Filter results by rule name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qi={command:`list`,describe:`List DEX Rules`,builder:y(Zi),handler:async n=>l({command:`zero-trust dex rules list`,classification:{safeFlags:[`sort-order`,`sort-by`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],sort_order:n[`sort-order`],sort_by:n[`sort-by`],name:n.name};if(n.dryRun){s({command:`cf zero-trust dex rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.rules.list({account_id:u,...i})),{successLabel:`Loaded`})})};function $i(e){return e.usage(`$0 zero-trust dex rules update <rule-id>
273
+ 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 qi={command:`delete <id>`,describe:`Delete integration`,builder:Ki,handler:async n=>l({command:`zero-trust casb integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
274
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.casb.integrations.delete({account_id:l,id:n.id})),{successLabel:`Deleted`})})};function Ji(e){return e.usage(`$0 zero-trust casb integrations get <id>
264
275
 
265
- Update a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,demandOption:!0}).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 ea={command:`update <rule-id>`,describe:`Update a DEX Rule`,builder:$i,handler:async n=>l({command:`zero-trust dex rules update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dex.rules.update({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dex.rules.update({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},ta={command:`rules`,describe:`Operations for dex.rules`,builder:e=>e.command(Ki).command(Ji).command(Xi).command(Qi).command(ea).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function na(e){return e.usage(`$0 zero-trust dex test-results http get <test-id>
276
+ 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 Yi={command:`get <id>`,describe:`Get integration details`,builder:Ji,handler:async n=>l({command:`zero-trust casb integrations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.integrations.get({account_id:l,id:n.id})),{successLabel:`Loaded`})})};function Xi(e){return e.usage(`$0 zero-trust casb integrations list
266
277
 
267
- Get test details and aggregate performance metrics for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ra={command:`get <test-id>`,describe:`Get details and aggregate metrics for an http test`,builder:y(na),handler:async n=>l({command:`zero-trust dex test-results http get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,interval:n.interval,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results http get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/http-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.http.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})};function ia(e){return e.usage(`$0 zero-trust dex test-results http percentiles get <test-id>
278
+ Returns a paginated list of integrations for the account.`).option(`application`,{type:`string`,description:`Filter by application/vendor (e.g., GOOGLE_WORKSPACE, MICROSOFT_INTERNAL).`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-enabled`,{type:`boolean`,description:`Filter by DLP enabled status (true/false).`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`application`,`created`,`name`,`status`]}).option(`page`,{type:`number`,description:`Page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results per page.`}).option(`search`,{type:`string`,description:`Search integrations by name or application.`}).option(`status`,{type:`string`,description:`Filter by integration status.`,choices:[`Healthy`,`Initializing`,`Offline`,`Unhealthy`]}).option(`use-cases`,{type:`string`,description:`Filter by enabled use cases (e.g., casb, ces). Matches integrations enrolled in any of the specified values. Can be specified multiple times.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zi={command:`list`,describe:`List integrations`,builder:y(Xi),handler:async n=>l({command:`zero-trust casb integrations list`,classification:{safeFlags:[`direction`,`dlp-enabled`,`order`,`status`,`dry-run`]}},n,async()=>{let i={application:n.application,direction:n.direction,dlp_enabled:n[`dlp-enabled`],order:n.order,page:n.page,page_size:n[`page-size`],search:n.search,status:n.status,use_cases:n[`use-cases`]};if(n.dryRun){s({command:`cf zero-trust casb integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.integrations.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Qi(e){return e.usage(`$0 zero-trust casb integrations pause <id>
268
279
 
269
- Get percentiles for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const aa={command:`get <test-id>`,describe:`Get percentiles for an http test`,builder:ia,handler:async n=>l({command:`zero-trust dex test-results http percentiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results http percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/http-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}/percentiles`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.http.percentiles.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})},oa={command:`percentiles`,describe:`Operations for dex.test-results.http.percentiles`,builder:e=>e.command(aa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},sa={command:`http`,describe:`Operations for dex.test-results.http`,builder:e=>e.command(ra).command(oa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ca(e){return e.usage(`$0 zero-trust dex test-results traceroute get <test-id>
280
+ Pauses an integration, stopping all crawlers.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $i={command:`pause <id>`,describe:`Pause integration`,builder:Qi,handler:async n=>l({command:`zero-trust casb integrations pause`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations pause`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}/pause`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.casb.integrations.pause({account_id:l,id:n.id})),{successLabel:`Created`})})};function ea(e){return e.usage(`$0 zero-trust casb integrations resume <id>
270
281
 
271
- Get test details and aggregate performance metrics for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const la={command:`get <test-id>`,describe:`Get details and aggregate metrics for a traceroute test`,builder:y(ca),handler:async n=>l({command:`zero-trust dex test-results traceroute get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,interval:n.interval,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results traceroute get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.traceroute.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})};function ua(e){return e.usage(`$0 zero-trust dex test-results traceroute network-path get <test-result-id>
282
+ Resumes a paused integration, restarting crawlers.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ta={command:`resume <id>`,describe:`Resume integration`,builder:ea,handler:async n=>l({command:`zero-trust casb integrations resume`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations resume`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}/resume`,pathParams:{id:String(n.id??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.casb.integrations.resume({account_id:l,id:n.id})),{successLabel:`Created`})})};function na(e){return e.usage(`$0 zero-trust casb integrations update <id>
272
283
 
273
- Get a breakdown of hops and performance metrics for a specific traceroute test run`).positional(`test-result-id`,{type:`string`,description:`Unique identifier for a specific traceroute test.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const da={command:`get <test-result-id>`,describe:`Get details for a specific traceroute test run`,builder:ua,handler:async n=>l({command:`zero-trust dex test-results traceroute network-path get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex test-results traceroute network-path get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-test-results/${n[`test-result-id`]==null?`<test-result-id>`:encodeURIComponent(String(n[`test-result-id`]))}/network-path`,pathParams:{"test-result-id":String(n[`test-result-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.testResults.traceroute.networkPath.get({account_id:l,test_result_id:n[`test-result-id`]})),{successLabel:`Loaded`})})},fa={command:`network-path`,describe:`Operations for dex.test-results.traceroute.network-path`,builder:e=>e.command(da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pa(e){return e.usage(`$0 zero-trust dex test-results traceroute percentiles get <test-id>
284
+ Updates an integration's name, permissions, DLP profiles, use cases, or credentials.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`dlp-profiles`,{type:`string`,array:!0,description:`List of DLP profile IDs to associate with the integration.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes granted to the integration.`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll (e.g., ['casb', 'ces', 'auto_remediation']).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Serializer for v2 integration PATCH requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ra={command:`update <id>`,describe:`Update integration`,builder:na,handler:async n=>l({command:`zero-trust casb integrations update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/one/integrations/${n.id==null?`<id>`:encodeURIComponent(String(n.id))}`,pathParams:{id:String(n.id??``)},bodyKind:`json`,body:n.body===void 0?p({dlp_profiles:n[`dlp-profiles`],name:m(n.name,`name`,`text`),permissions:n.permissions,use_cases:n[`use-cases`]}):d(n.body)});return}let l=await a(n),f=n.local?e:await r();if(n.accountId=f,n.file){let e=h(n.file);o(await c(`Updating`,async()=>i(l,`PATCH`,`/accounts/${f}/one/integrations/${encodeURIComponent(String(n.id))}`,{body:e,headers:{"Content-Type":`text/plain;charset=UTF-8`}})),{successLabel:`Updated`});return}if(n.body){let e=d(n.body);o(await c(`Updating`,async()=>i(l,`PATCH`,`/accounts/${f}/one/integrations/${encodeURIComponent(String(n.id))}`,{body:e})),{successLabel:`Updated`});return}let g={};n[`dlp-profiles`]!==void 0&&u(g,[`dlp_profiles`],n[`dlp-profiles`]),n.name!==void 0&&u(g,[`name`],m(n.name,`name`,`text`)),n.permissions!==void 0&&u(g,[`permissions`],n.permissions),n[`use-cases`]!==void 0&&u(g,[`use_cases`],n[`use-cases`]),o(await c(`Updating`,async()=>i(l,`PATCH`,`/accounts/${f}/one/integrations/${encodeURIComponent(String(n.id))}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`})})},ia={command:`integrations`,describe:`Operations for casb.integrations`,builder:e=>e.command(Gi).command(qi).command(Yi).command(Zi).command($i).command(ta).command(ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function aa(e){return e.usage(`$0 zero-trust casb policies create
274
285
 
275
- Get percentiles for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ma={command:`get <test-id>`,describe:`Get percentiles for a traceroute test`,builder:pa,handler:async n=>l({command:`zero-trust dex test-results traceroute percentiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results traceroute percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}/percentiles`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.traceroute.percentiles.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})},ha={command:`percentiles`,describe:`Operations for dex.test-results.traceroute.percentiles`,builder:e=>e.command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ga={command:`traceroute`,describe:`Operations for dex.test-results.traceroute`,builder:e=>e.command(la).command(fa).command(ha).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_a={command:`test-results`,describe:`Operations for dex.test-results`,builder:e=>e.command(sa).command(ga).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function va(e){return e.usage(`$0 zero-trust dex tests create
286
+ 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(`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 oa={command:`create`,describe:`Create a new policy configuration`,builder:aa,handler:async n=>l({command:`zero-trust casb policies create`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({applies_to_all_integrations:n[`applies-to-all-integrations`],description:m(n.description,`description`,`text`),display_name:m(n[`display-name`],`display-name`,`text`),enabled:n.enabled,finding_type_id:m(n[`finding-type-id`],`finding-type-id`,`text`),integration_ids:n[`integration-ids`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.policies.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(n[`display-name`]===void 0&&(n[`display-name`]=await g(`display-name`,`Display name for the policy configuration.`)),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n[`finding-type-id`]===void 0&&(n[`finding-type-id`]=await g(`finding-type-id`,`The finding type this policy is associated with. All remediation actions must match this finding type.`));let u=p({applies_to_all_integrations:n[`applies-to-all-integrations`],description:m(n.description,`description`,`text`),display_name:m(n[`display-name`],`display-name`,`text`),enabled:n.enabled,finding_type_id:m(n[`finding-type-id`],`finding-type-id`,`text`),integration_ids:n[`integration-ids`]});o(await c(`Creating`,async()=>i.zeroTrust.casb.policies.create({...u,account_id:l})),{successLabel:`Created`})})};function sa(e){return e.usage(`$0 zero-trust casb policies delete <policy-id>
276
287
 
277
- 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`]}).option(`data-method`,{type:`string`,description:`The HTTP request method type.`,choices:[`GET`]}).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(`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 ya={command:`create`,describe:`Create Device DEX test`,builder:va,handler:async n=>l({command:`zero-trust dex tests create`,classification:{safeFlags:[`data-kind`,`data-method`,`enabled`,`targeted`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dex.tests.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`data-host`]===void 0&&(n[`data-host`]=await g(`data-host`,`The desired endpoint to test.`)),n[`data-kind`]===void 0&&(n[`data-kind`]=await _(`data-kind`,`The type of test.`,[`http`,`traceroute`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.interval===void 0&&(n.interval=await g(`interval`,`How often the test will run.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the DEX test. Must be unique.`));let u=p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted});o(await c(`Creating`,async()=>i.zeroTrust.dex.tests.create({body:u,account_id:l})),{successLabel:`Created`})})};function ba(e){return e.usage(`$0 zero-trust dex tests delete <dex-test-id>
288
+ 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 ca={command:`delete <policy-id>`,describe:`Delete a policy configuration`,builder:sa,handler:async n=>l({command:`zero-trust casb policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
289
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.casb.policies.delete({account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Deleted`})})};function la(e){return e.usage(`$0 zero-trust casb policies get <policy-id>
278
290
 
279
- 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 xa={command:`delete <dex-test-id>`,describe:`Delete Device DEX test`,builder:ba,handler:async n=>l({command:`zero-trust dex tests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests/${n[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(n[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(n[`dex-test-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
280
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dex.tests.delete({account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Deleted`})})};function Sa(e){return e.usage(`$0 zero-trust dex tests get <dex-test-id>
291
+ 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 ua={command:`get <policy-id>`,describe:`Get a policy configuration by ID`,builder:la,handler:async n=>l({command:`zero-trust casb policies get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.policies.get({account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Loaded`})})};function da(e){return e.usage(`$0 zero-trust casb policies list
281
292
 
282
- 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 Ca={command:`get <dex-test-id>`,describe:`Get Device DEX test`,builder:Sa,handler:async n=>l({command:`zero-trust dex tests get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests/${n[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(n[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(n[`dex-test-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.tests.get({account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Loaded`})})};function wa(e){return e.usage(`$0 zero-trust dex tests list
293
+ Returns a list of integration-scoped policy configurations for the given account. This endpoint supports cursor based pagination. By default, results are returned in sorted order based on created_at.`).option(`cursor`,{type:`string`,description:"Cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fa={command:`list`,describe:`List policy configurations`,builder:da,handler:async n=>l({command:`zero-trust casb policies list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={cursor:n.cursor};if(n.dryRun){s({command:`cf zero-trust casb policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.policies.list({account_id:u,...i})),{successLabel:`Loaded`})})};function pa(e){return e.usage(`$0 zero-trust casb policies update <policy-id>
283
294
 
284
- Fetch all DEX tests.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`test-name`,{type:`string`,description:`Filter by test name.`}).option(`kind`,{type:`string`,description:`Filter by test type.`,choices:[`http`,`traceroute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ta={command:`list`,describe:`List Device DEX tests`,builder:y(wa),handler:async n=>l({command:`zero-trust dex tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],testName:n[`test-name`],kind:n.kind};if(n.dryRun){s({command:`cf zero-trust dex tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.tests.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Ea(e){return e.usage(`$0 zero-trust dex tests network-path get <test-id>
295
+ Updates an existing policy configuration and replaces its actions.`).positional(`policy-id`,{type:`string`,description:`Policy configuration ID`,demandOption:!0}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing policy configuration.`})}const ma={command:`update <policy-id>`,describe:`Update a policy configuration`,builder:pa,handler:async n=>l({command:`zero-trust casb policies update`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({applies_to_all_integrations:n[`applies-to-all-integrations`],description:m(n.description,`description`,`text`),display_name:m(n[`display-name`],`display-name`,`text`),enabled:n.enabled,integration_ids:n[`integration-ids`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.casb.policies.update({...e,account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Updated`});return}if(n[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(n[`display-name`]===void 0&&(n[`display-name`]=await g(`display-name`,`Display name for the policy configuration.`)),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({applies_to_all_integrations:n[`applies-to-all-integrations`],description:m(n.description,`description`,`text`),display_name:m(n[`display-name`],`display-name`,`text`),enabled:n.enabled,integration_ids:n[`integration-ids`]});o(await c(`Updating`,async()=>i.zeroTrust.casb.policies.update({...u,account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Updated`})})},ha={command:`policies`,describe:`Operations for casb.policies`,builder:e=>e.command(oa).command(ca).command(ua).command(fa).command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ga(e){return e.usage(`$0 zero-trust casb remediations jobs create
285
296
 
286
- Get a breakdown of metrics by hop for individual traceroute test runs.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Device to filter traceroute result runs to.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Da={command:`get <test-id>`,describe:`Get network path breakdown for a traceroute test`,builder:y(Ea),handler:async n=>l({command:`zero-trust dex tests network-path get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,interval:n.interval};if(n.dryRun){s({command:`cf zero-trust dex tests network-path get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}/network-path`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.tests.networkPath.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})},Oa={command:`network-path`,describe:`Operations for dex.tests.network-path`,builder:e=>e.command(Da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ka(e){return e.usage(`$0 zero-trust dex tests update <dex-test-id>
297
+ Create one or more remediation jobs tied to a specific Cloudflare Account.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`UUIDs identifying Finding Instances.`}).option(`remediation-type-id`,{type:`string`,description:`A UUID identifying this Remediation Type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating remediation jobs.`})}const _a={command:`create`,describe:`Creates remediation jobs`,builder:ga,handler:async n=>l({command:`zero-trust casb remediations jobs create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb remediations jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({finding_instance_ids:n[`finding-instance-ids`],remediation_type_id:m(n[`remediation-type-id`],`remediation-type-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.remediations.jobs.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);n[`remediation-type-id`]===void 0&&(n[`remediation-type-id`]=await g(`remediation-type-id`,`A UUID identifying this Remediation Type.`));let u=p({finding_instance_ids:n[`finding-instance-ids`],remediation_type_id:m(n[`remediation-type-id`],`remediation-type-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.casb.remediations.jobs.create({...u,account_id:l})),{successLabel:`Created`})})};function va(e){return e.usage(`$0 zero-trust casb remediations jobs export
287
298
 
288
- Update a DEX test.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,demandOption:!0}).option(`data-host`,{type:`string`,description:`The desired endpoint to test.`}).option(`data-kind`,{type:`string`,description:`The type of test.`,choices:[`http`,`traceroute`]}).option(`data-method`,{type:`string`,description:`The HTTP request method type.`,choices:[`GET`]}).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(`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 Aa={command:`update <dex-test-id>`,describe:`Update Device DEX test`,builder:ka,handler:async n=>l({command:`zero-trust dex tests update`,classification:{safeFlags:[`data-kind`,`data-method`,`enabled`,`targeted`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests/${n[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(n[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(n[`dex-test-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dex.tests.update({body:e,account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Updated`});return}if(n[`data-host`]===void 0&&(n[`data-host`]=await g(`data-host`,`The desired endpoint to test.`)),n[`data-kind`]===void 0&&(n[`data-kind`]=await _(`data-kind`,`The type of test.`,[`http`,`traceroute`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.interval===void 0&&(n.interval=await g(`interval`,`How often the test will run.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the DEX test. Must be unique.`));let u=p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted});o(await c(`Updating`,async()=>i.zeroTrust.dex.tests.update({body:u,account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Updated`})})},ja={command:`tests`,describe:`Operations for dex.tests`,builder:e=>e.command(ya).command(xa).command(Ca).command(Ta).command(Aa).command(Oa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ma(e){return e.usage(`$0 zero-trust dex warp-change-events list
299
+ Creates a CSV export for remediation jobs and accepts optional filters in the payload.`).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or before this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or after this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`status`,{type:`string`,array:!0,description:`Filter by remediation job status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for remediation jobs export.`})}const ya={command:`export`,describe:`Create a remediation jobs export`,builder:va,handler:async n=>l({command:`zero-trust casb remediations jobs export`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb remediations jobs export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/remediations/jobs/export`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({integration_id:n[`integration-id`],max_updated_at:m(n[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:m(n[`min-updated-at`],`min-updated-at`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`),status:n.status}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Loading`,async()=>i.zeroTrust.casb.remediations.jobs.export({...e,account_id:l})),{successLabel:`Loaded`});return}let u=p({integration_id:n[`integration-id`],max_updated_at:m(n[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:m(n[`min-updated-at`],`min-updated-at`,`text`),orders:f(n.orders,`orders`),search:m(n.search,`search`,`text`),status:n.status});o(await c(`Loading`,async()=>i.zeroTrust.casb.remediations.jobs.export({...u,account_id:l})),{successLabel:`Loaded`})})};function ba(e){return e.usage("$0 zero-trust casb remediations jobs list\n\nList all remediation jobs tied to a specific Cloudflare Account. Note that `cursor` and `page` are mutually exclusive.").option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediations updated on or after the min updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediations updated on or before the max updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`status`,{type:`string`,description:`Filter to view remediations with the given status.`,choices:[`pending`,`processing`,`completed`,`failed`,`validating`]}).option(`triggered-by-actor`,{type:`string`,description:`Filter remediations by what kind of actor triggered them. Supports multiple comma-separated values.`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`order`,{type:`string`,description:`An optional param to sort the results by the given field.`,choices:[`created_at`,`affliction_date`,`integration_name`,`status`,`last_updated_at`,`asset_name`,`finding_type_name`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xa={command:`list`,describe:`List remediation jobs`,builder:y(ba),handler:async n=>l({command:`zero-trust casb remediations jobs list`,classification:{safeFlags:[`status`,`order`,`direction`,`dry-run`]}},n,async()=>{let i={cursor:n.cursor,page:n.page,per_page:n[`per-page`],search:n.search,min_updated_at:n[`min-updated-at`],max_updated_at:n[`max-updated-at`],status:n.status,triggered_by_actor:n[`triggered-by-actor`],integration_id:n[`integration-id`],order:n.order,direction:n.direction};if(n.dryRun){s({command:`cf zero-trust casb remediations jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.casb.remediations.jobs.list({account_id:u,...i})),{successLabel:`Loaded`})})},Sa={command:`jobs`,describe:`Operations for casb.remediations.jobs`,builder:e=>e.command(_a).command(ya).command(xa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ca={command:`remediations`,describe:`Operations for casb.remediations`,builder:e=>e.command(Sa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wa(e){return e.usage(`$0 zero-trust casb webhooks create
289
300
 
290
- List WARP configuration and enablement toggle change events by device.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter events by type 'config' or 'toggle'.`,choices:[`config`,`toggle`]}).option(`toggle`,{type:`string`,description:`Filter events by type toggle value. Applicable to type='toggle' events only.`,choices:[`on`,`off`]}).option(`config-name`,{type:`string`,description:`Filter events by WARP configuration name changed from or to. Applicable to type='config' events only.`}).option(`account-name`,{type:`string`,description:`Filter events by account name.`}).option(`sort-order`,{type:`string`,description:`Sort response by event timestamp.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Na={command:`list`,describe:`List WARP change events.`,builder:y(Ma),handler:async n=>l({command:`zero-trust dex warp-change-events list`,classification:{safeFlags:[`type`,`toggle`,`sort-order`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],from:n.from,to:n.to,type:n.type,toggle:n.toggle,config_name:n[`config-name`],account_name:n[`account-name`],sort_order:n[`sort-order`]};if(n.dryRun){s({command:`cf zero-trust dex warp-change-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/warp-change-events`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.warpChangeEvents.list({account_id:u,...i})),{successLabel:`Loaded`})})},Pa={command:`warp-change-events`,describe:`Operations for dex.warp-change-events`,builder:e=>e.command(Na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fa={command:`dex`,describe:`Digital Experience Monitoring — synthetic tests, fleet-wide device metrics, and network path diagnostics`,builder:e=>e.command(ai).command(yi).command(Pi).command(Li).command(Wi).command(ta).command(_a).command(ja).command(Pa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ia(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics create
301
+ 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`]}).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`}).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 Ta={command:`create`,describe:`Create a new webhook configuration`,builder:wa,handler:async n=>l({command:`zero-trust casb webhooks create`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({authentication_type:m(n[`authentication-type`],`authentication-type`,`text`),destination_url:m(n[`destination-url`],`destination-url`,`text`),headers:f(n.headers,`headers`),label:m(n.label,`label`,`text`),signing_secret:m(n[`signing-secret`],`signing-secret`,`text`),status:m(n.status,`status`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.create({...e,account_id:l})),{successLabel:`Created`});return}n[`authentication-type`]===void 0&&(n[`authentication-type`]=await _(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),n[`destination-url`]===void 0&&(n[`destination-url`]=await g(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),n.label===void 0&&(n.label=await g(`label`,`Account-specified display label for the webhook configuration.`));let u=p({authentication_type:m(n[`authentication-type`],`authentication-type`,`text`),destination_url:m(n[`destination-url`],`destination-url`,`text`),headers:f(n.headers,`headers`),label:m(n.label,`label`,`text`),signing_secret:m(n[`signing-secret`],`signing-secret`,`text`),status:m(n.status,`status`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.create({...u,account_id:l})),{successLabel:`Created`})})};function Ea(e){return e.usage(`$0 zero-trust casb webhooks delete <webhook-id>
291
302
 
292
- 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 La={command:`create`,describe:`Create custom prompt topic`,builder:Ia,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics create`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`),topic:m(n.topic,`topic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.customPromptTopics.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`)),n.topic===void 0&&(n.topic=await g(`topic`,`The topic field`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`),topic:m(n.topic,`topic`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.customPromptTopics.create({...u,account_id:l})),{successLabel:`Created`})})};function Ra(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics delete <entry-id>
303
+ 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 Da={command:`delete <webhook-id>`,describe:`Delete a webhook configuration`,builder:Ea,handler:async n=>l({command:`zero-trust casb webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${n[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(n[`webhook-id`]))}`,pathParams:{"webhook-id":String(n[`webhook-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
304
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.casb.webhooks.delete({account_id:l,webhook_id:n[`webhook-id`]})),{successLabel:`Deleted`})})};function Oa(e){return e.usage(`$0 zero-trust casb webhooks evaluate-existing <webhook-id>
293
305
 
294
- 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 za={command:`delete <entry-id>`,describe:`Delete custom prompt topic`,builder:Ra,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
295
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.customPromptTopics.delete({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Deleted`})})};function Ba(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics get <entry-id>
306
+ 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 ka={command:`evaluate-existing <webhook-id>`,describe:`Test an existing webhook configuration`,builder:Oa,handler:async n=>l({command:`zero-trust casb webhooks evaluate-existing`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks evaluate-existing`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${n[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(n[`webhook-id`]))}/evaluate`,pathParams:{"webhook-id":String(n[`webhook-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.evaluateExisting({account_id:l,webhook_id:n[`webhook-id`]})),{successLabel:`Created`})})};function Aa(e){return e.usage(`$0 zero-trust casb webhooks evaluate
296
307
 
297
- 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 Va={command:`get <entry-id>`,describe:`Get custom prompt topic`,builder:Ba,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.customPromptTopics.get({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Loaded`})})};function Ha(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics list
308
+ Sends a test webhook event to the specified destination URL to verify the webhook endpoint is reachable and properly configured. This allows customers to validate their webhook configuration before creating the actual webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).option(`authentication-type`,{type:`string`,description:`Type of authentication to use for the test webhook request.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).option(`destination-url`,{type:`string`,description:`Target URL to send the test webhook event to.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in the test webhook request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for testing a webhook configuration before creating it.`})}const ja={command:`evaluate`,describe:`Test a webhook configuration before creating it`,builder:Aa,handler:async n=>l({command:`zero-trust casb webhooks evaluate`,classification:{safeFlags:[`authentication-type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/evaluate`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({authentication_type:m(n[`authentication-type`],`authentication-type`,`text`),destination_url:m(n[`destination-url`],`destination-url`,`text`),headers:f(n.headers,`headers`),signing_secret:m(n[`signing-secret`],`signing-secret`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.evaluate({...e,account_id:l})),{successLabel:`Created`});return}n[`authentication-type`]===void 0&&(n[`authentication-type`]=await _(`authentication-type`,`Type of authentication to use for the test webhook request.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),n[`destination-url`]===void 0&&(n[`destination-url`]=await g(`destination-url`,`Target URL to send the test webhook event to.`));let u=p({authentication_type:m(n[`authentication-type`],`authentication-type`,`text`),destination_url:m(n[`destination-url`],`destination-url`,`text`),headers:f(n.headers,`headers`),signing_secret:m(n[`signing-secret`],`signing-secret`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.evaluate({...u,account_id:l})),{successLabel:`Created`})})};function Ma(e){return e.usage(`$0 zero-trust casb webhooks get <webhook-id>
298
309
 
299
- Lists all DLP custom prompt topic entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ua={command:`list`,describe:`List custom prompt topics`,builder:Ha,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.customPromptTopics.list({account_id:l})),{successLabel:`Loaded`})})};function Wa(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics update <entry-id>
310
+ Retrieves a specific webhook configuration by its unique identifier.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Na={command:`get <webhook-id>`,describe:`Get webhook configuration by ID`,builder:Ma,handler:async n=>l({command:`zero-trust casb webhooks get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${n[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(n[`webhook-id`]))}`,pathParams:{"webhook-id":String(n[`webhook-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.webhooks.get({account_id:l,webhook_id:n[`webhook-id`]})),{successLabel:`Loaded`})})};function Pa(e){return e.usage(`$0 zero-trust casb webhooks jobs create
300
311
 
301
- Updates a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).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(`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:`Update to be applied to the custom prompt topic.`})}const Ga={command:`update <entry-id>`,describe:`Update custom prompt topic`,builder:Wa,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics update`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),topic:m(n.topic,`topic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.customPromptTopics.update({...e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`)),n.topic===void 0&&(n.topic=await g(`topic`,`The topic field`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),topic:m(n.topic,`topic`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.customPromptTopics.update({...u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Ka={command:`custom-prompt-topics`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(La).command(za).command(Va).command(Ua).command(Ga).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qa(e){return e.usage(`$0 zero-trust dlp data-classes create
312
+ Creates webhook jobs to send a finding instance to one or more configured webhooks.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`Array of finding instance IDs to send to the webhooks.`}).option(`webhook-ids`,{type:`string`,array:!0,description:`Array of webhook IDs to trigger jobs for.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating up to 100 webhook jobs. The number of jobs is the product of webhook_ids and finding_instance_ids.`})}const Fa={command:`create`,describe:`Create webhook jobs`,builder:Pa,handler:async n=>l({command:`zero-trust casb webhooks jobs create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/jobs`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({finding_instance_ids:n[`finding-instance-ids`],webhook_ids:n[`webhook-ids`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.jobs.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);if(n[`webhook-ids`]===void 0)throw Error(`--webhook-ids is required (or pass --body with this field set).`);let u=p({finding_instance_ids:n[`finding-instance-ids`],webhook_ids:n[`webhook-ids`]});o(await c(`Creating`,async()=>i.zeroTrust.casb.webhooks.jobs.create({...u,account_id:l})),{successLabel:`Created`})})},Ia={command:`jobs`,describe:`Operations for casb.webhooks.jobs`,builder:e=>e.command(Fa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function La(e){return e.usage(`$0 zero-trust casb webhooks list
302
313
 
303
- 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 Ja={command:`create`,describe:`Creates a new data class`,builder:qa,handler:async n=>l({command:`zero-trust dlp data-classes create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataClasses.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`data-tags`]===void 0)throw Error(`--data-tags is required (or pass --body with this field set).`);if(n.expression===void 0&&(n.expression=await g(`expression`,`The expression field`)),n.name===void 0&&(n.name=await g(`name`,`The name field`)),n[`sensitivity-levels`]===void 0)throw Error(`--sensitivity-levels is required (or pass --body with this field set).`);let u=p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataClasses.create({...u,account_id:l})),{successLabel:`Created`})})};function Ya(e){return e.usage(`$0 zero-trust dlp data-classes delete <data-class-id>
314
+ Retrieves all webhook configurations for the authenticated account. Returns an array of webhook configurations that can be used to send finding notifications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ra={command:`list`,describe:`List webhook configurations`,builder:La,handler:async n=>l({command:`zero-trust casb webhooks list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.casb.webhooks.list({account_id:l})),{successLabel:`Loaded`})})};function za(e){return e.usage(`$0 zero-trust casb webhooks update <webhook-id>
304
315
 
305
- 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 Xa={command:`delete <data-class-id>`,describe:`Delete a single data class`,builder:Ya,handler:async n=>l({command:`zero-trust dlp data-classes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes/${n[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(n[`data-class-id`]))}`,pathParams:{"data-class-id":String(n[`data-class-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
306
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.dataClasses.delete({account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Deleted`})})};function Za(e){return e.usage(`$0 zero-trust dlp data-classes get <data-class-id>
316
+ Updates an existing webhook configuration with new settings.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration.`,choices:[`enabled`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing webhook configuration.`})}const Ba={command:`update <webhook-id>`,describe:`Update an existing webhook configuration`,builder:za,handler:async n=>l({command:`zero-trust casb webhooks update`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust casb webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/data-security/posture/webhooks/${n[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(n[`webhook-id`]))}`,pathParams:{"webhook-id":String(n[`webhook-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({authentication_type:m(n[`authentication-type`],`authentication-type`,`text`),destination_url:m(n[`destination-url`],`destination-url`,`text`),headers:f(n.headers,`headers`),label:m(n.label,`label`,`text`),signing_secret:m(n[`signing-secret`],`signing-secret`,`text`),status:m(n.status,`status`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.casb.webhooks.update({...e,account_id:l,webhook_id:n[`webhook-id`]})),{successLabel:`Updated`});return}n[`authentication-type`]===void 0&&(n[`authentication-type`]=await _(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),n[`destination-url`]===void 0&&(n[`destination-url`]=await g(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),n.label===void 0&&(n.label=await g(`label`,`Account-specified display label for the webhook configuration.`)),n.status===void 0&&(n.status=await _(`status`,`Status of the webhook configuration.`,[`enabled`,`disabled`]));let u=p({authentication_type:m(n[`authentication-type`],`authentication-type`,`text`),destination_url:m(n[`destination-url`],`destination-url`,`text`),headers:f(n.headers,`headers`),label:m(n.label,`label`,`text`),signing_secret:m(n[`signing-secret`],`signing-secret`,`text`),status:m(n.status,`status`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.casb.webhooks.update({...u,account_id:l,webhook_id:n[`webhook-id`]})),{successLabel:`Updated`})})},Va={command:`webhooks`,describe:`Operations for casb.webhooks`,builder:e=>e.command(Ta).command(Da).command(ja).command(ka).command(Na).command(Ra).command(Ba).command(Ia).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ha={command:`casb`,describe:`Operations for casb`,builder:e=>e.command($r).command(ii).command(li).command(_i).command(Ui).command(ia).command(ha).command(Ca).command(Va).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ua(e){return e.usage(`$0 zero-trust connectivity-settings edit
307
317
 
308
- 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 Qa={command:`get <data-class-id>`,describe:`Retrieve a specific data class`,builder:Za,handler:async n=>l({command:`zero-trust dlp data-classes get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes/${n[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(n[`data-class-id`]))}`,pathParams:{"data-class-id":String(n[`data-class-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataClasses.get({account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Loaded`})})};function $a(e){return e.usage(`$0 zero-trust dlp data-classes list
318
+ Updates the Zero Trust Connectivity Settings for the given account.`).option(`icmp-proxy-enabled`,{type:`boolean`,description:`A flag to enable the ICMP proxy for the account network.`}).option(`offramp-warp-enabled`,{type:`boolean`,description:`A flag to enable WARP to WARP traffic.`}).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 Wa={command:`edit`,describe:`Updates the Zero Trust Connectivity Settings`,builder:Ua,handler:async n=>l({command:`zero-trust connectivity-settings edit`,classification:{safeFlags:[`icmp-proxy-enabled`,`offramp-warp-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust connectivity-settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zerotrust/connectivity_settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({icmp_proxy_enabled:n[`icmp-proxy-enabled`],offramp_warp_enabled:n[`offramp-warp-enabled`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.connectivitySettings.edit({...e,account_id:l})),{successLabel:`Updated`});return}let u=p({icmp_proxy_enabled:n[`icmp-proxy-enabled`],offramp_warp_enabled:n[`offramp-warp-enabled`]});o(await c(`Updating`,async()=>i.zeroTrust.connectivitySettings.edit({...u,account_id:l})),{successLabel:`Updated`})})};function Ga(e){return e.usage(`$0 zero-trust connectivity-settings get
309
319
 
310
- Lists data classes configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const eo={command:`list`,describe:`Retrieve all data classes in an account`,builder:$a,handler:async n=>l({command:`zero-trust dlp data-classes list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataClasses.list({account_id:l})),{successLabel:`Loaded`})})};function to(e){return e.usage(`$0 zero-trust dlp data-classes update <data-class-id>
320
+ Gets the Zero Trust Connectivity Settings for the given account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ka={command:`get`,describe:`Get Zero Trust Connectivity Settings`,builder:Ga,handler:async n=>l({command:`zero-trust connectivity-settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust connectivity-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zerotrust/connectivity_settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.connectivitySettings.get({account_id:l})),{successLabel:`Loaded`})})},qa={command:`connectivity-settings`,describe:`Operations for connectivity-settings`,builder:e=>e.command(Wa).command(Ka).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ja(e){return e.usage(`$0 zero-trust devices client-versions list
311
321
 
312
- Updates the configuration for a data class.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).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 data class to update.`})}const no={command:`update <data-class-id>`,describe:`Update the attributes of a single data class`,builder:to,handler:async n=>l({command:`zero-trust dlp data-classes update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes/${n[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(n[`data-class-id`]))}`,pathParams:{"data-class-id":String(n[`data-class-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataClasses.update({...e,account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Updated`});return}let u=p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataClasses.update({...u,account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Updated`})})},ro={command:`data-classes`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Ja).command(Xa).command(Qa).command(eo).command(no).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function io(e){return e.usage(`$0 zero-trust dlp data-tag-categories create
322
+ Lists available WARP client versions for a specific target environment and release track. This endpoint is in Beta.`).option(`target-environment`,{type:`string`,description:`The target environment for the client version (e.g., windows, macos).`,demandOption:!0}).option(`release-track`,{type:`string`,description:`The release track (ga for General Availability, beta for Beta releases).`,choices:[`ga`,`beta`],demandOption:!0}).option(`page`,{type:`number`,description:`The page number to return.`}).option(`per-page`,{type:`number`,description:`The maximum number of versions to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ya={command:`list`,describe:`List client versions`,builder:y(Ja),handler:async n=>l({command:`zero-trust devices client-versions list`,classification:{safeFlags:[`release-track`,`dry-run`]}},n,async()=>{let i={target_environment:n[`target-environment`],release_track:n[`release-track`],page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust devices client-versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/client-versions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.clientVersions.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Xa(e){return e.usage(`$0 zero-trust devices client-versions target-environments list
313
323
 
314
- 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 ao={command:`create`,describe:`Creates a new data tag category.`,builder:io,handler:async n=>l({command:`zero-trust dlp data-tag-categories create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`),template_id:m(n[`template-id`],`template-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTagCategories.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`),template_id:m(n[`template-id`],`template-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTagCategories.create({...u,account_id:l})),{successLabel:`Created`})})};function oo(e){return e.usage(`$0 zero-trust dlp data-tag-categories delete <category-id>
324
+ 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 Za={command:`list`,describe:`List available target environments`,builder:Xa,handler:async n=>l({command:`zero-trust devices client-versions target-environments list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices client-versions target-environments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/client-versions/target-environments`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.clientVersions.targetEnvironments.list({account_id:l})),{successLabel:`Loaded`})})},Qa={command:`target-environments`,describe:`Operations for devices.client-versions.target-environments`,builder:e=>e.command(Za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$a={command:`client-versions`,describe:`Operations for devices.client-versions`,builder:e=>e.command(Ya).command(Qa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function eo(e){return e.usage(`$0 zero-trust devices delete <device-id>
315
325
 
316
- 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 so={command:`delete <category-id>`,describe:`Delete a single data tag category.`,builder:oo,handler:async n=>l({command:`zero-trust dlp data-tag-categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
317
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.dataTagCategories.delete({account_id:l,category_id:n[`category-id`]})),{successLabel:`Deleted`})})};function co(e){return e.usage(`$0 zero-trust dlp data-tag-categories get <category-id>
326
+ 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 to={command:`delete <device-id>`,describe:`Delete device`,builder:eo,handler:async n=>l({command:`zero-trust devices delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/physical-devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}`,pathParams:{"device-id":String(n[`device-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
327
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.delete({account_id:l,device_id:n[`device-id`]})),{successLabel:`Deleted`})})};function no(e){return e.usage(`$0 zero-trust devices deployment-groups create
318
328
 
319
- 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 lo={command:`get <category-id>`,describe:`Retrieve a specific data tag category.`,builder:co,handler:async n=>l({command:`zero-trust dlp data-tag-categories get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategories.get({account_id:l,category_id:n[`category-id`]})),{successLabel:`Loaded`})})};function uo(e){return e.usage(`$0 zero-trust dlp data-tag-categories list
329
+ 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 ro={command:`create`,describe:`Create deployment group`,builder:no,handler:async n=>l({command:`zero-trust devices deployment-groups create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices deployment-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/deployment-groups`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({name:m(n.name,`name`,`text`),policy_ids:n[`policy-ids`],version_config:f(n[`version-config`],`version-config`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.deploymentGroups.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.name===void 0&&(n.name=await g(`name`,`A user-friendly name for the deployment group.`)),n[`version-config`]===void 0)throw Error(`--version-config is required (or pass --body with this field set).`);let u=p({name:m(n.name,`name`,`text`),policy_ids:n[`policy-ids`],version_config:f(n[`version-config`],`version-config`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.deploymentGroups.create({...u,account_id:l})),{successLabel:`Created`})})};function io(e){return e.usage(`$0 zero-trust devices deployment-groups delete <group-id>
320
330
 
321
- Lists data tag categories configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fo={command:`list`,describe:`Retrieve all data tag categories in an account`,builder:uo,handler:async n=>l({command:`zero-trust dlp data-tag-categories list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategories.list({account_id:l})),{successLabel:`Loaded`})})};function po(e){return e.usage(`$0 zero-trust dlp data-tag-categories update <category-id>
331
+ 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 ao={command:`delete <group-id>`,describe:`Delete deployment group`,builder:io,handler:async n=>l({command:`zero-trust devices deployment-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices deployment-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/deployment-groups/${n[`group-id`]==null?`<group-id>`:encodeURIComponent(String(n[`group-id`]))}`,pathParams:{"group-id":String(n[`group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
332
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.deploymentGroups.delete({account_id:l,group_id:n[`group-id`]})),{successLabel:`Deleted`})})};function oo(e){return e.usage(`$0 zero-trust devices deployment-groups get <group-id>
322
333
 
323
- Updates a data tag category and its tags.`).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(`tags`,{type:`string`,description:"The desired final state of tags.\n- `None` (omitted): no tag changes.\n- `Some([])`: delete all tags.\n- `Some([...])`: desired final set + order. 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 data tag category to update.`})}const mo={command:`update <category-id>`,describe:`Update the attributes of a single data tag category.`,builder:po,handler:async n=>l({command:`zero-trust dlp data-tag-categories update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTagCategories.update({...e,account_id:l,category_id:n[`category-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTagCategories.update({...u,account_id:l,category_id:n[`category-id`]})),{successLabel:`Updated`})})},ho={command:`data-tag-categories`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(ao).command(so).command(lo).command(fo).command(mo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function go(e){return e.usage(`$0 zero-trust dlp data-tag-category-templates get <template-id>
334
+ 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 so={command:`get <group-id>`,describe:`Get deployment group`,builder:oo,handler:async n=>l({command:`zero-trust devices deployment-groups get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices deployment-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/deployment-groups/${n[`group-id`]==null?`<group-id>`:encodeURIComponent(String(n[`group-id`]))}`,pathParams:{"group-id":String(n[`group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.deploymentGroups.get({account_id:l,group_id:n[`group-id`]})),{successLabel:`Loaded`})})};function co(e){return e.usage(`$0 zero-trust devices deployment-groups list
324
335
 
325
- Gets an available data tag category template.`).positional(`template-id`,{type:`string`,description:`Template ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _o={command:`get <template-id>`,describe:`Retrieve a specific data tag category template.`,builder:go,handler:async n=>l({command:`zero-trust dlp data-tag-category-templates get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-category-templates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_category_templates/${n[`template-id`]==null?`<template-id>`:encodeURIComponent(String(n[`template-id`]))}`,pathParams:{"template-id":String(n[`template-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategoryTemplates.get({account_id:l,template_id:n[`template-id`]})),{successLabel:`Loaded`})})};function vo(e){return e.usage(`$0 zero-trust dlp data-tag-category-templates list
336
+ Lists all deployment groups for an account. Use deployment groups to assign target WARP client versions to specific devices. This endpoint is in Beta.`).option(`page`,{type:`number`,description:`The page number to return.`}).option(`per-page`,{type:`number`,description:`The maximum number of deployment groups to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lo={command:`list`,describe:`List deployment groups`,builder:co,handler:async n=>l({command:`zero-trust devices deployment-groups list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust devices deployment-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/deployment-groups`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.deploymentGroups.list({account_id:u,...i})),{successLabel:`Loaded`})})};function uo(e){return e.usage(`$0 zero-trust devices deployment-groups update <group-id>
326
337
 
327
- Lists available data tag category templates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yo={command:`list`,describe:`Retrieve all data tag category templates in an account`,builder:vo,handler:async n=>l({command:`zero-trust dlp data-tag-category-templates list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-category-templates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_category_templates`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategoryTemplates.list({account_id:l})),{successLabel:`Loaded`})})},bo={command:`data-tag-category-templates`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(_o).command(yo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xo(e){return e.usage(`$0 zero-trust dlp data-tags create <category-id>
338
+ Updates a deployment group. Returns 409 if any newly added policy IDs already belong to another deployment group. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for the deployment group.`}).option(`policy-ids`,{type:`string`,array:!0,description:`Replaces the entire list of policy IDs.`}).option(`version-config`,{type:`string`,description:`Replaces the entire version_config array. 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 fo={command:`update <group-id>`,describe:`Update deployment group`,builder:uo,handler:async n=>l({command:`zero-trust devices deployment-groups update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices deployment-groups update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/deployment-groups/${n[`group-id`]==null?`<group-id>`:encodeURIComponent(String(n[`group-id`]))}`,pathParams:{"group-id":String(n[`group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({name:m(n.name,`name`,`text`),policy_ids:n[`policy-ids`],version_config:f(n[`version-config`],`version-config`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.deploymentGroups.update({...e,account_id:l,group_id:n[`group-id`]})),{successLabel:`Updated`});return}let u=p({name:m(n.name,`name`,`text`),policy_ids:n[`policy-ids`],version_config:f(n[`version-config`],`version-config`)});o(await c(`Updating`,async()=>i.zeroTrust.devices.deploymentGroups.update({...u,account_id:l,group_id:n[`group-id`]})),{successLabel:`Updated`})})},po={command:`deployment-groups`,describe:`Operations for devices.deployment-groups`,builder:e=>e.command(ro).command(ao).command(so).command(lo).command(fo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mo(e){return e.usage(`$0 zero-trust devices emergency-disconnect get
328
339
 
329
- 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 So={command:`create <category-id>`,describe:`Creates a new data tag.`,builder:xo,handler:async n=>l({command:`zero-trust dlp data-tags create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTags.create({body:e,account_id:l,category_id:n[`category-id`]})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTags.create({body:u,account_id:l,category_id:n[`category-id`]})),{successLabel:`Created`})})};function Co(e){return e.usage(`$0 zero-trust dlp data-tags delete <tag-id>
340
+ Fetch the Global WARP disconnect state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ho={command:`get`,describe:`Get Global Disconnect`,builder:mo,handler:async n=>l({command:`zero-trust devices emergency-disconnect get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices emergency-disconnect get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/resilience/disconnect`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.emergencyDisconnect.get({account_id:l})),{successLabel:`Loaded`})})};function go(e){return e.usage(`$0 zero-trust devices emergency-disconnect set
330
341
 
331
- 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 wo={command:`delete <tag-id>`,describe:`Delete a single data tag.`,builder:Co,handler:async n=>l({command:`zero-trust dlp data-tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags/${n[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(n[`tag-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``),"tag-id":String(n[`tag-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
332
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.dataTags.delete({account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Deleted`})})};function To(e){return e.usage(`$0 zero-trust dlp data-tags get <tag-id>
342
+ Sets the Global WARP disconnect state.`).option(`disconnect`,{type:`boolean`,description:`Disconnects all devices on the account using Global WARP override.`}).option(`justification`,{type:`string`,description:`Reasoning for setting the Global WARP override state. This will be surfaced in the audit log.`}).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 _o={command:`set`,describe:`Set Global Disconnect`,builder:go,handler:async n=>l({command:`zero-trust devices emergency-disconnect set`,classification:{safeFlags:[`disconnect`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices emergency-disconnect set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/resilience/disconnect`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({disconnect:n.disconnect,justification:m(n.justification,`justification`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.emergencyDisconnect.set({...e,account_id:l})),{successLabel:`Created`});return}if(n.disconnect===void 0)throw Error(`--disconnect is required (or pass --body with this field set).`);let u=p({disconnect:n.disconnect,justification:m(n.justification,`justification`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.emergencyDisconnect.set({...u,account_id:l})),{successLabel:`Created`})})},vo={command:`emergency-disconnect`,describe:`Operations for devices.emergency-disconnect`,builder:e=>e.command(ho).command(_o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function yo(e){return e.usage(`$0 zero-trust devices get <device-id>
333
343
 
334
- 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 Eo={command:`get <tag-id>`,describe:`Retrieve a specific data tag.`,builder:To,handler:async n=>l({command:`zero-trust dlp data-tags get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags/${n[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(n[`tag-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``),"tag-id":String(n[`tag-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTags.get({account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Loaded`})})};function Do(e){return e.usage(`$0 zero-trust dlp data-tags list
344
+ Fetches a single WARP device.`).positional(`device-id`,{type:`string`,description:`Device ID`,demandOption:!0}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the device response. Supported values are: "last_seen_registration.policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bo={command:`get <device-id>`,describe:`Get device`,builder:yo,handler:async n=>l({command:`zero-trust devices get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={include:n.include};if(n.dryRun){s({command:`cf zero-trust devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/physical-devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.get({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})};function xo(e){return e.usage(`$0 zero-trust devices ip-profiles create
335
345
 
336
- Lists data tags in a category.`).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 Oo={command:`list`,describe:`Retrieve all data tags in a data tag category`,builder:Do,handler:async n=>l({command:`zero-trust dlp data-tags list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTags.list({account_id:l,category_id:n[`category-id`]})),{successLabel:`Loaded`})})};function ko(e){return e.usage(`$0 zero-trust dlp data-tags update <tag-id>
346
+ 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 So={command:`create`,describe:`Create IP profile`,builder:xo,handler:async n=>l({command:`zero-trust devices ip-profiles create`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices ip-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/ip-profiles`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,subnet_id:m(n[`subnet-id`],`subnet-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.ipProfiles.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.match===void 0&&(n.match=await g(`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".`)),n.name===void 0&&(n.name=await g(`name`,`A user-friendly name for the Device IP profile.`)),n.precedence===void 0)throw Error(`--precedence is required (or pass --body with this field set).`);n[`subnet-id`]===void 0&&(n[`subnet-id`]=await g(`subnet-id`,`The ID of the Subnet.`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,subnet_id:m(n[`subnet-id`],`subnet-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.ipProfiles.create({...u,account_id:l})),{successLabel:`Created`})})};function Co(e){return e.usage(`$0 zero-trust devices ip-profiles delete <profile-id>
337
347
 
338
- Updates a data tag in a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`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 data tag to update.`})}const Ao={command:`update <tag-id>`,describe:`Update the attributes of a single data tag.`,builder:ko,handler:async n=>l({command:`zero-trust dlp data-tags update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags/${n[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(n[`tag-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``),"tag-id":String(n[`tag-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTags.update({...e,account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTags.update({...u,account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Updated`})})},jo={command:`data-tags`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(So).command(wo).command(Eo).command(Oo).command(Ao).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mo(e){return e.usage(`$0 zero-trust dlp datasets create
348
+ 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 wo={command:`delete <profile-id>`,describe:`Delete IP profile`,builder:Co,handler:async n=>l({command:`zero-trust devices ip-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices ip-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/ip-profiles/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
349
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.ipProfiles.delete({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Deleted`})})};function To(e){return e.usage(`$0 zero-trust devices ip-profiles get <profile-id>
339
350
 
340
- Creates a new DLP (Data Loss Prevention) dataset for storing custom detection patterns. Datasets can contain exact match data, word lists, or EDM (Exact Data Match) configurations.`).option(`case-sensitive`,{type:`boolean`,description:`Only applies to custom word lists.
341
- Determines if the words should be matched in a case-sensitive manner
342
- Cannot be set to false if \`secret\` is true or undefined`}).option(`description`,{type:`string`,description:`The description of the dataset.`}).option(`encoding-version`,{type:`number`,description:`Dataset encoding version
351
+ 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 Eo={command:`get <profile-id>`,describe:`Get IP profile`,builder:To,handler:async n=>l({command:`zero-trust devices ip-profiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices ip-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/ip-profiles/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.ipProfiles.get({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Loaded`})})};function Do(e){return e.usage(`$0 zero-trust devices ip-profiles list
343
352
 
344
- Non-secret custom word lists with no header are always version 1.
345
- Secret EDM lists with no header are version 1.
346
- Multicolumn CSV with headers are version 2.
347
- Omitting this field provides the default value 0, which is interpreted
348
- the same as 1.`}).option(`name`,{type:`string`,description:`The name field`}).option(`secret`,{type:`boolean`,description:`Generate a secret dataset.
353
+ Lists WARP Device IP profiles.`).option(`page`,{type:`number`,description:`The page number to return.`}).option(`per-page`,{type:`number`,description:`The number of IP profiles to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oo={command:`list`,describe:`List IP profiles`,builder:Do,handler:async n=>l({command:`zero-trust devices ip-profiles list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust devices ip-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/ip-profiles`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.ipProfiles.list({account_id:u,...i})),{successLabel:`Loaded`})})};function ko(e){return e.usage(`$0 zero-trust devices ip-profiles update <profile-id>
349
354
 
350
- If true, the response will include a secret to use with the EDM encoder.
351
- 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 No={command:`create`,describe:`Create a new dataset`,builder:Mo,handler:async n=>l({command:`zero-trust dlp datasets create`,classification:{safeFlags:[`case-sensitive`,`secret`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),encoding_version:n[`encoding-version`],name:m(n.name,`name`,`text`),secret:n.secret}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),encoding_version:n[`encoding-version`],name:m(n.name,`name`,`text`),secret:n.secret});o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.create({...u,account_id:l})),{successLabel:`Created`})})};function Po(e){return e.usage(`$0 zero-trust dlp datasets delete <dataset-id>
355
+ Updates a WARP Device IP profile. Currently, only IPv4 Device subnets can be associated.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`description`,{type:`string`,description:`An optional description of the Device IP profile.`}).option(`enabled`,{type:`boolean`,description:`Whether the Device IP profile is enabled.`}).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 Ao={command:`update <profile-id>`,describe:`Update IP profile`,builder:ko,handler:async n=>l({command:`zero-trust devices ip-profiles update`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices ip-profiles update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/ip-profiles/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,subnet_id:m(n[`subnet-id`],`subnet-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.ipProfiles.update({...e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,subnet_id:m(n[`subnet-id`],`subnet-id`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.devices.ipProfiles.update({...u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`})})},jo={command:`ip-profiles`,describe:`Operations for devices.ip-profiles`,builder:e=>e.command(So).command(wo).command(Eo).command(Oo).command(Ao).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mo(e){return e.usage(`$0 zero-trust devices list
352
356
 
353
- 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 Fo={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:Po,handler:async n=>l({command:`zero-trust dlp datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
354
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.datasets.delete({account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Deleted`})})};function Io(e){return e.usage(`$0 zero-trust dlp datasets get <dataset-id>
357
+ Lists WARP devices.`).option(`cursor`,{type:`string`,description:`Opaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.`}).option(`sort-by`,{type:`string`,description:`The device field to order results by.`,choices:[`name`,`id`,`client_version`,`last_seen_user.email`,`last_seen_at`,`active_registrations`,`created_at`]}).option(`sort-order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`last-seen-user-email`,{type:`string`,description:`Filter by the last seen user's email.`}).option(`seen-after`,{type:`string`,description:`Filter by the last_seen timestamp - returns only devices last seen after this timestamp.`}).option(`seen-before`,{type:`string`,description:`Filter by the last_seen timestamp - returns only devices last seen before this timestamp.`}).option(`per-page`,{type:`number`,description:`The maximum number of devices to return in a single response.`}).option(`search`,{type:`string`,description:`Search by device details.`}).option(`active-registrations`,{type:`string`,description:`Include or exclude devices with active registrations. The default is "only" - return only devices with active registrations.`,choices:[`include`,`only`,`exclude`]}).option(`has-registration-type`,{type:`string`,description:`Filter by the type of active registration associated with the device.`,choices:[`warp`,`browser_extension`]}).option(`id`,{type:`string`,description:`Filter by a one or more device IDs.`}).option(`tag`,{type:`string`,description:`Filter by one or more device tags in key:value format. Devices must match all provided tags.`}).option(`last-seen-registration-policy-id`,{type:`string`,description:`Filter by the ID of the device settings profile assigned to the device registration.`}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the device response. Supported values are: "last_seen_registration.policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const No={command:`list`,describe:`List devices`,builder:y(Mo),handler:async n=>l({command:`zero-trust devices list`,classification:{safeFlags:[`sort-by`,`sort-order`,`active-registrations`,`has-registration-type`,`dry-run`]}},n,async()=>{let i={cursor:n.cursor,sort_by:n[`sort-by`],sort_order:n[`sort-order`],"last_seen_user.email":n[`last-seen-user-email`],seen_after:n[`seen-after`],seen_before:n[`seen-before`],per_page:n[`per-page`],search:n.search,active_registrations:n[`active-registrations`],has_registration_type:n[`has-registration-type`],id:n.id,tag:n.tag,"last_seen_registration.policy.id":n[`last-seen-registration-policy-id`],include:n.include};if(n.dryRun){s({command:`cf zero-trust devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/physical-devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Po(e){return e.usage(`$0 zero-trust devices networks create
355
358
 
356
- 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 Lo={command:`get <dataset-id>`,describe:`Fetch a specific dataset`,builder:Io,handler:async n=>l({command:`zero-trust dlp datasets get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.datasets.get({account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Loaded`})})};function Ro(e){return e.usage(`$0 zero-trust dlp datasets list
359
+ Creates a new device managed network.`).option(`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(`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`]}).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 Fo={command:`create`,describe:`Create a device managed network`,builder:Po,handler:async n=>l({command:`zero-trust devices networks create`,classification:{safeFlags:[`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices networks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/networks`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({config:{sha256:m(n[`config-sha256`],`config-sha256`,`text`),tls_sockaddr:m(n[`config-tls-sockaddr`],`config-tls-sockaddr`,`text`)},name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.networks.create({...e,account_id:l})),{successLabel:`Created`});return}n[`config-tls-sockaddr`]===void 0&&(n[`config-tls-sockaddr`]=await g(`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.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the device managed network. This name must be unique.`)),n.type===void 0&&(n.type=await _(`type`,`The type of device managed network.`,[`tls`]));let u=p({config:{sha256:m(n[`config-sha256`],`config-sha256`,`text`),tls_sockaddr:m(n[`config-tls-sockaddr`],`config-tls-sockaddr`,`text`)},name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.networks.create({...u,account_id:l})),{successLabel:`Created`})})};function Io(e){return e.usage(`$0 zero-trust devices networks delete <network-id>
357
360
 
358
- Lists all DLP datasets configured for the account, including custom word lists and EDM datasets.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zo={command:`list`,describe:`Fetch all datasets`,builder:Ro,handler:async n=>l({command:`zero-trust dlp datasets list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.datasets.list({account_id:l})),{successLabel:`Loaded`})})};function Bo(e){return e.usage(`$0 zero-trust dlp datasets update <dataset-id>
361
+ 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 Lo={command:`delete <network-id>`,describe:`Delete a device managed network`,builder:Io,handler:async n=>l({command:`zero-trust devices networks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/networks/${n[`network-id`]==null?`<network-id>`:encodeURIComponent(String(n[`network-id`]))}`,pathParams:{"network-id":String(n[`network-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
362
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.networks.delete({account_id:l,network_id:n[`network-id`]})),{successLabel:`Deleted`})})};function Ro(e){return e.usage(`$0 zero-trust devices networks get <network-id>
359
363
 
360
- 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.
364
+ 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 zo={command:`get <network-id>`,describe:`Get device managed network details`,builder:Ro,handler:async n=>l({command:`zero-trust devices networks get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices networks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/networks/${n[`network-id`]==null?`<network-id>`:encodeURIComponent(String(n[`network-id`]))}`,pathParams:{"network-id":String(n[`network-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.networks.get({account_id:l,network_id:n[`network-id`]})),{successLabel:`Loaded`})})};function Bo(e){return e.usage(`$0 zero-trust devices networks list
361
365
 
362
- 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 Vo={command:`update <dataset-id>`,describe:`Update details about a dataset`,builder:Bo,handler:async n=>l({command:`zero-trust dlp datasets update`,classification:{safeFlags:[`case-sensitive`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.datasets.update({...e,account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Updated`});return}let u=p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.datasets.update({...u,account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Updated`})})};function Ho(e){return e.usage(`$0 zero-trust dlp datasets upload create <dataset-id>
366
+ Fetches a list of managed networks for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vo={command:`list`,describe:`List your device managed networks`,builder:Bo,handler:async n=>l({command:`zero-trust devices networks list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices networks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/networks`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.networks.list({account_id:l})),{successLabel:`Loaded`})})};function Ho(e){return e.usage(`$0 zero-trust devices networks update <network-id>
363
367
 
364
- Creates a new version of a DLP dataset, allowing you to stage changes before activation. Used for single-column EDM and custom word lists.`).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 Uo={command:`create <dataset-id>`,describe:`Prepare to upload a new version of a dataset`,builder:Ho,handler:async n=>l({command:`zero-trust dlp datasets upload create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets upload create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}/upload`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.upload.create({account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Created`})})};function Wo(e){return e.usage(`$0 zero-trust dlp datasets upload edit <version>
368
+ Updates a configured device managed network.`).positional(`network-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`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(`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`]}).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([`config-sha256`,`config-tls-sockaddr`].some(t=>e[t]!==void 0)){let t=[`config-tls-sockaddr`].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 --config-* flag is set`)}return!0})}const Uo={command:`update <network-id>`,describe:`Update a device managed network`,builder:Ho,handler:async n=>l({command:`zero-trust devices networks update`,classification:{safeFlags:[`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices networks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/networks/${n[`network-id`]==null?`<network-id>`:encodeURIComponent(String(n[`network-id`]))}`,pathParams:{"network-id":String(n[`network-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({config:{sha256:m(n[`config-sha256`],`config-sha256`,`text`),tls_sockaddr:m(n[`config-tls-sockaddr`],`config-tls-sockaddr`,`text`)},name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.networks.update({...e,account_id:l,network_id:n[`network-id`]})),{successLabel:`Updated`});return}let u=p({config:{sha256:m(n[`config-sha256`],`config-sha256`,`text`),tls_sockaddr:m(n[`config-tls-sockaddr`],`config-tls-sockaddr`,`text`)},name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.devices.networks.update({...u,account_id:l,network_id:n[`network-id`]})),{successLabel:`Updated`})})},Wo={command:`networks`,describe:`Operations for devices.networks`,builder:e=>e.command(Fo).command(Lo).command(zo).command(Vo).command(Uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Go(e){return e.usage(`$0 zero-trust devices override-codes create
365
369
 
366
- 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 Go={command:`edit <version>`,describe:`Upload a new version of a dataset`,builder:Wo,handler:async n=>l({command:`zero-trust dlp datasets upload edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets upload edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}/upload/${n.version==null?`<version>`:encodeURIComponent(String(n.version))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``),version:String(n.version??``)},bodyKind:`octet-stream`,body:n.body});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file){let e=h(n.file);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(n[`dataset-id`]))}/upload/${encodeURIComponent(String(n.version))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(n[`dataset-id`]))}/upload/${encodeURIComponent(String(n.version))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ko={command:`upload`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Uo).command(Go).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qo(e){return e.usage(`$0 zero-trust dlp datasets versions create <version>
370
+ Generates an account-wide or device-specific uninstall protection override code.`).option(`device-id`,{type:`string`,description:`Physical device ID. Required when scope is device and forbidden when scope is account.`}).option(`duration-hours`,{type:`number`,description:`Number of hours for which the override code should remain valid.`}).option(`scope`,{type:`string`,description:`Whether the code applies to every device in the account or one physical device.`,choices:[`account`,`device`]}).option(`type`,{type:`string`,description:`The feature that the override code applies to.`,choices:[`uninstall_protection`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ko={command:`create`,describe:`Generate an uninstall protection override code`,builder:Go,handler:async n=>l({command:`zero-trust devices override-codes create`,classification:{safeFlags:[`scope`,`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices override-codes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/override_codes`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({device_id:m(n[`device-id`],`device-id`,`text`),duration_hours:n[`duration-hours`],scope:m(n.scope,`scope`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.overrideCodes.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`duration-hours`]===void 0)throw Error(`--duration-hours is required (or pass --body with this field set).`);n.scope===void 0&&(n.scope=await _(`scope`,`Whether the code applies to every device in the account or one physical device.`,[`account`,`device`])),n.type===void 0&&(n.type=await _(`type`,`The feature that the override code applies to.`,[`uninstall_protection`]));let u=p({device_id:m(n[`device-id`],`device-id`,`text`),duration_hours:n[`duration-hours`],scope:m(n.scope,`scope`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.overrideCodes.create({...u,account_id:l})),{successLabel:`Created`})})},qo={command:`override-codes`,describe:`Operations for devices.override-codes`,builder:e=>e.command(Ko).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jo(e){return e.usage(`$0 zero-trust devices posture integrations create
367
371
 
368
- This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. The columns in the response appear in the same order as in the request.`).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:`array of new columns to create for this dataset version.`})}const Jo={command:`create <version>`,describe:`Sets the column information for a multi-column upload`,builder:qo,handler:async n=>l({command:`zero-trust dlp datasets versions create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets versions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}/versions/${n.version==null?`<version>`:encodeURIComponent(String(n.version))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``),version:String(n.version??``)},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.versions.create({body:e,account_id:l,dataset_id:n[`dataset-id`],version:n.version})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Yo(e){return e.usage(`$0 zero-trust dlp datasets versions entries create <entry-id>
372
+ Create a new device posture integration.`).option(`config-api-url`,{type:`string`,description:`The Workspace One API URL provided in the Workspace One Admin Dashboard.`}).option(`config-auth-url`,{type:`string`,description:`The Workspace One Authorization URL depending on your region.`}).option(`config-client-id`,{type:`string`,description:`The Workspace One client ID provided in the Workspace One Admin Dashboard.`}).option(`config-client-secret`,{type:`string`,description:`The Workspace One client secret provided in the Workspace One Admin Dashboard.`}).option(`config-customer-id`,{type:`string`,description:`The Crowdstrike customer ID.`}).option(`config-client-key`,{type:`string`,description:`The Uptycs client secret.`}).option(`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(`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`]}).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(`config-api-url`,[`config-customer-id`,`config-client-id`,`config-client-secret`]).conflicts(`config-auth-url`,[`config-customer-id`,`config-client-key`,`config-access-client-id`,`config-access-client-secret`]).implies(`config-auth-url`,[`config-api-url`,`config-client-id`,`config-client-secret`]).conflicts(`config-client-id`,[`config-client-key`,`config-customer-id`,`config-access-client-id`,`config-access-client-secret`,`config-api-url`]).conflicts(`config-client-secret`,[`config-access-client-id`,`config-access-client-secret`,`config-api-url`]).conflicts(`config-customer-id`,[`config-auth-url`,`config-client-id`,`config-api-url`,`config-access-client-id`,`config-access-client-secret`]).conflicts(`config-client-key`,[`config-auth-url`,`config-client-id`,`config-access-client-id`,`config-access-client-secret`]).implies(`config-client-key`,[`config-api-url`,`config-customer-id`,`config-client-secret`]).conflicts(`config-access-client-id`,[`config-auth-url`,`config-client-id`,`config-client-secret`,`config-customer-id`,`config-client-key`]).implies(`config-access-client-id`,[`config-api-url`,`config-access-client-secret`]).conflicts(`config-access-client-secret`,[`config-auth-url`,`config-client-id`,`config-client-secret`,`config-customer-id`,`config-client-key`]).implies(`config-access-client-secret`,[`config-api-url`,`config-access-client-id`])}const Yo={command:`create`,describe:`Create posture integration`,builder:Jo,handler:async n=>l({command:`zero-trust devices posture integrations create`,classification:{safeFlags:[`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/integration`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({config:{api_url:m(n[`config-api-url`],`config-api-url`,`text`),auth_url:m(n[`config-auth-url`],`config-auth-url`,`text`),client_id:m(n[`config-client-id`],`config-client-id`,`text`),client_secret:m(n[`config-client-secret`],`config-client-secret`,`text`),customer_id:m(n[`config-customer-id`],`config-customer-id`,`text`),client_key:m(n[`config-client-key`],`config-client-key`,`text`),access_client_id:m(n[`config-access-client-id`],`config-access-client-id`,`text`),access_client_secret:m(n[`config-access-client-secret`],`config-access-client-secret`,`text`)},interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.posture.integrations.create({...e,account_id:l})),{successLabel:`Created`});return}n.interval===void 0&&(n.interval=await g(`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`).")),n.name===void 0&&(n.name=await g(`name`,`The name of the device posture integration.`)),n.type===void 0&&(n.type=await _(`type`,`The type of device posture integration.`,[`workspace_one`,`crowdstrike_s2s`,`uptycs`,`intune`,`kolide`,`tanium_s2s`,`sentinelone_s2s`,`custom_s2s`]));let u=p({config:{api_url:m(n[`config-api-url`],`config-api-url`,`text`),auth_url:m(n[`config-auth-url`],`config-auth-url`,`text`),client_id:m(n[`config-client-id`],`config-client-id`,`text`),client_secret:m(n[`config-client-secret`],`config-client-secret`,`text`),customer_id:m(n[`config-customer-id`],`config-customer-id`,`text`),client_key:m(n[`config-client-key`],`config-client-key`,`text`),access_client_id:m(n[`config-access-client-id`],`config-access-client-id`,`text`),access_client_secret:m(n[`config-access-client-secret`],`config-access-client-secret`,`text`)},interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.posture.integrations.create({...u,account_id:l})),{successLabel:`Created`})})};function Xo(e){return e.usage(`$0 zero-trust devices posture integrations delete <integration-id>
369
373
 
370
- This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`version`,{type:`string`,description:`Version`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset content.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Xo={command:`create <entry-id>`,describe:`Upload a new version of a multi-column dataset`,builder:Yo,handler:async n=>l({command:`zero-trust dlp datasets versions entries create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets versions entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}/versions/${n.version==null?`<version>`:encodeURIComponent(String(n.version))}/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``),version:String(n.version??``),"entry-id":String(n[`entry-id`]??``)},bodyKind:`octet-stream`,body:n.body});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file){let e=h(n.file);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(n[`dataset-id`]))}/versions/${encodeURIComponent(String(n.version))}/entries/${encodeURIComponent(String(n[`entry-id`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(n[`dataset-id`]))}/versions/${encodeURIComponent(String(n.version))}/entries/${encodeURIComponent(String(n[`entry-id`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Zo={command:`entries`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Xo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Qo={command:`versions`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Jo).command(Zo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$o={command:`datasets`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(No).command(Fo).command(Lo).command(zo).command(Vo).command(Ko).command(Qo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function es(e){return e.usage(`$0 zero-trust dlp email account-mapping create
374
+ 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 Zo={command:`delete <integration-id>`,describe:`Delete posture integration`,builder:Xo,handler:async n=>l({command:`zero-trust devices posture integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/integration/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
375
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.posture.integrations.delete({account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Deleted`})})};function Qo(e){return e.usage(`$0 zero-trust devices posture integrations get <integration-id>
371
376
 
372
- Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration.`).option(`auth-requirements-allowed-microsoft-organizations`,{type:`string`,array:!0,description:`The auth_requirements.allowed_microsoft_organizations field`}).option(`auth-requirements-type`,{type:`string`,description:`The auth_requirements.type field`,choices:[`Org`,`NoAuth`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Account mapping.`})}const ts={command:`create`,describe:`Create mapping`,builder:es,handler:async n=>l({command:`zero-trust dlp email account-mapping create`,classification:{safeFlags:[`auth-requirements-type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email account-mapping create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/account_mapping`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({auth_requirements:{allowed_microsoft_organizations:n[`auth-requirements-allowed-microsoft-organizations`],type:m(n[`auth-requirements-type`],`auth-requirements-type`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.accountMapping.create({...e,account_id:l})),{successLabel:`Created`});return}n[`auth-requirements-type`]===void 0&&(n[`auth-requirements-type`]=await _(`auth-requirements-type`,`The auth_requirements.type field`,[`Org`,`NoAuth`]));let u=p({auth_requirements:{allowed_microsoft_organizations:n[`auth-requirements-allowed-microsoft-organizations`],type:m(n[`auth-requirements-type`],`auth-requirements-type`,`text`)}});o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.accountMapping.create({...u,account_id:l})),{successLabel:`Created`})})};function ns(e){return e.usage(`$0 zero-trust dlp email account-mapping get
377
+ 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 $o={command:`get <integration-id>`,describe:`Get posture integration`,builder:Qo,handler:async n=>l({command:`zero-trust devices posture integrations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/integration/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.posture.integrations.get({account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Loaded`})})};function es(e){return e.usage(`$0 zero-trust devices posture integrations list
373
378
 
374
- Retrieves the email provider mapping configuration for DLP email scanning.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rs={command:`get`,describe:`Get mapping`,builder:ns,handler:async n=>l({command:`zero-trust dlp email account-mapping get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email account-mapping get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/account_mapping`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.email.accountMapping.get({account_id:l})),{successLabel:`Loaded`})})},is={command:`account-mapping`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(ts).command(rs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function as(e){return e.usage(`$0 zero-trust dlp email rules bulk-edit
379
+ Fetches the list of device posture integrations for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ts={command:`list`,describe:`List posture integrations`,builder:es,handler:async n=>l({command:`zero-trust devices posture integrations list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/integration`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.posture.integrations.list({account_id:l})),{successLabel:`Loaded`})})};function ns(e){return e.usage(`$0 zero-trust devices posture integrations update <integration-id>
375
380
 
376
- Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Rule priorities.`})}const os={command:`bulk-edit`,describe:`Update email scanner rule priorities`,builder:as,handler:async n=>l({command:`zero-trust dlp email rules bulk-edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.email.rules.bulkEdit({...e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function $(e){return e.usage(`$0 zero-trust dlp email rules create
381
+ Updates a configured device posture integration.`).positional(`integration-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`config-api-url`,{type:`string`,description:`The Workspace One API URL provided in the Workspace One Admin Dashboard.`}).option(`config-auth-url`,{type:`string`,description:`The Workspace One Authorization URL depending on your region.`}).option(`config-client-id`,{type:`string`,description:`The Workspace One client ID provided in the Workspace One Admin Dashboard.`}).option(`config-client-secret`,{type:`string`,description:`The Workspace One client secret provided in the Workspace One Admin Dashboard.`}).option(`config-customer-id`,{type:`string`,description:`The Crowdstrike customer ID.`}).option(`config-client-key`,{type:`string`,description:`The Uptycs client secret.`}).option(`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(`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`]}).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(`config-api-url`,[`config-customer-id`,`config-client-id`,`config-client-secret`]).conflicts(`config-auth-url`,[`config-customer-id`,`config-client-key`,`config-access-client-id`,`config-access-client-secret`]).implies(`config-auth-url`,[`config-api-url`,`config-client-id`,`config-client-secret`]).conflicts(`config-client-id`,[`config-client-key`,`config-customer-id`,`config-access-client-id`,`config-access-client-secret`,`config-api-url`]).conflicts(`config-client-secret`,[`config-access-client-id`,`config-access-client-secret`,`config-api-url`]).conflicts(`config-customer-id`,[`config-auth-url`,`config-client-id`,`config-api-url`,`config-access-client-id`,`config-access-client-secret`]).conflicts(`config-client-key`,[`config-auth-url`,`config-client-id`,`config-access-client-id`,`config-access-client-secret`]).implies(`config-client-key`,[`config-api-url`,`config-customer-id`,`config-client-secret`]).conflicts(`config-access-client-id`,[`config-auth-url`,`config-client-id`,`config-client-secret`,`config-customer-id`,`config-client-key`]).implies(`config-access-client-id`,[`config-api-url`,`config-access-client-secret`]).conflicts(`config-access-client-secret`,[`config-auth-url`,`config-client-id`,`config-client-secret`,`config-customer-id`,`config-client-key`]).implies(`config-access-client-secret`,[`config-api-url`,`config-access-client-id`])}const rs={command:`update <integration-id>`,describe:`Update posture integration`,builder:ns,handler:async n=>l({command:`zero-trust devices posture integrations update`,classification:{safeFlags:[`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/integration/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({config:{api_url:m(n[`config-api-url`],`config-api-url`,`text`),auth_url:m(n[`config-auth-url`],`config-auth-url`,`text`),client_id:m(n[`config-client-id`],`config-client-id`,`text`),client_secret:m(n[`config-client-secret`],`config-client-secret`,`text`),customer_id:m(n[`config-customer-id`],`config-customer-id`,`text`),client_key:m(n[`config-client-key`],`config-client-key`,`text`),access_client_id:m(n[`config-access-client-id`],`config-access-client-id`,`text`),access_client_secret:m(n[`config-access-client-secret`],`config-access-client-secret`,`text`)},interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.posture.integrations.update({...e,account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Updated`});return}let u=p({config:{api_url:m(n[`config-api-url`],`config-api-url`,`text`),auth_url:m(n[`config-auth-url`],`config-auth-url`,`text`),client_id:m(n[`config-client-id`],`config-client-id`,`text`),client_secret:m(n[`config-client-secret`],`config-client-secret`,`text`),customer_id:m(n[`config-customer-id`],`config-customer-id`,`text`),client_key:m(n[`config-client-key`],`config-client-key`,`text`),access_client_id:m(n[`config-access-client-id`],`config-access-client-id`,`text`),access_client_secret:m(n[`config-access-client-secret`],`config-access-client-secret`,`text`)},interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.devices.posture.integrations.update({...u,account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Updated`})})},is={command:`integrations`,describe:`Operations for devices.posture.integrations`,builder:e=>e.command(Yo).command(Zo).command($o).command(ts).command(rs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function as(e){return e.usage(`$0 zero-trust devices posture rules create
377
382
 
378
- 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`]}).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 ss={command:`create`,describe:`Create email scanner rule`,builder:$,handler:async n=>l({command:`zero-trust dlp email rules create`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.rules.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`action-action`]===void 0&&(n[`action-action`]=await _(`action-action`,`The action.action field`,[`Block`])),n.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.rules.create({body:u,account_id:l})),{successLabel:`Created`})})};function cs(e){return e.usage(`$0 zero-trust dlp email rules delete <rule-id>
383
+ 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`]}).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:[`<`,`<=`,`>`,`>=`,`==`]}).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`]}).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`]}).option(`input-version-operator`,{type:`string`,description:`Version Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).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:[`<`,`<=`,`>`,`>=`,`==`]}).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`]}).option(`input-score-operator`,{type:`string`,description:`Score Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).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`]}).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`]}).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`]}).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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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 os={command:`create`,describe:`Create posture rule`,builder:as,handler:async n=>l({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`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),expiration:m(n.expiration,`expiration`,`text`),input:{exists:n[`input-exists`],operating_system:m(n[`input-operating-system`],`input-operating-system`,`text`),path:m(n[`input-path`],`input-path`,`text`),sha256:m(n[`input-sha256`],`input-sha256`,`text`),thumbprint:m(n[`input-thumbprint`],`input-thumbprint`,`text`),id:m(n[`input-id`],`input-id`,`text`),domain:m(n[`input-domain`],`input-domain`,`text`),operator:m(n[`input-operator`],`input-operator`,`text`),os_distro_name:m(n[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:m(n[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:m(n[`input-os-version-extra`],`input-os-version-extra`,`text`),version:m(n[`input-version`],`input-version`,`text`),enabled:n[`input-enabled`],checkDisks:n[`input-check-disks`],requireAll:n[`input-require-all`],certificate_id:m(n[`input-certificate-id`],`input-certificate-id`,`text`),cn:m(n[`input-cn`],`input-cn`,`text`),check_private_key:n[`input-check-private-key`],extended_key_usage:n[`input-extended-key-usage`],locations:{paths:n[`input-locations-paths`],trust_stores:n[`input-locations-trust-stores`]},subject_alternative_names:n[`input-subject-alternative-names`],update_window_days:n[`input-update-window-days`],compliance_status:m(n[`input-compliance-status`],`input-compliance-status`,`text`),connection_id:m(n[`input-connection-id`],`input-connection-id`,`text`),last_seen:m(n[`input-last-seen`],`input-last-seen`,`text`),os:m(n[`input-os`],`input-os`,`text`),overall:m(n[`input-overall`],`input-overall`,`text`),sensor_config:m(n[`input-sensor-config`],`input-sensor-config`,`text`),state:m(n[`input-state`],`input-state`,`text`),versionOperator:m(n[`input-version-operator`],`input-version-operator`,`text`),auth_state:n[`input-auth-state`],countOperator:m(n[`input-count-operator`],`input-count-operator`,`text`),issue_count:m(n[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:m(n[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:m(n[`input-risk-level`],`input-risk-level`,`text`),scoreOperator:m(n[`input-score-operator`],`input-score-operator`,`text`),total_score:n[`input-total-score`],active_threats:n[`input-active-threats`],infected:n[`input-infected`],is_active:n[`input-is-active`],network_status:m(n[`input-network-status`],`input-network-status`,`text`),operational_state:m(n[`input-operational-state`],`input-operational-state`,`text`),score:n[`input-score`]},match:f(n.match,`match`),name:m(n.name,`name`,`text`),schedule:m(n.schedule,`schedule`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.posture.rules.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name of the device posture rule.`)),n.type===void 0&&(n.type=await _(`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=p({description:m(n.description,`description`,`text`),expiration:m(n.expiration,`expiration`,`text`),input:{exists:n[`input-exists`],operating_system:m(n[`input-operating-system`],`input-operating-system`,`text`),path:m(n[`input-path`],`input-path`,`text`),sha256:m(n[`input-sha256`],`input-sha256`,`text`),thumbprint:m(n[`input-thumbprint`],`input-thumbprint`,`text`),id:m(n[`input-id`],`input-id`,`text`),domain:m(n[`input-domain`],`input-domain`,`text`),operator:m(n[`input-operator`],`input-operator`,`text`),os_distro_name:m(n[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:m(n[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:m(n[`input-os-version-extra`],`input-os-version-extra`,`text`),version:m(n[`input-version`],`input-version`,`text`),enabled:n[`input-enabled`],checkDisks:n[`input-check-disks`],requireAll:n[`input-require-all`],certificate_id:m(n[`input-certificate-id`],`input-certificate-id`,`text`),cn:m(n[`input-cn`],`input-cn`,`text`),check_private_key:n[`input-check-private-key`],extended_key_usage:n[`input-extended-key-usage`],locations:{paths:n[`input-locations-paths`],trust_stores:n[`input-locations-trust-stores`]},subject_alternative_names:n[`input-subject-alternative-names`],update_window_days:n[`input-update-window-days`],compliance_status:m(n[`input-compliance-status`],`input-compliance-status`,`text`),connection_id:m(n[`input-connection-id`],`input-connection-id`,`text`),last_seen:m(n[`input-last-seen`],`input-last-seen`,`text`),os:m(n[`input-os`],`input-os`,`text`),overall:m(n[`input-overall`],`input-overall`,`text`),sensor_config:m(n[`input-sensor-config`],`input-sensor-config`,`text`),state:m(n[`input-state`],`input-state`,`text`),versionOperator:m(n[`input-version-operator`],`input-version-operator`,`text`),auth_state:n[`input-auth-state`],countOperator:m(n[`input-count-operator`],`input-count-operator`,`text`),issue_count:m(n[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:m(n[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:m(n[`input-risk-level`],`input-risk-level`,`text`),scoreOperator:m(n[`input-score-operator`],`input-score-operator`,`text`),total_score:n[`input-total-score`],active_threats:n[`input-active-threats`],infected:n[`input-infected`],is_active:n[`input-is-active`],network_status:m(n[`input-network-status`],`input-network-status`,`text`),operational_state:m(n[`input-operational-state`],`input-operational-state`,`text`),score:n[`input-score`]},match:f(n.match,`match`),name:m(n.name,`name`,`text`),schedule:m(n.schedule,`schedule`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.devices.posture.rules.create({...u,account_id:l})),{successLabel:`Created`})})};function ss(e){return e.usage(`$0 zero-trust devices posture rules delete <rule-id>
379
384
 
380
- 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 ls={command:`delete <rule-id>`,describe:`Delete email scanner rule`,builder:cs,handler:async n=>l({command:`zero-trust dlp email rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
381
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.email.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function us(e){return e.usage(`$0 zero-trust dlp email rules get <rule-id>
385
+ 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 cs={command:`delete <rule-id>`,describe:`Delete posture rule`,builder:ss,handler:async n=>l({command:`zero-trust devices posture rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
386
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.posture.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function ls(e){return e.usage(`$0 zero-trust devices posture rules get <rule-id>
382
387
 
383
- 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 ds={command:`get <rule-id>`,describe:`Get an email scanner rule`,builder:us,handler:async n=>l({command:`zero-trust dlp email rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.email.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function fs(e){return e.usage(`$0 zero-trust dlp email rules list
388
+ 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 us={command:`get <rule-id>`,describe:`Get posture rule`,builder:ls,handler:async n=>l({command:`zero-trust devices posture rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.posture.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function ds(e){return e.usage(`$0 zero-trust devices posture rules list
384
389
 
385
- Lists all email scanner rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ps={command:`list`,describe:`List all email scanner rules`,builder:fs,handler:async n=>l({command:`zero-trust dlp email rules list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.email.rules.list({account_id:l})),{successLabel:`Loaded`})})};function ms(e){return e.usage(`$0 zero-trust dlp email rules update <rule-id>
390
+ Fetches device posture rules for a Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fs={command:`list`,describe:`List posture rules`,builder:ds,handler:async n=>l({command:`zero-trust devices posture rules list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.posture.rules.list({account_id:l})),{successLabel:`Loaded`})})};function ps(e){return e.usage(`$0 zero-trust devices posture rules update <rule-id>
386
391
 
387
- Updates a DLP email scanning rule.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`action-action`,{type:`string`,description:`The action.action field`,choices:[`Block`]}).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 hs={command:`update <rule-id>`,describe:`Update email scanner rule`,builder:ms,handler:async n=>l({command:`zero-trust dlp email rules update`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.email.rules.update({body:e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}if(n[`action-action`]===void 0&&(n[`action-action`]=await _(`action-action`,`The action.action field`,[`Block`])),n.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.email.rules.update({body:u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},gs={command:`rules`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(os).command(ss).command(ls).command(ds).command(ps).command(hs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_s={command:`email`,describe:`Operations for dlp.email`,builder:e=>e.command(is).command(gs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vs(e){return e.usage(`$0 zero-trust dlp entries create
392
+ Updates a device posture rule.`).positional(`rule-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).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`]}).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:[`<`,`<=`,`>`,`>=`,`==`]}).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`]}).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`]}).option(`input-version-operator`,{type:`string`,description:`Version Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).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:[`<`,`<=`,`>`,`>=`,`==`]}).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`]}).option(`input-score-operator`,{type:`string`,description:`Score Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).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`]}).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`]}).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`]}).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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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 ms={command:`update <rule-id>`,describe:`Update posture rule`,builder:ps,handler:async n=>l({command:`zero-trust devices posture rules update`,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`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices posture rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/posture/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),expiration:m(n.expiration,`expiration`,`text`),input:{exists:n[`input-exists`],operating_system:m(n[`input-operating-system`],`input-operating-system`,`text`),path:m(n[`input-path`],`input-path`,`text`),sha256:m(n[`input-sha256`],`input-sha256`,`text`),thumbprint:m(n[`input-thumbprint`],`input-thumbprint`,`text`),id:m(n[`input-id`],`input-id`,`text`),domain:m(n[`input-domain`],`input-domain`,`text`),operator:m(n[`input-operator`],`input-operator`,`text`),os_distro_name:m(n[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:m(n[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:m(n[`input-os-version-extra`],`input-os-version-extra`,`text`),version:m(n[`input-version`],`input-version`,`text`),enabled:n[`input-enabled`],checkDisks:n[`input-check-disks`],requireAll:n[`input-require-all`],certificate_id:m(n[`input-certificate-id`],`input-certificate-id`,`text`),cn:m(n[`input-cn`],`input-cn`,`text`),check_private_key:n[`input-check-private-key`],extended_key_usage:n[`input-extended-key-usage`],locations:{paths:n[`input-locations-paths`],trust_stores:n[`input-locations-trust-stores`]},subject_alternative_names:n[`input-subject-alternative-names`],update_window_days:n[`input-update-window-days`],compliance_status:m(n[`input-compliance-status`],`input-compliance-status`,`text`),connection_id:m(n[`input-connection-id`],`input-connection-id`,`text`),last_seen:m(n[`input-last-seen`],`input-last-seen`,`text`),os:m(n[`input-os`],`input-os`,`text`),overall:m(n[`input-overall`],`input-overall`,`text`),sensor_config:m(n[`input-sensor-config`],`input-sensor-config`,`text`),state:m(n[`input-state`],`input-state`,`text`),versionOperator:m(n[`input-version-operator`],`input-version-operator`,`text`),auth_state:n[`input-auth-state`],countOperator:m(n[`input-count-operator`],`input-count-operator`,`text`),issue_count:m(n[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:m(n[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:m(n[`input-risk-level`],`input-risk-level`,`text`),scoreOperator:m(n[`input-score-operator`],`input-score-operator`,`text`),total_score:n[`input-total-score`],active_threats:n[`input-active-threats`],infected:n[`input-infected`],is_active:n[`input-is-active`],network_status:m(n[`input-network-status`],`input-network-status`,`text`),operational_state:m(n[`input-operational-state`],`input-operational-state`,`text`),score:n[`input-score`]},match:f(n.match,`match`),name:m(n.name,`name`,`text`),schedule:m(n.schedule,`schedule`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.posture.rules.update({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`The name of the device posture rule.`)),n.type===void 0&&(n.type=await _(`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=p({description:m(n.description,`description`,`text`),expiration:m(n.expiration,`expiration`,`text`),input:{exists:n[`input-exists`],operating_system:m(n[`input-operating-system`],`input-operating-system`,`text`),path:m(n[`input-path`],`input-path`,`text`),sha256:m(n[`input-sha256`],`input-sha256`,`text`),thumbprint:m(n[`input-thumbprint`],`input-thumbprint`,`text`),id:m(n[`input-id`],`input-id`,`text`),domain:m(n[`input-domain`],`input-domain`,`text`),operator:m(n[`input-operator`],`input-operator`,`text`),os_distro_name:m(n[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:m(n[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:m(n[`input-os-version-extra`],`input-os-version-extra`,`text`),version:m(n[`input-version`],`input-version`,`text`),enabled:n[`input-enabled`],checkDisks:n[`input-check-disks`],requireAll:n[`input-require-all`],certificate_id:m(n[`input-certificate-id`],`input-certificate-id`,`text`),cn:m(n[`input-cn`],`input-cn`,`text`),check_private_key:n[`input-check-private-key`],extended_key_usage:n[`input-extended-key-usage`],locations:{paths:n[`input-locations-paths`],trust_stores:n[`input-locations-trust-stores`]},subject_alternative_names:n[`input-subject-alternative-names`],update_window_days:n[`input-update-window-days`],compliance_status:m(n[`input-compliance-status`],`input-compliance-status`,`text`),connection_id:m(n[`input-connection-id`],`input-connection-id`,`text`),last_seen:m(n[`input-last-seen`],`input-last-seen`,`text`),os:m(n[`input-os`],`input-os`,`text`),overall:m(n[`input-overall`],`input-overall`,`text`),sensor_config:m(n[`input-sensor-config`],`input-sensor-config`,`text`),state:m(n[`input-state`],`input-state`,`text`),versionOperator:m(n[`input-version-operator`],`input-version-operator`,`text`),auth_state:n[`input-auth-state`],countOperator:m(n[`input-count-operator`],`input-count-operator`,`text`),issue_count:m(n[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:m(n[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:m(n[`input-risk-level`],`input-risk-level`,`text`),scoreOperator:m(n[`input-score-operator`],`input-score-operator`,`text`),total_score:n[`input-total-score`],active_threats:n[`input-active-threats`],infected:n[`input-infected`],is_active:n[`input-is-active`],network_status:m(n[`input-network-status`],`input-network-status`,`text`),operational_state:m(n[`input-operational-state`],`input-operational-state`,`text`),score:n[`input-score`]},match:f(n.match,`match`),name:m(n.name,`name`,`text`),schedule:m(n.schedule,`schedule`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.devices.posture.rules.update({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},hs={command:`rules`,describe:`Operations for devices.posture.rules`,builder:e=>e.command(os).command(cs).command(us).command(fs).command(ms).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gs={command:`posture`,describe:`Operations for devices.posture`,builder:e=>e.command(is).command(hs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _s(e){return e.usage(`$0 zero-trust devices profiles custom create
388
393
 
389
- 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`]}).option(`profile-id`,{type:`string`,description:`The profile_id field`}).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 ys={command:`create`,describe:`Create custom entry`,builder:vs,handler:async n=>l({command:`zero-trust dlp entries create`,classification:{safeFlags:[`enabled`,`pattern-validation`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},profile_id:m(n[`profile-id`],`profile-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`)),n[`pattern-regex`]===void 0&&(n[`pattern-regex`]=await g(`pattern-regex`,`The pattern.regex field`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},profile_id:m(n[`profile-id`],`profile-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.create({...u,account_id:l})),{successLabel:`Created`})})};function bs(e){return e.usage(`$0 zero-trust dlp entries custom update <entry-id>
394
+ 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`]}).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(`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(`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".`}).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`}).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 vs={command:`create`,describe:`Create a device settings profile`,builder:_s,handler:async n=>l({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`,`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`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices profiles custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policy`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({allow_mode_switch:n[`allow-mode-switch`],allow_updates:n[`allow-updates`],allowed_to_leave:n[`allowed-to-leave`],auto_connect:n[`auto-connect`],browser_extension_config:{proxy_control:m(n[`browser-extension-config-proxy-control`],`browser-extension-config-proxy-control`,`text`),proxy_enabled:n[`browser-extension-config-proxy-enabled`]},captive_portal:n[`captive-portal`],default:n.default,disable_auto_fallback:n[`disable-auto-fallback`],dns_search_suffixes:f(n[`dns-search-suffixes`],`dns-search-suffixes`),enabled:n.enabled,exclude:f(n.exclude,`exclude`),exclude_office_ips:n[`exclude-office-ips`],global_acceleration:{api_endpoints:n[`global-acceleration-api-endpoints`],autoswitch:n[`global-acceleration-autoswitch`],enabled:n[`global-acceleration-enabled`],masque_endpoints:n[`global-acceleration-masque-endpoints`],wireguard_endpoints:n[`global-acceleration-wireguard-endpoints`]},include:f(n.include,`include`),lan_allow_minutes:n[`lan-allow-minutes`],lan_allow_subnet_size:n[`lan-allow-subnet-size`],match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,profile_type:m(n[`profile-type`],`profile-type`,`text`),register_interface_ip_with_dns:n[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:n[`sccm-vpn-boundary-support`],service_mode_v2:{mode:m(n[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:n[`service-mode-v2-port`]},support_url:m(n[`support-url`],`support-url`,`text`),switch_locked:n[`switch-locked`],tunnel_protocol:m(n[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:n[`uninstall-protection`],virtual_networks:{allowed:n[`virtual-networks-allowed`],default:m(n[`virtual-networks-default`],`virtual-networks-default`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.devices.profiles.custom.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name of the device settings profile.`));let u=p({allow_mode_switch:n[`allow-mode-switch`],allow_updates:n[`allow-updates`],allowed_to_leave:n[`allowed-to-leave`],auto_connect:n[`auto-connect`],browser_extension_config:{proxy_control:m(n[`browser-extension-config-proxy-control`],`browser-extension-config-proxy-control`,`text`),proxy_enabled:n[`browser-extension-config-proxy-enabled`]},captive_portal:n[`captive-portal`],default:n.default,disable_auto_fallback:n[`disable-auto-fallback`],dns_search_suffixes:f(n[`dns-search-suffixes`],`dns-search-suffixes`),enabled:n.enabled,exclude:f(n.exclude,`exclude`),exclude_office_ips:n[`exclude-office-ips`],global_acceleration:{api_endpoints:n[`global-acceleration-api-endpoints`],autoswitch:n[`global-acceleration-autoswitch`],enabled:n[`global-acceleration-enabled`],masque_endpoints:n[`global-acceleration-masque-endpoints`],wireguard_endpoints:n[`global-acceleration-wireguard-endpoints`]},include:f(n.include,`include`),lan_allow_minutes:n[`lan-allow-minutes`],lan_allow_subnet_size:n[`lan-allow-subnet-size`],match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,profile_type:m(n[`profile-type`],`profile-type`,`text`),register_interface_ip_with_dns:n[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:n[`sccm-vpn-boundary-support`],service_mode_v2:{mode:m(n[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:n[`service-mode-v2-port`]},support_url:m(n[`support-url`],`support-url`,`text`),switch_locked:n[`switch-locked`],tunnel_protocol:m(n[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:n[`uninstall-protection`],virtual_networks:{allowed:n[`virtual-networks-allowed`],default:m(n[`virtual-networks-default`],`virtual-networks-default`,`text`)}});o(await c(`Creating`,async()=>i.zeroTrust.devices.profiles.custom.create({...u,account_id:l})),{successLabel:`Created`})})};function ys(e){return e.usage(`$0 zero-trust devices profiles custom delete <policy-id>
390
395
 
391
- Updates a DLP custom entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description 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`]}).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 xs={command:`update <entry-id>`,describe:`Update custom entry`,builder:bs,handler:async n=>l({command:`zero-trust dlp entries custom update`,classification:{safeFlags:[`pattern-validation`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/custom/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},enabled:n.enabled}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.custom.update({...e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.name===void 0&&(n.name=await g(`name`,`The name field`)),n[`pattern-regex`]===void 0&&(n[`pattern-regex`]=await g(`pattern-regex`,`The pattern.regex field`)),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},enabled:n.enabled});o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.custom.update({...u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Ss={command:`custom`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(xs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cs(e){return e.usage(`$0 zero-trust dlp entries delete <entry-id>
396
+ 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 bs={command:`delete <policy-id>`,describe:`Delete a device settings profile`,builder:ys,handler:async n=>l({command:`zero-trust devices profiles custom delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policy/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
397
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.profiles.custom.delete({account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Deleted`})})};function xs(e){return e.usage(`$0 zero-trust devices profiles custom get <policy-id>
392
398
 
393
- 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 ws={command:`delete <entry-id>`,describe:`Delete custom entry`,builder:Cs,handler:async n=>l({command:`zero-trust dlp entries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
394
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.entries.delete({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Deleted`})})};function Ts(e){return e.usage(`$0 zero-trust dlp entries get <entry-id>
399
+ 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 Ss={command:`get <policy-id>`,describe:`Get device settings profile by ID`,builder:xs,handler:async n=>l({command:`zero-trust devices profiles custom get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices profiles custom get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policy/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.profiles.custom.get({account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Loaded`})})};function Cs(e){return e.usage(`$0 zero-trust devices profiles custom list
395
400
 
396
- 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 Es={command:`get <entry-id>`,describe:`Get DLP Entry`,builder:Ts,handler:async n=>l({command:`zero-trust dlp entries get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.entries.get({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Loaded`})})};function Ds(e){return e.usage(`$0 zero-trust dlp entries integration create
401
+ Fetches a list of the device settings profiles for an account.`).option(`profile-type`,{type:`string`,description:`Filter profiles by client type. When omitted, only WARP profiles are returned.`,choices:[`warp`,`browser_extension`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ws={command:`list`,describe:`List device settings profiles`,builder:y(Cs),handler:async n=>l({command:`zero-trust devices profiles custom list`,classification:{safeFlags:[`profile-type`,`dry-run`]}},n,async()=>{let i={profile_type:n[`profile-type`]};if(n.dryRun){s({command:`cf zero-trust devices profiles custom list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policies`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.profiles.custom.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Ts(e){return e.usage(`$0 zero-trust devices profiles custom update <policy-id>
397
402
 
398
- Integration entries can't be created, this will update an existing integration entry. This is needed for our generated terraform API.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`entry-id`,{type:`string`,description:`The entry_id field`}).option(`profile-id`,{type:`string`,description:`This field is not used as the owning profile.
399
- For predefined entries it is already set to a predefined profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`This endpoint will update an existing integration entry. It is not possible to create new integration entries.`})}const Os={command:`create`,describe:`Create integration entry`,builder:Ds,handler:async n=>l({command:`zero-trust dlp entries integration create`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries integration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/integration`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({enabled:n.enabled,entry_id:m(n[`entry-id`],`entry-id`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.integration.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n[`entry-id`]===void 0&&(n[`entry-id`]=await g(`entry-id`,`The entry_id field`));let u=p({enabled:n.enabled,entry_id:m(n[`entry-id`],`entry-id`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.integration.create({body:u,account_id:l})),{successLabel:`Created`})})};function ks(e){return e.usage(`$0 zero-trust dlp entries integration delete <entry-id>
403
+ Updates a configured device settings profile.`).positional(`policy-id`,{type:`string`,description:`Policy ID`,demandOption:!0}).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(`browser-extension-config-proxy-control`,{type:`string`,description:`Whether the user may disable the browser extension proxy.`,choices:[`unlocked`,`locked`]}).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.`}).option(`default`,{type:`boolean`,description:`Whether the policy is the account default. WARP group profiles cannot set this field.`}).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`."}).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(`enabled`,{type:`boolean`,description:`Whether the policy will be applied to matching devices.`}).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(`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".`}).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(`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([`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 Es={command:`update <policy-id>`,describe:`Update a device settings profile`,builder:Ts,handler:async n=>l({command:`zero-trust devices profiles custom update`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`,`default`,`disable-auto-fallback`,`enabled`,`exclude-office-ips`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`register-interface-ip-with-dns`,`sccm-vpn-boundary-support`,`switch-locked`,`uninstall-protection`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices profiles custom update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policy/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({allow_mode_switch:n[`allow-mode-switch`],allow_updates:n[`allow-updates`],allowed_to_leave:n[`allowed-to-leave`],auto_connect:n[`auto-connect`],browser_extension_config:{proxy_control:m(n[`browser-extension-config-proxy-control`],`browser-extension-config-proxy-control`,`text`),proxy_enabled:n[`browser-extension-config-proxy-enabled`]},captive_portal:n[`captive-portal`],default:n.default,description:m(n.description,`description`,`text`),disable_auto_fallback:n[`disable-auto-fallback`],dns_search_suffixes:f(n[`dns-search-suffixes`],`dns-search-suffixes`),enabled:n.enabled,exclude:f(n.exclude,`exclude`),exclude_office_ips:n[`exclude-office-ips`],global_acceleration:{api_endpoints:n[`global-acceleration-api-endpoints`],autoswitch:n[`global-acceleration-autoswitch`],enabled:n[`global-acceleration-enabled`],masque_endpoints:n[`global-acceleration-masque-endpoints`],wireguard_endpoints:n[`global-acceleration-wireguard-endpoints`]},include:f(n.include,`include`),lan_allow_minutes:n[`lan-allow-minutes`],lan_allow_subnet_size:n[`lan-allow-subnet-size`],match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,register_interface_ip_with_dns:n[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:n[`sccm-vpn-boundary-support`],service_mode_v2:{mode:m(n[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:n[`service-mode-v2-port`]},support_url:m(n[`support-url`],`support-url`,`text`),switch_locked:n[`switch-locked`],tunnel_protocol:m(n[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:n[`uninstall-protection`],virtual_networks:{allowed:n[`virtual-networks-allowed`],default:m(n[`virtual-networks-default`],`virtual-networks-default`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.profiles.custom.update({...e,account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Updated`});return}let u=p({allow_mode_switch:n[`allow-mode-switch`],allow_updates:n[`allow-updates`],allowed_to_leave:n[`allowed-to-leave`],auto_connect:n[`auto-connect`],browser_extension_config:{proxy_control:m(n[`browser-extension-config-proxy-control`],`browser-extension-config-proxy-control`,`text`),proxy_enabled:n[`browser-extension-config-proxy-enabled`]},captive_portal:n[`captive-portal`],default:n.default,description:m(n.description,`description`,`text`),disable_auto_fallback:n[`disable-auto-fallback`],dns_search_suffixes:f(n[`dns-search-suffixes`],`dns-search-suffixes`),enabled:n.enabled,exclude:f(n.exclude,`exclude`),exclude_office_ips:n[`exclude-office-ips`],global_acceleration:{api_endpoints:n[`global-acceleration-api-endpoints`],autoswitch:n[`global-acceleration-autoswitch`],enabled:n[`global-acceleration-enabled`],masque_endpoints:n[`global-acceleration-masque-endpoints`],wireguard_endpoints:n[`global-acceleration-wireguard-endpoints`]},include:f(n.include,`include`),lan_allow_minutes:n[`lan-allow-minutes`],lan_allow_subnet_size:n[`lan-allow-subnet-size`],match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,register_interface_ip_with_dns:n[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:n[`sccm-vpn-boundary-support`],service_mode_v2:{mode:m(n[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:n[`service-mode-v2-port`]},support_url:m(n[`support-url`],`support-url`,`text`),switch_locked:n[`switch-locked`],tunnel_protocol:m(n[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:n[`uninstall-protection`],virtual_networks:{allowed:n[`virtual-networks-allowed`],default:m(n[`virtual-networks-default`],`virtual-networks-default`,`text`)}});o(await c(`Updating`,async()=>i.zeroTrust.devices.profiles.custom.update({...u,account_id:l,policy_id:n[`policy-id`]})),{successLabel:`Updated`})})},Ds={command:`custom`,describe:`Operations for devices.profiles.custom`,builder:e=>e.command(vs).command(bs).command(Ss).command(ws).command(Es).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Os(e){return e.usage(`$0 zero-trust devices profiles default get
400
404
 
401
- This is a no-op as integration entires can't be deleted but is needed for our generated terraform API.`).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 As={command:`delete <entry-id>`,describe:`Delete integration entry`,builder:ks,handler:async n=>l({command:`zero-trust dlp entries integration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries integration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/integration/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
402
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.entries.integration.delete({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Deleted`})})};function js(e){return e.usage(`$0 zero-trust dlp entries integration update <entry-id>
405
+ Fetches the default device settings profile for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ks={command:`get`,describe:`Get the default device settings profile`,builder:Os,handler:async n=>l({command:`zero-trust devices profiles default get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices profiles default get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policy`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.profiles.default.get({account_id:l})),{successLabel:`Loaded`})})};function As(e){return e.usage(`$0 zero-trust devices profiles default update
403
406
 
404
- 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:`Enable or disable integration entry in owning profile.`})}const Ms={command:`update <entry-id>`,describe:`Update integration entry`,builder:js,handler:async n=>l({command:`zero-trust dlp entries integration update`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries integration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/integration/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({enabled:n.enabled}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.integration.update({body:e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({enabled:n.enabled});o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.integration.update({body:u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Ns={command:`integration`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Os).command(As).command(Ms).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ps(e){return e.usage(`$0 zero-trust dlp entries list
407
+ 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(`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 js={command:`update`,describe:`Update the default device settings profile`,builder:As,handler:async n=>l({command:`zero-trust devices profiles default update`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`disable-auto-fallback`,`exclude-office-ips`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`register-interface-ip-with-dns`,`sccm-vpn-boundary-support`,`switch-locked`,`uninstall-protection`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices profiles default update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/policy`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({allow_mode_switch:n[`allow-mode-switch`],allow_updates:n[`allow-updates`],allowed_to_leave:n[`allowed-to-leave`],auto_connect:n[`auto-connect`],captive_portal:n[`captive-portal`],disable_auto_fallback:n[`disable-auto-fallback`],dns_search_suffixes:f(n[`dns-search-suffixes`],`dns-search-suffixes`),exclude:f(n.exclude,`exclude`),exclude_office_ips:n[`exclude-office-ips`],global_acceleration:{api_endpoints:n[`global-acceleration-api-endpoints`],autoswitch:n[`global-acceleration-autoswitch`],enabled:n[`global-acceleration-enabled`],masque_endpoints:n[`global-acceleration-masque-endpoints`],wireguard_endpoints:n[`global-acceleration-wireguard-endpoints`]},include:f(n.include,`include`),lan_allow_minutes:n[`lan-allow-minutes`],lan_allow_subnet_size:n[`lan-allow-subnet-size`],register_interface_ip_with_dns:n[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:n[`sccm-vpn-boundary-support`],service_mode_v2:{mode:m(n[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:n[`service-mode-v2-port`]},support_url:m(n[`support-url`],`support-url`,`text`),switch_locked:n[`switch-locked`],tunnel_protocol:m(n[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:n[`uninstall-protection`],virtual_networks:{allowed:n[`virtual-networks-allowed`],default:m(n[`virtual-networks-default`],`virtual-networks-default`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.profiles.default.update({...e,account_id:l})),{successLabel:`Updated`});return}let u=p({allow_mode_switch:n[`allow-mode-switch`],allow_updates:n[`allow-updates`],allowed_to_leave:n[`allowed-to-leave`],auto_connect:n[`auto-connect`],captive_portal:n[`captive-portal`],disable_auto_fallback:n[`disable-auto-fallback`],dns_search_suffixes:f(n[`dns-search-suffixes`],`dns-search-suffixes`),exclude:f(n.exclude,`exclude`),exclude_office_ips:n[`exclude-office-ips`],global_acceleration:{api_endpoints:n[`global-acceleration-api-endpoints`],autoswitch:n[`global-acceleration-autoswitch`],enabled:n[`global-acceleration-enabled`],masque_endpoints:n[`global-acceleration-masque-endpoints`],wireguard_endpoints:n[`global-acceleration-wireguard-endpoints`]},include:f(n.include,`include`),lan_allow_minutes:n[`lan-allow-minutes`],lan_allow_subnet_size:n[`lan-allow-subnet-size`],register_interface_ip_with_dns:n[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:n[`sccm-vpn-boundary-support`],service_mode_v2:{mode:m(n[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:n[`service-mode-v2-port`]},support_url:m(n[`support-url`],`support-url`,`text`),switch_locked:n[`switch-locked`],tunnel_protocol:m(n[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:n[`uninstall-protection`],virtual_networks:{allowed:n[`virtual-networks-allowed`],default:m(n[`virtual-networks-default`],`virtual-networks-default`,`text`)}});o(await c(`Updating`,async()=>i.zeroTrust.devices.profiles.default.update({...u,account_id:l})),{successLabel:`Updated`})})},Ms={command:`default`,describe:`Operations for devices.profiles.default`,builder:e=>e.command(ks).command(js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ns={command:`profiles`,describe:`Operations for devices.profiles`,builder:e=>e.command(Ds).command(Ms).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ps(e){return e.usage(`$0 zero-trust devices registrations bulk-delete
405
408
 
406
- Lists all DLP entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fs={command:`list`,describe:`List all entries`,builder:Ps,handler:async n=>l({command:`zero-trust dlp entries list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.entries.list({account_id:l})),{successLabel:`Loaded`})})};function Is(e){return e.usage(`$0 zero-trust dlp entries predefined create
409
+ 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 Fs={command:`bulk-delete`,describe:`Delete registrations`,builder:Ps,handler:async n=>l({command:`zero-trust devices registrations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{let i={id:n.id};if(n.dryRun){s({command:`cf zero-trust devices registrations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/registrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,!await v({force:!!n.force})){process.stderr.write(`Aborted.
410
+ `);return}o(await c(`Deleting`,async()=>l.zeroTrust.devices.registrations.bulkDelete({account_id:u,...i})),{successLabel:`Deleted`})})};function Is(e){return e.usage(`$0 zero-trust devices registrations delete <registration-id>
407
411
 
408
- Predefined entries can't be created, this will update an existing predefined entry. This is needed for our generated terraform API.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`entry-id`,{type:`string`,description:`The entry_id field`}).option(`profile-id`,{type:`string`,description:`This field is not used as the owning profile.
409
- For predefined entries it is already set to a predefined profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`This endpoint will update an existing predefined entry. It is not possible to create new predefined entries.`})}const Ls={command:`create`,describe:`Create predefined entry`,builder:Is,handler:async n=>l({command:`zero-trust dlp entries predefined create`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries predefined create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/predefined`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({enabled:n.enabled,entry_id:m(n[`entry-id`],`entry-id`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.predefined.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n[`entry-id`]===void 0&&(n[`entry-id`]=await g(`entry-id`,`The entry_id field`));let u=p({enabled:n.enabled,entry_id:m(n[`entry-id`],`entry-id`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.predefined.create({body:u,account_id:l})),{successLabel:`Created`})})};function Rs(e){return e.usage(`$0 zero-trust dlp entries predefined delete <entry-id>
412
+ 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 Ls={command:`delete <registration-id>`,describe:`Delete registration`,builder:Is,handler:async n=>l({command:`zero-trust devices registrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices registrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/registrations/${n[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(n[`registration-id`]))}`,pathParams:{"registration-id":String(n[`registration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
413
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.registrations.delete({account_id:l,registration_id:n[`registration-id`]})),{successLabel:`Deleted`})})};function Rs(e){return e.usage(`$0 zero-trust devices registrations get <registration-id>
410
414
 
411
- This is a no-op as predefined entires can't be deleted but is needed for our generated terraform API.`).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 zs={command:`delete <entry-id>`,describe:`Delete predefined entry`,builder:Rs,handler:async n=>l({command:`zero-trust dlp entries predefined delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries predefined delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/predefined/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
412
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.entries.predefined.delete({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Deleted`})})};function Bs(e){return e.usage(`$0 zero-trust dlp entries predefined update <entry-id>
415
+ 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 zs={command:`get <registration-id>`,describe:`Get registration`,builder:Rs,handler:async n=>l({command:`zero-trust devices registrations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={include:n.include};if(n.dryRun){s({command:`cf zero-trust devices registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/registrations/${n[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(n[`registration-id`]))}`,pathParams:{"registration-id":String(n[`registration-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.registrations.get({account_id:u,registration_id:n[`registration-id`],...i})),{successLabel:`Loaded`})})};function Bs(e){return e.usage(`$0 zero-trust devices registrations list
413
416
 
414
- 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:`Settings to enable or disable predefined entry in owning profile.`})}const Vs={command:`update <entry-id>`,describe:`Update predefined entry`,builder:Bs,handler:async n=>l({command:`zero-trust dlp entries predefined update`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries predefined update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/predefined/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({enabled:n.enabled}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.predefined.update({body:e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({enabled:n.enabled});o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.predefined.update({body:u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Hs={command:`predefined`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Ls).command(zs).command(Vs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Us(e){return e.usage(`$0 zero-trust dlp entries update <entry-id>
417
+ Lists WARP registrations.`).option(`user-id`,{type:`string`,description:`Filter by user ID.`}).option(`seen-after`,{type:`string`,description:`Filter by the last_seen timestamp - returns only registrations last seen after this timestamp.`}).option(`seen-before`,{type:`string`,description:`Filter by the last_seen timestamp - returns only registrations last seen before this timestamp.`}).option(`status`,{type:`string`,description:`Filter by registration status. Defaults to 'active'.`,choices:[`active`,`all`,`revoked`]}).option(`registration-type`,{type:`string`,description:`Filter by registration client type.`,choices:[`warp`,`browser_extension`]}).option(`per-page`,{type:`number`,description:`The maximum number of devices to return in a single response.`}).option(`search`,{type:`string`,description:`Filter by registration details.`}).option(`sort-by`,{type:`string`,description:`The registration field to order results by.`,choices:[`id`,`user.name`,`user.email`,`last_seen_at`,`created_at`]}).option(`sort-order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`cursor`,{type:`string`,description:`Opaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.`}).option(`id`,{type:`string`,description:`Filter by registration ID.`}).option(`device-id`,{type:`string`,description:`Filter by WARP device ID.`}).option(`policy-id`,{type:`string`,description:`Filter by the ID of the device settings profile assigned to the registration.`}).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 Vs={command:`list`,describe:`List registrations`,builder:y(Bs),handler:async n=>l({command:`zero-trust devices registrations list`,classification:{safeFlags:[`status`,`registration-type`,`sort-by`,`sort-order`,`dry-run`]}},n,async()=>{let i={"user.id":n[`user-id`],seen_after:n[`seen-after`],seen_before:n[`seen-before`],status:n.status,registration_type:n[`registration-type`],per_page:n[`per-page`],search:n.search,sort_by:n[`sort-by`],sort_order:n[`sort-order`],cursor:n.cursor,id:n.id,"device.id":n[`device-id`],"policy.id":n[`policy-id`],include:n.include};if(n.dryRun){s({command:`cf zero-trust devices registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/registrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.devices.registrations.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Hs(e){return e.usage(`$0 zero-trust devices registrations override-codes get <registration-id>
415
418
 
416
- Updates a DLP entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description 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`]}).option(`type`,{type:`string`,description:`The type field`,choices:[`custom`,`predefined`,`integration`]}).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 Ws={command:`update <entry-id>`,describe:`Update entry`,builder:Us,handler:async n=>l({command:`zero-trust dlp entries update`,classification:{safeFlags:[`pattern-validation`,`type`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},type:m(n.type,`type`,`text`),enabled:n.enabled}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.update({body:e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.type===void 0&&(n.type=await _(`type`,`The type field`,[`custom`,`predefined`,`integration`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},type:m(n.type,`type`,`text`),enabled:n.enabled});o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.update({body:u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Gs={command:`entries`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(ys).command(ws).command(Es).command(Fs).command(Ws).command(Ss).command(Ns).command(Hs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ks(e){return e.usage(`$0 zero-trust dlp limits list
419
+ 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 Us={command:`get <registration-id>`,describe:`Get override codes`,builder:Hs,handler:async n=>l({command:`zero-trust devices registrations override-codes get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices registrations override-codes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/registrations/${n[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(n[`registration-id`]))}/override_codes`,pathParams:{"registration-id":String(n[`registration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.registrations.overrideCodes.get({account_id:l,registration_id:n[`registration-id`]})),{successLabel:`Loaded`})})},Ws={command:`override-codes`,describe:`Operations for devices.registrations.override-codes`,builder:e=>e.command(Us).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Gs={command:`registrations`,describe:`Operations for devices.registrations`,builder:e=>e.command(Fs).command(Ls).command(zs).command(Vs).command(Ws).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ks(e){return e.usage(`$0 zero-trust devices settings delete
417
420
 
418
- 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 qs={command:`list`,describe:`Fetch limits associated with DLP for account`,builder:Ks,handler:async n=>l({command:`zero-trust dlp limits list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/limits`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.limits.list({account_id:l})),{successLabel:`Loaded`})})},Js={command:`limits`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ys(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 Xs={command:`validate`,describe:`Validate a DLP regex pattern`,builder:Ys,handler:async n=>l({command:`zero-trust dlp patterns validate`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp patterns validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/patterns/validate`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({max_match_bytes:n[`max-match-bytes`],regex:m(n.regex,`regex`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.patterns.validate({...e,account_id:l})),{successLabel:`Created`});return}n.regex===void 0&&(n.regex=await g(`regex`,`The regex field`));let u=p({max_match_bytes:n[`max-match-bytes`],regex:m(n.regex,`regex`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.patterns.validate({...u,account_id:l})),{successLabel:`Created`})})},Zs={command:`patterns`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Xs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qs(e){return e.usage(`$0 zero-trust dlp payload-logs get
421
+ 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 qs={command:`delete`,describe:`Reset device settings`,builder:Ks,handler:async n=>l({command:`zero-trust devices settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
422
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.devices.settings.delete({account_id:l})),{successLabel:`Deleted`})})};function Js(e){return e.usage(`$0 zero-trust devices settings get
419
423
 
420
- Gets the current payload logging configuration for DLP, showing whether matched content is being logged.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $s={command:`get`,describe:`Get payload log settings`,builder:Qs,handler:async n=>l({command:`zero-trust dlp payload-logs get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp payload-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/payload_log`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.payloadLogs.get({account_id:l})),{successLabel:`Loaded`})})};function ec(e){return e.usage(`$0 zero-trust dlp payload-logs update
424
+ 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 Ys={command:`get`,describe:`Get device settings`,builder:Js,handler:async n=>l({command:`zero-trust devices settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.devices.settings.get({account_id:l})),{successLabel:`Loaded`})})};function Xs(e){return e.usage(`$0 zero-trust devices settings update
421
425
 
422
- Enables or disables payload logging for DLP matches. When enabled, matched content is stored for review.`).option(`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`]}).option(`public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
426
+ Updates the device settings for a Zero Trust account.`).option(`disable-for-time`,{type:`number`,description:`Sets the time limit, in seconds, that a user can use an override code to bypass WARP.`}).option(`external-emergency-signal-enabled`,{type:`boolean`,description:`Controls whether the external emergency disconnect feature is enabled.`}).option(`external-emergency-signal-fingerprint`,{type:`string`,description:`The SHA256 fingerprint (64 hexadecimal characters) of the HTTPS server certificate for the external_emergency_signal_url. If provided, the WARP client will use this value to verify the server's identity. The device will ignore any response if the server's certificate fingerprint does not exactly match this value.`}).option(`external-emergency-signal-interval`,{type:`string`,description:`The interval at which the WARP client fetches the emergency disconnect signal, formatted as a duration string (e.g., "5m", "2m30s", "1h"). Minimum 30 seconds.`}).option(`external-emergency-signal-url`,{type:`string`,description:`The HTTPS URL from which to fetch the emergency disconnect signal. Must use HTTPS and have an IPv4 or IPv6 address as the host.`}).option(`gateway-proxy-enabled`,{type:`boolean`,description:`Enable gateway proxy filtering on TCP.`}).option(`gateway-udp-proxy-enabled`,{type:`boolean`,description:`Enable gateway proxy filtering on UDP.`}).option(`root-certificate-installation-enabled`,{type:`boolean`,description:`Enable installation of cloudflare managed root certificate.`}).option(`use-zt-virtual-ip`,{type:`boolean`,description:`Enable using CGNAT virtual IPv4.`}).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 Zs={command:`update`,describe:`Update device settings`,builder:Xs,handler:async n=>l({command:`zero-trust devices settings update`,classification:{safeFlags:[`external-emergency-signal-enabled`,`gateway-proxy-enabled`,`gateway-udp-proxy-enabled`,`root-certificate-installation-enabled`,`use-zt-virtual-ip`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices settings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({disable_for_time:n[`disable-for-time`],external_emergency_signal_enabled:n[`external-emergency-signal-enabled`],external_emergency_signal_fingerprint:m(n[`external-emergency-signal-fingerprint`],`external-emergency-signal-fingerprint`,`text`),external_emergency_signal_interval:m(n[`external-emergency-signal-interval`],`external-emergency-signal-interval`,`text`),external_emergency_signal_url:m(n[`external-emergency-signal-url`],`external-emergency-signal-url`,`text`),gateway_proxy_enabled:n[`gateway-proxy-enabled`],gateway_udp_proxy_enabled:n[`gateway-udp-proxy-enabled`],root_certificate_installation_enabled:n[`root-certificate-installation-enabled`],use_zt_virtual_ip:n[`use-zt-virtual-ip`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.settings.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({disable_for_time:n[`disable-for-time`],external_emergency_signal_enabled:n[`external-emergency-signal-enabled`],external_emergency_signal_fingerprint:m(n[`external-emergency-signal-fingerprint`],`external-emergency-signal-fingerprint`,`text`),external_emergency_signal_interval:m(n[`external-emergency-signal-interval`],`external-emergency-signal-interval`,`text`),external_emergency_signal_url:m(n[`external-emergency-signal-url`],`external-emergency-signal-url`,`text`),gateway_proxy_enabled:n[`gateway-proxy-enabled`],gateway_udp_proxy_enabled:n[`gateway-udp-proxy-enabled`],root_certificate_installation_enabled:n[`root-certificate-installation-enabled`],use_zt_virtual_ip:n[`use-zt-virtual-ip`]});o(await c(`Updating`,async()=>i.zeroTrust.devices.settings.update({body:u,account_id:l})),{successLabel:`Updated`})})},Qs={command:`settings`,describe:`Operations for devices.settings`,builder:e=>e.command(qs).command(Ys).command(Zs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $s(e){return e.usage(`$0 zero-trust devices update <device-id>
423
427
 
424
- - Set to null or empty string to disable payload logging.
425
- - Set to a non-empty base64 string to enable payload logging with the given key.
428
+ Updates properties of 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ec={command:`update <device-id>`,describe:`Update device`,builder:$s,handler:async n=>l({command:`zero-trust devices update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust devices update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/devices/physical-devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}`,pathParams:{"device-id":String(n[`device-id`]??``)},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.devices.update({...e,account_id:l,device_id:n[`device-id`]})),{successLabel:`Updated`});return}o(await c(`Updating`,async()=>i.zeroTrust.devices.update({account_id:l,device_id:n[`device-id`]})),{successLabel:`Updated`})})},tc={command:`devices`,describe:`Operations for devices`,builder:e=>e.command(to).command(bo).command(No).command(ec).command($a).command(po).command(vo).command(jo).command(Wo).command(qo).command(gs).command(Ns).command(Gs).command(Qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nc(e){return e.usage(`$0 zero-trust dex colos list
426
429
 
427
- For customers with configurable payload masking feature rolled out:
428
- - If the field is missing, the existing setting will be kept. Note that this is different from setting to null or empty string.
430
+ List Cloudflare colos that account's devices were connected to during a time period, sorted by usage starting from the most used colo. Colos without traffic are also returned and sorted alphabetically.`).option(`from`,{type:`string`,description:`Start time for connection period in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for connection period in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`sort-by`,{type:`string`,description:`Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically.`,choices:[`fleet-status-usage`,`application-tests-usage`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rc={command:`list`,describe:`List Cloudflare colos`,builder:y(nc),handler:async n=>l({command:`zero-trust dex colos list`,classification:{safeFlags:[`sort-by`,`dry-run`]}},n,async()=>{let i={from:n.from,to:n.to,sortBy:n[`sort-by`]};if(n.dryRun){s({command:`cf zero-trust dex colos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/colos`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.colos.list({account_id:u,...i})),{successLabel:`Loaded`})})},ic={command:`colos`,describe:`Operations for dex.colos`,builder:e=>e.command(rc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ac(e){return e.usage(`$0 zero-trust dex commands create
429
431
 
430
- For all other customers:
431
- - If the field is missing, the existing setting will be cleared.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`New payload log settings.`})}const tc={command:`update`,describe:`Set payload log settings`,builder:ec,handler:async n=>l({command:`zero-trust dlp payload-logs update`,classification:{safeFlags:[`masking-level`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp payload-logs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/payload_log`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({masking_level:m(n[`masking-level`],`masking-level`,`text`),public_key:m(n[`public-key`],`public-key`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.payloadLogs.update({...e,account_id:l})),{successLabel:`Updated`});return}let u=p({masking_level:m(n[`masking-level`],`masking-level`,`text`),public_key:m(n[`public-key`],`public-key`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.payloadLogs.update({...u,account_id:l})),{successLabel:`Updated`})})},nc={command:`payload-logs`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command($s).command(tc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rc(e){return e.usage(`$0 zero-trust dlp profiles custom create
432
+ Initiate commands for up to 10 devices per account.`).option(`commands`,{type:`string`,description:`List of device-level commands to execute. 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 oc={command:`create`,describe:`Create account commands`,builder:ac,handler:async n=>l({command:`zero-trust dex commands create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex commands create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({commands:f(n.commands,`commands`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dex.commands.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.commands===void 0)throw Error(`--commands is required (or pass --body with this field set).`);let u=p({commands:f(n.commands,`commands`)});o(await c(`Creating`,async()=>i.zeroTrust.dex.commands.create({...u,account_id:l})),{successLabel:`Created`})})};function sc(e){return e.usage(`$0 zero-trust dex commands eligible-devices list
432
433
 
433
- 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 ic={command:`create`,describe:`Create custom profile`,builder:rc,handler:async n=>l({command:`zero-trust dlp profiles custom create`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.profiles.custom.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.profiles.custom.create({...u,account_id:l})),{successLabel:`Created`})})};function ac(e){return e.usage(`$0 zero-trust dlp profiles custom delete <profile-id>
434
+ List devices with WARP client support for remote captures which have been connected in the last 1 hour.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`search`,{type:`string`,description:`Filter devices by name or email.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cc={command:`list`,describe:`List devices eligible for remote captures`,builder:sc,handler:async n=>l({command:`zero-trust dex commands eligible-devices list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],search:n.search};if(n.dryRun){s({command:`cf zero-trust dex commands eligible-devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands/devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.commands.eligibleDevices.list({account_id:u,...i})),{successLabel:`Loaded`})})},lc={command:`eligible-devices`,describe:`Operations for dex.commands.eligible-devices`,builder:e=>e.command(cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function uc(e){return e.usage(`$0 zero-trust dex commands list
434
435
 
435
- 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 oc={command:`delete <profile-id>`,describe:`Delete custom profile`,builder:ac,handler:async n=>l({command:`zero-trust dlp profiles custom delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
436
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.profiles.custom.delete({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Deleted`})})};function sc(e){return e.usage(`$0 zero-trust dlp profiles custom get <profile-id>
436
+ Retrieves a paginated list of commands issued to devices under the specified account, optionally filtered by time range, device, or other parameters`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`}).option(`device-id`,{type:`string`,description:`Unique identifier for a device.`}).option(`user-email`,{type:`string`,description:`Email tied to the device.`}).option(`command-type`,{type:`string`,description:`Optionally filter executed commands by command type.`,choices:[`pcap`,`speed-test`,`warp-diag`]}).option(`status`,{type:`string`,description:`Optionally filter executed commands by status.`,choices:[`PENDING_EXEC`,`PENDING_UPLOAD`,`SUCCESS`,`FAILED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dc={command:`list`,describe:`List account commands`,builder:y(uc),handler:async n=>l({command:`zero-trust dex commands list`,classification:{safeFlags:[`command-type`,`status`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],from:n.from,to:n.to,device_id:n[`device-id`],user_email:n[`user-email`],command_type:n[`command-type`],status:n.status};if(n.dryRun){s({command:`cf zero-trust dex commands list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.commands.list({account_id:u,...i})),{successLabel:`Loaded`})})};function fc(e){return e.usage(`$0 zero-trust dex commands quota get
437
437
 
438
- Fetches a custom DLP profile by id.`).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 cc={command:`get <profile-id>`,describe:`Get custom profile`,builder:sc,handler:async n=>l({command:`zero-trust dlp profiles custom get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.profiles.custom.get({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Loaded`})})};function lc(e){return e.usage(`$0 zero-trust dlp profiles custom update <profile-id>
438
+ Retrieves the current quota usage and limits for device commands within a specific account, including the time when the quota will reset`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pc={command:`get`,describe:`Returns account commands usage, quota, and reset time`,builder:fc,handler:async n=>l({command:`zero-trust dex commands quota get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex commands quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands/quota`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.commands.quota.get({account_id:l})),{successLabel:`Loaded`})})},mc={command:`quota`,describe:`Operations for dex.commands.quota`,builder:e=>e.command(pc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hc(e){return e.usage(`$0 zero-trust dex commands results get <filename>
439
439
 
440
- 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.
441
- 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 uc={command:`update <profile-id>`,describe:`Update custom profile`,builder:lc,handler:async n=>l({command:`zero-trust dlp profiles custom update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.custom.update({...e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.custom.update({...u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`})})},dc={command:`custom`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(ic).command(oc).command(cc).command(uc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function fc(e){return e.usage(`$0 zero-trust dlp profiles get <profile-id>
440
+ Downloads artifacts for an executed command. Bulk downloads are not supported`).positional(`filename`,{type:`string`,description:"The name of the file to be downloaded, including the `.zip` extension.",demandOption:!0}).option(`command-id`,{type:`string`,description:`Unique identifier for command.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const gc={command:`get <filename>`,describe:`Download command output file`,builder:hc,handler:async n=>l({command:`zero-trust dex commands results get`,classification:{safeFlags:[`dry-run`,`text`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex commands results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/commands/${n[`command-id`]==null?`<command-id>`:encodeURIComponent(String(n[`command-id`]))}/downloads/${n.filename==null?`<filename>`:encodeURIComponent(String(n.filename))}`,pathParams:{"command-id":String(n[`command-id`]??``),filename:String(n.filename??``)},bodyKind:`none`});return}await a(n);let i=n.local?e:await r();n.accountId=i;let o=await c(`Loading`,async()=>te(`/accounts/${i}/dex/commands/${encodeURIComponent(String(n[`command-id`]))}/downloads/${encodeURIComponent(String(n.filename))}`,{method:`GET`,local:n.local===!0,persistTo:n.persistTo}));ee(n.text===!0?o.toString(`utf-8`):o)})},_c={command:`results`,describe:`Operations for dex.commands.results`,builder:e=>e.command(gc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vc={command:`commands`,describe:`Operations for dex.commands`,builder:e=>e.command(oc).command(dc).command(lc).command(mc).command(_c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function yc(e){return e.usage(`$0 zero-trust dex devices aggregates live get
442
441
 
443
- Fetches a DLP profile by ID.`).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 pc={command:`get <profile-id>`,describe:`Get DLP Profile`,builder:fc,handler:async n=>l({command:`zero-trust dlp profiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.profiles.get({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Loaded`})})};function mc(e){return e.usage(`$0 zero-trust dlp profiles list
442
+ Get details for live (up to 60 minutes) devices using WARP.`).option(`since-minutes`,{type:`number`,description:`Number of minutes before current time.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bc={command:`get`,describe:`Get live aggregate device details by dimension`,builder:yc,handler:async n=>l({command:`zero-trust dex devices aggregates live get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={since_minutes:n[`since-minutes`]};if(n.dryRun){s({command:`cf zero-trust dex devices aggregates live get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/fleet-status/live`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.aggregates.live.get({account_id:u,...i})),{successLabel:`Loaded`})})},xc={command:`live`,describe:`Operations for dex.devices.aggregates.live`,builder:e=>e.command(bc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sc(e){return e.usage(`$0 zero-trust dex devices aggregates over-time get
444
443
 
445
- Lists all DLP profiles in an account.`).option(`all`,{type:`boolean`,description:`Return all profiles, including those that current account does not have access to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hc={command:`list`,describe:`List all profiles`,builder:mc,handler:async n=>l({command:`zero-trust dlp profiles list`,classification:{safeFlags:[`all`,`dry-run`]}},n,async()=>{let i={all:n.all};if(n.dryRun){s({command:`cf zero-trust dlp profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dlp.profiles.list({account_id:u,...i})),{successLabel:`Loaded`})})};function gc(e){return e.usage(`$0 zero-trust dlp profiles predefined create <profile-id>
444
+ Get aggregate details for devices using WARP, up to 7 days.`).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Cloudflare colo airport code.`}).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cc={command:`get`,describe:`Get over time aggregate details for devices by dimension`,builder:Sc,handler:async n=>l({command:`zero-trust dex devices aggregates over-time get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={to:n.to,from:n.from,colo:n.colo,device_id:n[`device-id`]};if(n.dryRun){s({command:`cf zero-trust dex devices aggregates over-time get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/fleet-status/over-time`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.aggregates.overTime.get({account_id:u,...i})),{successLabel:`Loaded`})})},wc={command:`over-time`,describe:`Operations for dex.devices.aggregates.over-time`,builder:e=>e.command(Cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tc={command:`aggregates`,describe:`Operations for dex.devices.aggregates`,builder:e=>e.command(xc).command(wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ec(e){return e.usage(`$0 zero-trust dex devices get <device-id>
446
445
 
447
- This is similar to \`update_predefined\` but only returns entries that are enabled. This is needed for our terraform API Creates a DLP predefined profile. Only supports enabling/disabling entries.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`,default:!1}).option(`allowed-match-count`,{type:`number`,description:`The allowed_match_count field`,default:0}).option(`confidence-threshold`,{type:`string`,description:`The confidence_threshold field`,default:`low`}).option(`enabled-entries`,{type:`string`,array:!0,description:`The enabled_entries field`}).option(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Predefined profiles can not be created. This endpoint will only update an existing predefined profiles settings.`})}const _c={command:`create <profile-id>`,describe:`Create predefined profile`,builder:gc,handler:async n=>l({command:`zero-trust dlp profiles predefined create`,classification:{safeFlags:[`ai-context-enabled`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles predefined create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}/config`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),enabled_entries:n[`enabled-entries`],entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.profiles.predefined.create({body:e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Created`});return}let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),enabled_entries:n[`enabled-entries`],entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]});o(await c(`Creating`,async()=>i.zeroTrust.dlp.profiles.predefined.create({body:u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Created`})})};function vc(e){return e.usage(`$0 zero-trust dlp profiles predefined delete <profile-id>
446
+ Get the latest status of a device given device_id from the device_state table.`).positional(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`since-minutes`,{type:`number`,description:`Number of minutes before current time.`,demandOption:!0}).option(`time-now`,{type:`string`,description:`Current time in ISO format.`}).option(`colo`,{type:`string`,description:`List of data centers to filter results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dc={command:`get <device-id>`,describe:`Get the latest status of a device.`,builder:Ec,handler:async n=>l({command:`zero-trust dex devices get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={since_minutes:n[`since-minutes`],time_now:n[`time-now`],colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}/fleet-status/live`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.get({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})};function Oc(e){return e.usage(`$0 zero-trust dex devices list
448
447
 
449
- This is a no-op as predefined profiles can't be deleted but is needed for our generated terraform API.`).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 yc={command:`delete <profile-id>`,describe:`Delete predefined profile`,builder:vc,handler:async n=>l({command:`zero-trust dlp profiles predefined delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles predefined delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
450
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.profiles.predefined.delete({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Deleted`})})};function bc(e){return e.usage(`$0 zero-trust dlp profiles predefined get <profile-id>
448
+ List details of devices using WARP.`).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`sort-by`,{type:`string`,description:`Dimension to sort results by.`,choices:[`colo`,`device_id`,`mode`,`platform`,`status`,`timestamp`,`version`]}).option(`colo`,{type:`string`,description:`Cloudflare colo airport code.`}).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`}).option(`device-mode`,{type:`string`,description:`The mode under which the WARP client is run.`}).option(`status`,{type:`string`,description:`Network status.`}).option(`platform`,{type:`string`,description:`Operating system.`}).option(`warp-version`,{type:`string`,description:`WARP client version.`}).option(`source`,{type:`string`,description:"Source:\n * `hourly` - device details aggregated hourly, up to 7 days prior\n * `last_seen` - device details, up to 60 minutes prior. Time windows exceeding 60 minutes will be rejected from June 1st, 2026. Please use 'hourly' or 'raw' instead for longer time ranges.\n * `raw` - device details, up to 7 days prior",choices:[`last_seen`,`hourly`,`raw`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kc={command:`list`,describe:`List details of devices using WARP.`,builder:y(Oc),handler:async n=>l({command:`zero-trust dex devices list`,classification:{safeFlags:[`sort-by`,`source`,`dry-run`]}},n,async()=>{let i={to:n.to,from:n.from,page:n.page,per_page:n[`per-page`],sort_by:n[`sort-by`],colo:n.colo,device_id:n[`device-id`],mode:n[`device-mode`],status:n.status,platform:n.platform,version:n[`warp-version`],source:n.source};if(n.dryRun){s({command:`cf zero-trust dex devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/fleet-status/devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Ac(e){return e.usage(`$0 zero-trust dex devices over-time get <device-id>
451
449
 
452
- This is similar to \`get_predefined\` but only returns entries that are enabled. This is needed for our terraform API Fetches a predefined DLP profile by id.`).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 xc={command:`get <profile-id>`,describe:`Get predefined profile config`,builder:bc,handler:async n=>l({command:`zero-trust dlp profiles predefined get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles predefined get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}/config`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.profiles.predefined.get({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Loaded`})})};function Sc(e){return e.usage(`$0 zero-trust dlp profiles predefined update <profile-id>
450
+ Get time-bucketed status metrics for a specific device.`).positional(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`List of data centers to filter results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jc={command:`get <device-id>`,describe:`Get the status over time for a device`,builder:y(Ac),handler:async n=>l({command:`zero-trust dex devices over-time get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={from:n.from,to:n.to,interval:n.interval,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex devices over-time get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}/fleet-status/over-time`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.devices.overTime.get({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})},Mc={command:`over-time`,describe:`Operations for dex.devices.over-time`,builder:e=>e.command(jc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nc={command:`devices`,describe:`Operations for dex.devices`,builder:e=>e.command(Dc).command(kc).command(Tc).command(Mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pc(e){return e.usage(`$0 zero-trust dex isps list
453
451
 
454
- This is similar to \`update_predefined\` but only returns entries that are enabled. This is needed for our terraform API Updates a DLP predefined profile. Only supports enabling/disabling entries.`).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(`enabled-entries`,{type:`string`,array:!0,description:`The enabled_entries field`}).option(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`}).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 predefined profile.`})}const Cc={command:`update <profile-id>`,describe:`Update predefined profile config`,builder:Sc,handler:async n=>l({command:`zero-trust dlp profiles predefined update`,classification:{safeFlags:[`ai-context-enabled`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles predefined update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}/config`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),enabled_entries:n[`enabled-entries`],entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.predefined.update({body:e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`});return}let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),enabled_entries:n[`enabled-entries`],entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]});o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.predefined.update({body:u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`})})},wc={command:`predefined`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(_c).command(yc).command(xc).command(Cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tc={command:`profiles`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(pc).command(hc).command(dc).command(wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ec(e){return e.usage(`$0 zero-trust dlp sensitivity-group-templates get <template-id>
452
+ List ISP information observed for a specific device during traceroute tests.`).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results. Mutually exclusive with cursor.`}).option(`per-page`,{type:`number`,description:`Number of items per page`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Cursor for cursor-based pagination. Mutually exclusive with page.`}).option(`sort-by`,{type:`string`,description:`The field to sort results by.`,choices:[`time_start`]}).option(`sort-order`,{type:`string`,description:`The order to sort results.`,choices:[`ASC`,`DESC`]}).option(`from`,{type:`string`,description:`Start time for the query in ISO 8601 format.`}).option(`to`,{type:`string`,description:`End time for the query in ISO 8601 format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fc={command:`list`,describe:`List device ISPs`,builder:y(Pc),handler:async n=>l({command:`zero-trust dex isps list`,classification:{safeFlags:[`sort-by`,`sort-order`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],cursor:n.cursor,sort_by:n[`sort-by`],sort_order:n[`sort-order`],from:n.from,to:n.to};if(n.dryRun){s({command:`cf zero-trust dex isps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/${n[`device-id`]==null?`<device-id>`:encodeURIComponent(String(n[`device-id`]))}/isps`,pathParams:{"device-id":String(n[`device-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.isps.list({account_id:u,device_id:n[`device-id`],...i})),{successLabel:`Loaded`})})},Ic={command:`isps`,describe:`Operations for dex.isps`,builder:e=>e.command(Fc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lc(e){return e.usage(`$0 zero-trust dex overview tests list
455
453
 
456
- Gets an available sensitivity group template.`).positional(`template-id`,{type:`string`,description:`Template ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dc={command:`get <template-id>`,describe:`Retrieve a specific sensitivity group template.`,builder:Ec,handler:async n=>l({command:`zero-trust dlp sensitivity-group-templates get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-group-templates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/templates/${n[`template-id`]==null?`<template-id>`:encodeURIComponent(String(n[`template-id`]))}`,pathParams:{"template-id":String(n[`template-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroupTemplates.get({account_id:l,template_id:n[`template-id`]})),{successLabel:`Loaded`})})};function Oc(e){return e.usage(`$0 zero-trust dlp sensitivity-group-templates list
454
+ List DEX tests with overview metrics.`).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`registration-id`,{type:`string`,description:`Optionally filter results to a specific device registration. Must be used in combination with a single deviceId.`}).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`kind`,{type:`string`,description:`Filter by test type.`,choices:[`http`,`traceroute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rc={command:`list`,describe:`List DEX test analytics`,builder:y(Lc),handler:async n=>l({command:`zero-trust dex overview tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},n,async()=>{let i={colo:n.colo,testName:n[`test-name`],deviceId:n[`device-id`],registration_id:n[`registration-id`],page:n.page,per_page:n[`per-page`],kind:n.kind};if(n.dryRun){s({command:`cf zero-trust dex overview tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/tests/overview`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.overview.tests.list({account_id:u,...i})),{successLabel:`Loaded`})})};function zc(e){return e.usage(`$0 zero-trust dex overview tests unique-devices get
457
455
 
458
- Lists available sensitivity group templates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kc={command:`list`,describe:`Retrieve all sensitivity group templates in an account`,builder:Oc,handler:async n=>l({command:`zero-trust dlp sensitivity-group-templates list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-group-templates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/templates`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroupTemplates.list({account_id:l})),{successLabel:`Loaded`})})},Ac={command:`sensitivity-group-templates`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Dc).command(kc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups create
456
+ Returns unique count of devices that have run synthetic application monitoring tests in the past 7 days.`).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bc={command:`get`,describe:`Get count of devices targeted`,builder:zc,handler:async n=>l({command:`zero-trust dex overview tests unique-devices get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={testName:n[`test-name`],deviceId:n[`device-id`]};if(n.dryRun){s({command:`cf zero-trust dex overview tests unique-devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/tests/unique-devices`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.overview.tests.uniqueDevices.get({account_id:u,...i})),{successLabel:`Loaded`})})},Vc={command:`unique-devices`,describe:`Operations for dex.overview.tests.unique-devices`,builder:e=>e.command(Bc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Hc={command:`tests`,describe:`Operations for dex.overview.tests`,builder:e=>e.command(Rc).command(Vc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Uc={command:`overview`,describe:`Operations for dex.overview`,builder:e=>e.command(Hc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wc(e){return e.usage(`$0 zero-trust dex rules create
459
457
 
460
- 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 Mc={command:`create`,describe:`Creates a new sensitivity group.`,builder:jc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`),template_id:m(n[`template-id`],`template-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityGroups.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`),template_id:m(n[`template-id`],`template-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityGroups.create({...u,account_id:l})),{successLabel:`Created`})})};function Nc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups delete <sensitivity-group-id>
458
+ 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 $={command:`create`,describe:`Create a DEX Rule`,builder:Wc,handler:async n=>l({command:`zero-trust dex rules create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dex.rules.create({...e,account_id:l})),{successLabel:`Created`});return}n.match===void 0&&(n.match=await g(`match`,`The wirefilter expression to match.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the Rule.`));let u=p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dex.rules.create({...u,account_id:l})),{successLabel:`Created`})})};function Gc(e){return e.usage(`$0 zero-trust dex rules delete <rule-id>
461
459
 
462
- 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 Pc={command:`delete <sensitivity-group-id>`,describe:`Delete a single sensitivity group.`,builder:Nc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
463
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.sensitivityGroups.delete({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Deleted`})})};function Fc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get-level-order <sensitivity-group-id>
460
+ 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 Kc={command:`delete <rule-id>`,describe:`Delete a DEX Rule`,builder:Gc,handler:async n=>l({command:`zero-trust dex rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
461
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dex.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function qc(e){return e.usage(`$0 zero-trust dex rules get <rule-id>
464
462
 
465
- 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 Ic={command:`get-level-order <sensitivity-group-id>`,describe:`Retrieve the ordered list of level IDs for a sensitivity group.`,builder:Fc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups get-level-order`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups get-level-order`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroups.getLevelOrder({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Loaded`})})};function Lc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get <sensitivity-group-id>
463
+ 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 Jc={command:`get <rule-id>`,describe:`Get DEX Rule`,builder:qc,handler:async n=>l({command:`zero-trust dex rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function Yc(e){return e.usage(`$0 zero-trust dex rules list
466
464
 
467
- Gets 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})}const Rc={command:`get <sensitivity-group-id>`,describe:`Retrieve a specific sensitivity group.`,builder:Lc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroups.get({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Loaded`})})};function zc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups list
465
+ List DEX Rules.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`sort-order`,{type:`string`,description:`Sort direction for sort_by property.`,choices:[`ASC`,`DESC`]}).option(`sort-by`,{type:`string`,description:`Which property to sort results by.`,choices:[`name`,`created_at`,`updated_at`]}).option(`name`,{type:`string`,description:`Filter results by rule name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xc={command:`list`,describe:`List DEX Rules`,builder:y(Yc),handler:async n=>l({command:`zero-trust dex rules list`,classification:{safeFlags:[`sort-order`,`sort-by`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],sort_order:n[`sort-order`],sort_by:n[`sort-by`],name:n.name};if(n.dryRun){s({command:`cf zero-trust dex rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.rules.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Zc(e){return e.usage(`$0 zero-trust dex rules update <rule-id>
468
466
 
469
- Lists sensitivity groups configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bc={command:`list`,describe:`Retrieve all sensitivity groups in an account`,builder:zc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroups.list({account_id:l})),{successLabel:`Loaded`})})};function Vc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups update-level-order <sensitivity-group-id>
467
+ Update a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,demandOption:!0}).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 Qc={command:`update <rule-id>`,describe:`Update a DEX Rule`,builder:Zc,handler:async n=>l({command:`zero-trust dex rules update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dex.rules.update({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),match:m(n.match,`match`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dex.rules.update({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},$c={command:`rules`,describe:`Operations for dex.rules`,builder:e=>e.command($).command(Kc).command(Jc).command(Xc).command(Qc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function el(e){return e.usage(`$0 zero-trust dex test-results http get <test-id>
470
468
 
471
- Updates the order of sensitivity levels in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`level-ids`,{type:`string`,array:!0,description:`The level_ids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired ordered list of level IDs.`})}const Hc={command:`update-level-order <sensitivity-group-id>`,describe:`Set the ordering of levels within a sensitivity group.`,builder:Vc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups update-level-order`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups update-level-order`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({level_ids:n[`level-ids`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.updateLevelOrder({body:e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`});return}if(n[`level-ids`]===void 0)throw Error(`--level-ids is required (or pass --body with this field set).`);let u=p({level_ids:n[`level-ids`]});o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.updateLevelOrder({body:u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`})})};function Uc(e){return e.usage(`$0 zero-trust dlp sensitivity-groups update <sensitivity-group-id>
469
+ Get test details and aggregate performance metrics for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tl={command:`get <test-id>`,describe:`Get details and aggregate metrics for an http test`,builder:y(el),handler:async n=>l({command:`zero-trust dex test-results http get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,interval:n.interval,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results http get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/http-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.http.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})};function nl(e){return e.usage(`$0 zero-trust dex test-results http percentiles get <test-id>
472
470
 
473
- Updates a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`levels`,{type:`string`,description:"The desired final state of levels.\n- `None` (omitted): no level changes.\n- `Some([])`: delete all levels.\n- `Some([...])`: desired final set + order. Provide as a JSON array of objects or @path/to/file.json."}).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 group to update.`})}const Wc={command:`update <sensitivity-group-id>`,describe:`Update the attributes of a single sensitivity group.`,builder:Uc,handler:async n=>l({command:`zero-trust dlp sensitivity-groups update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.update({...e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.update({...u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`})})},Gc={command:`sensitivity-groups`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(Mc).command(Pc).command(Rc).command(Ic).command(Bc).command(Wc).command(Hc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Kc(e){return e.usage(`$0 zero-trust dlp sensitivity-levels create <sensitivity-group-id>
471
+ Get percentiles for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rl={command:`get <test-id>`,describe:`Get percentiles for an http test`,builder:nl,handler:async n=>l({command:`zero-trust dex test-results http percentiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results http percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/http-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}/percentiles`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.http.percentiles.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})},il={command:`percentiles`,describe:`Operations for dex.test-results.http.percentiles`,builder:e=>e.command(rl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},al={command:`http`,describe:`Operations for dex.test-results.http`,builder:e=>e.command(tl).command(il).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ol(e){return e.usage(`$0 zero-trust dex test-results traceroute get <test-id>
474
472
 
475
- 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 qc={command:`create <sensitivity-group-id>`,describe:`Creates a new sensitivity level.`,builder:Kc,handler:async n=>l({command:`zero-trust dlp sensitivity-levels create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityLevels.create({body:e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityLevels.create({body:u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Created`})})};function Jc(e){return e.usage(`$0 zero-trust dlp sensitivity-levels delete <sensitivity-level-id>
473
+ Get test details and aggregate performance metrics for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sl={command:`get <test-id>`,describe:`Get details and aggregate metrics for a traceroute test`,builder:y(ol),handler:async n=>l({command:`zero-trust dex test-results traceroute get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,interval:n.interval,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results traceroute get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.traceroute.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})};function cl(e){return e.usage(`$0 zero-trust dex test-results traceroute network-path get <test-result-id>
476
474
 
477
- 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 Yc={command:`delete <sensitivity-level-id>`,describe:`Delete a single sensitivity level.`,builder:Jc,handler:async n=>l({command:`zero-trust dlp sensitivity-levels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels/${n[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(n[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``),"sensitivity-level-id":String(n[`sensitivity-level-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
478
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.sensitivityLevels.delete({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Deleted`})})};function Xc(e){return e.usage(`$0 zero-trust dlp sensitivity-levels get <sensitivity-level-id>
475
+ Get a breakdown of hops and performance metrics for a specific traceroute test run`).positional(`test-result-id`,{type:`string`,description:`Unique identifier for a specific traceroute test.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ll={command:`get <test-result-id>`,describe:`Get details for a specific traceroute test run`,builder:cl,handler:async n=>l({command:`zero-trust dex test-results traceroute network-path get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex test-results traceroute network-path get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-test-results/${n[`test-result-id`]==null?`<test-result-id>`:encodeURIComponent(String(n[`test-result-id`]))}/network-path`,pathParams:{"test-result-id":String(n[`test-result-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.testResults.traceroute.networkPath.get({account_id:l,test_result_id:n[`test-result-id`]})),{successLabel:`Loaded`})})},ul={command:`network-path`,describe:`Operations for dex.test-results.traceroute.network-path`,builder:e=>e.command(ll).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dl(e){return e.usage(`$0 zero-trust dex test-results traceroute percentiles get <test-id>
479
476
 
480
- 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 Zc={command:`get <sensitivity-level-id>`,describe:`Retrieve a specific sensitivity level.`,builder:Xc,handler:async n=>l({command:`zero-trust dlp sensitivity-levels get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels/${n[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(n[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``),"sensitivity-level-id":String(n[`sensitivity-level-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityLevels.get({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Loaded`})})};function Qc(e){return e.usage(`$0 zero-trust dlp sensitivity-levels list
477
+ Get percentiles for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fl={command:`get <test-id>`,describe:`Get percentiles for a traceroute test`,builder:dl,handler:async n=>l({command:`zero-trust dex test-results traceroute percentiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,colo:n.colo};if(n.dryRun){s({command:`cf zero-trust dex test-results traceroute percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}/percentiles`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.testResults.traceroute.percentiles.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})},pl={command:`percentiles`,describe:`Operations for dex.test-results.traceroute.percentiles`,builder:e=>e.command(fl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ml={command:`traceroute`,describe:`Operations for dex.test-results.traceroute`,builder:e=>e.command(sl).command(ul).command(pl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},hl={command:`test-results`,describe:`Operations for dex.test-results`,builder:e=>e.command(al).command(ml).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gl(e){return e.usage(`$0 zero-trust dex tests create
481
478
 
482
- Lists sensitivity levels in a sensitivity group.`).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 $c={command:`list`,describe:`Retrieve all sensitivity levels in a sensitivity group`,builder:Qc,handler:async n=>l({command:`zero-trust dlp sensitivity-levels list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityLevels.list({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Loaded`})})};function el(e){return e.usage(`$0 zero-trust dlp sensitivity-levels update <sensitivity-level-id>
479
+ 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`]}).option(`data-method`,{type:`string`,description:`The HTTP request method type.`,choices:[`GET`]}).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(`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 _l={command:`create`,describe:`Create Device DEX test`,builder:gl,handler:async n=>l({command:`zero-trust dex tests create`,classification:{safeFlags:[`data-kind`,`data-method`,`enabled`,`targeted`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dex.tests.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`data-host`]===void 0&&(n[`data-host`]=await g(`data-host`,`The desired endpoint to test.`)),n[`data-kind`]===void 0&&(n[`data-kind`]=await _(`data-kind`,`The type of test.`,[`http`,`traceroute`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.interval===void 0&&(n.interval=await g(`interval`,`How often the test will run.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the DEX test. Must be unique.`));let u=p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted});o(await c(`Creating`,async()=>i.zeroTrust.dex.tests.create({body:u,account_id:l})),{successLabel:`Created`})})};function vl(e){return e.usage(`$0 zero-trust dex tests delete <dex-test-id>
483
480
 
484
- 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 tl={command:`update <sensitivity-level-id>`,describe:`Update the attributes of a single sensitivity level.`,builder:el,handler:async n=>l({command:`zero-trust dlp sensitivity-levels update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels/${n[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(n[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``),"sensitivity-level-id":String(n[`sensitivity-level-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityLevels.update({...e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityLevels.update({...u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Updated`})})},nl={command:`sensitivity-levels`,describe:`Data Loss Prevention — detection profiles, custom patterns, datasets, and entry scanning rules`,builder:e=>e.command(qc).command(Yc).command(Zc).command($c).command(tl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rl={command:`dlp`,describe:`Operations for dlp`,builder:e=>e.command(Ka).command(ro).command(ho).command(bo).command(jo).command($o).command(_s).command(Gs).command(Js).command(Zs).command(nc).command(Tc).command(Ac).command(Gc).command(nl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function il(e){return e.usage(`$0 zero-trust document-fingerprints create document fingerprints
481
+ 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 yl={command:`delete <dex-test-id>`,describe:`Delete Device DEX test`,builder:vl,handler:async n=>l({command:`zero-trust dex tests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests/${n[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(n[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(n[`dex-test-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
482
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dex.tests.delete({account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Deleted`})})};function bl(e){return e.usage(`$0 zero-trust dex tests get <dex-test-id>
485
483
 
486
- 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 al={command:`fingerprints`,describe:`Creates a new document fingerprint.`,builder:il,handler:async n=>l({command:`zero-trust document-fingerprints create document fingerprints`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust document-fingerprints create document fingerprints`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.documentFingerprints.create.document.fingerprints({...e,account_id:l})),{successLabel:`Created`});return}if(n[`match-percent`]===void 0)throw Error(`--match-percent is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.documentFingerprints.create.document.fingerprints({...u,account_id:l})),{successLabel:`Created`})})},ol={command:`document`,describe:`Document Fingerprints operations`,builder:e=>e.command(al).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function sl(e){return e.usage(`$0 zero-trust document-fingerprints create v2 <document-fingerprint-id>
484
+ 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 xl={command:`get <dex-test-id>`,describe:`Get Device DEX test`,builder:bl,handler:async n=>l({command:`zero-trust dex tests get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests/${n[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(n[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(n[`dex-test-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dex.tests.get({account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Loaded`})})};function Sl(e){return e.usage(`$0 zero-trust dex tests list
487
485
 
488
- Updates metadata for an existing document fingerprint, such as its name or description.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).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 document fingerprint to update.`})}const cl={command:`v2 <document-fingerprint-id>`,describe:`Update the attributes of a single document fingerprint.`,builder:sl,handler:async n=>l({command:`zero-trust document-fingerprints create v2`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust document-fingerprints create v2`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.documentFingerprints.create.v2({...e,account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Created`});return}let u=p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.documentFingerprints.create.v2({...u,account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Created`})})},ll={command:`create`,describe:`Document Fingerprints operations`,builder:e=>e.command(cl).command(ol).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ul(e){return e.usage(`$0 zero-trust document-fingerprints delete <document-fingerprint-id>
486
+ Fetch all DEX tests.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`test-name`,{type:`string`,description:`Filter by test name.`}).option(`kind`,{type:`string`,description:`Filter by test type.`,choices:[`http`,`traceroute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cl={command:`list`,describe:`List Device DEX tests`,builder:y(Sl),handler:async n=>l({command:`zero-trust dex tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],testName:n[`test-name`],kind:n.kind};if(n.dryRun){s({command:`cf zero-trust dex tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.tests.list({account_id:u,...i})),{successLabel:`Loaded`})})};function wl(e){return e.usage(`$0 zero-trust dex tests network-path get <test-id>
489
487
 
490
- 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 dl={command:`delete <document-fingerprint-id>`,describe:`Delete a single document fingerprint.`,builder:ul,handler:async n=>l({command:`zero-trust document-fingerprints delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust document-fingerprints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
491
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.documentFingerprints.delete({account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Deleted`})})};function fl(e){return e.usage(`$0 zero-trust document-fingerprints get document fingerprints <document-fingerprint-id>
488
+ Get a breakdown of metrics by hop for individual traceroute test runs.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Device to filter traceroute result runs to.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tl={command:`get <test-id>`,describe:`Get network path breakdown for a traceroute test`,builder:y(wl),handler:async n=>l({command:`zero-trust dex tests network-path get`,classification:{safeFlags:[`interval`,`dry-run`]}},n,async()=>{let i={deviceId:n[`device-id`],from:n.from,to:n.to,interval:n.interval};if(n.dryRun){s({command:`cf zero-trust dex tests network-path get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/traceroute-tests/${n[`test-id`]==null?`<test-id>`:encodeURIComponent(String(n[`test-id`]))}/network-path`,pathParams:{"test-id":String(n[`test-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.tests.networkPath.get({account_id:u,test_id:n[`test-id`],...i})),{successLabel:`Loaded`})})},El={command:`network-path`,describe:`Operations for dex.tests.network-path`,builder:e=>e.command(Tl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Dl(e){return e.usage(`$0 zero-trust dex tests update <dex-test-id>
492
489
 
493
- 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 pl={command:`fingerprints <document-fingerprint-id>`,describe:`Retrieve data about a specific document fingerprint.`,builder:fl,handler:async n=>l({command:`zero-trust document-fingerprints get document fingerprints`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust document-fingerprints get document fingerprints`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.documentFingerprints.get.document.fingerprints({account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Loaded`})})},ml={command:`document`,describe:`Document Fingerprints operations`,builder:e=>e.command(pl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hl(e){return e.usage(`$0 zero-trust document-fingerprints get fingerprints all
490
+ Update a DEX test.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,demandOption:!0}).option(`data-host`,{type:`string`,description:`The desired endpoint to test.`}).option(`data-kind`,{type:`string`,description:`The type of test.`,choices:[`http`,`traceroute`]}).option(`data-method`,{type:`string`,description:`The HTTP request method type.`,choices:[`GET`]}).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(`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 Ol={command:`update <dex-test-id>`,describe:`Update Device DEX test`,builder:Dl,handler:async n=>l({command:`zero-trust dex tests update`,classification:{safeFlags:[`data-kind`,`data-method`,`enabled`,`targeted`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dex tests update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/devices/dex_tests/${n[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(n[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(n[`dex-test-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dex.tests.update({body:e,account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Updated`});return}if(n[`data-host`]===void 0&&(n[`data-host`]=await g(`data-host`,`The desired endpoint to test.`)),n[`data-kind`]===void 0&&(n[`data-kind`]=await _(`data-kind`,`The type of test.`,[`http`,`traceroute`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.interval===void 0&&(n.interval=await g(`interval`,`How often the test will run.`)),n.name===void 0&&(n.name=await g(`name`,`The name of the DEX test. Must be unique.`));let u=p({data:{host:m(n[`data-host`],`data-host`,`text`),kind:m(n[`data-kind`],`data-kind`,`text`),method:m(n[`data-method`],`data-method`,`text`)},description:m(n.description,`description`,`text`),enabled:n.enabled,interval:m(n.interval,`interval`,`text`),name:m(n.name,`name`,`text`),targeted:n.targeted});o(await c(`Updating`,async()=>i.zeroTrust.dex.tests.update({body:u,account_id:l,dex_test_id:n[`dex-test-id`]})),{successLabel:`Updated`})})},kl={command:`tests`,describe:`Operations for dex.tests`,builder:e=>e.command(_l).command(yl).command(xl).command(Cl).command(Ol).command(El).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Al(e){return e.usage(`$0 zero-trust dex warp-change-events list
494
491
 
495
- Lists all document fingerprints configured for DLP scanning in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gl={command:`all`,describe:`Retrieve data about all document fingerprints.`,builder:hl,handler:async n=>l({command:`zero-trust document-fingerprints get fingerprints all`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust document-fingerprints get fingerprints all`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.documentFingerprints.get.fingerprints.all({account_id:l})),{successLabel:`Loaded`})})},_l={command:`fingerprints`,describe:`Document Fingerprints operations`,builder:e=>e.command(gl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vl={command:`get`,describe:`Operations for document-fingerprints.get`,builder:e=>e.command(ml).command(_l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function yl(e){return e.usage(`$0 zero-trust document-fingerprints update <document-fingerprint-id>
492
+ List WARP configuration and enablement toggle change events by device.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter events by type 'config' or 'toggle'.`,choices:[`config`,`toggle`]}).option(`toggle`,{type:`string`,description:`Filter events by type toggle value. Applicable to type='toggle' events only.`,choices:[`on`,`off`]}).option(`config-name`,{type:`string`,description:`Filter events by WARP configuration name changed from or to. Applicable to type='config' events only.`}).option(`account-name`,{type:`string`,description:`Filter events by account name.`}).option(`sort-order`,{type:`string`,description:`Sort response by event timestamp.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jl={command:`list`,describe:`List WARP change events.`,builder:y(Al),handler:async n=>l({command:`zero-trust dex warp-change-events list`,classification:{safeFlags:[`type`,`toggle`,`sort-order`,`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`],from:n.from,to:n.to,type:n.type,toggle:n.toggle,config_name:n[`config-name`],account_name:n[`account-name`],sort_order:n[`sort-order`]};if(n.dryRun){s({command:`cf zero-trust dex warp-change-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dex/warp-change-events`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dex.warpChangeEvents.list({account_id:u,...i})),{successLabel:`Loaded`})})},Ml={command:`warp-change-events`,describe:`Operations for dex.warp-change-events`,builder:e=>e.command(jl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nl={command:`dex`,describe:`Digital Experience Monitoring — synthetic tests, fleet-wide device metrics, and network path diagnostics`,builder:e=>e.command(ic).command(vc).command(Nc).command(Ic).command(Uc).command($c).command(hl).command(kl).command(Ml).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pl(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics create
496
493
 
497
- Uploads a new document to create or update a fingerprint. The document structure is analyzed to enable detection of similar documents.`).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(`body`,{type:`string`,description:`File used for document fingerprinting.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const bl={command:`update <document-fingerprint-id>`,describe:`Uploads a new version for a document fingerprint.`,builder:yl,handler:async n=>l({command:`zero-trust document-fingerprints update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust document-fingerprints update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`multipart`,body:{body:n.body,file:n.file}});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file!==void 0||n.body!==void 0){let e=new FormData;if(n.file){let t=h(n.file);e.append(`file`,new Blob([t]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&e.append(`file`,n.body);o(await c(`Updating`,async()=>i(l,`PUT`,`/accounts/${u}/dlp/document_fingerprints/${encodeURIComponent(String(n[`document-fingerprint-id`]))}`,{body:e})),{successLabel:`Updated`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Updating`,async()=>i(l,`PUT`,`/accounts/${u}/dlp/document_fingerprints/${encodeURIComponent(String(n[`document-fingerprint-id`]))}`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},xl={command:`document-fingerprints`,describe:`Document Fingerprints operations`,builder:e=>e.command(dl).command(bl).command(ll).command(vl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sl(e){return e.usage(`$0 zero-trust gateway app-types list
494
+ 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 Fl={command:`create`,describe:`Create custom prompt topic`,builder:Pl,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics create`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`),topic:m(n.topic,`topic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.customPromptTopics.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`)),n.topic===void 0&&(n.topic=await g(`topic`,`The topic field`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),profile_id:m(n[`profile-id`],`profile-id`,`text`),topic:m(n.topic,`topic`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.customPromptTopics.create({...u,account_id:l})),{successLabel:`Created`})})};function Il(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics delete <entry-id>
498
495
 
499
- List all application and application type mappings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cl={command:`list`,describe:`List application and application type mappings`,builder:Sl,handler:async n=>l({command:`zero-trust gateway app-types list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway app-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/app_types`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.appTypes.list({account_id:l})),{successLabel:`Loaded`})})},wl={command:`app-types`,describe:`Operations for gateway.app-types`,builder:e=>e.command(Cl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Tl(e){return e.usage(`$0 zero-trust gateway audit-ssh-settings get
496
+ 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 Ll={command:`delete <entry-id>`,describe:`Delete custom prompt topic`,builder:Il,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
497
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.customPromptTopics.delete({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Deleted`})})};function Rl(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics get <entry-id>
500
498
 
501
- Retrieve all Zero Trust Audit SSH and SSH with Access for Infrastructure settings for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const El={command:`get`,describe:`Get Zero Trust SSH settings`,builder:Tl,handler:async n=>l({command:`zero-trust gateway audit-ssh-settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway audit-ssh-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/audit_ssh_settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.auditSshSettings.get({account_id:l})),{successLabel:`Loaded`})})};function Dl(e){return e.usage(`$0 zero-trust gateway audit-ssh-settings rotate-seed
499
+ 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 zl={command:`get <entry-id>`,describe:`Get custom prompt topic`,builder:Rl,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.customPromptTopics.get({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Loaded`})})};function Bl(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics list
502
500
 
503
- Rotate the SSH account seed that generates the host key identity when connecting through the Cloudflare SSH Proxy.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ol={command:`rotate-seed`,describe:`Rotate Zero Trust SSH account seed`,builder:Dl,handler:async n=>l({command:`zero-trust gateway audit-ssh-settings rotate-seed`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway audit-ssh-settings rotate-seed`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/audit_ssh_settings/rotate_seed`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.auditSshSettings.rotateSeed({account_id:l})),{successLabel:`Created`})})};function kl(e){return e.usage(`$0 zero-trust gateway audit-ssh-settings update
501
+ Lists all DLP custom prompt topic entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vl={command:`list`,describe:`List custom prompt topics`,builder:Bl,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.customPromptTopics.list({account_id:l})),{successLabel:`Loaded`})})};function Hl(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics update <entry-id>
504
502
 
505
- Update Zero Trust Audit SSH and SSH with Access for Infrastructure settings for an account.`).option(`public-key`,{type:`string`,description:`Provide the Base64-encoded HPKE public key that encrypts SSH session logs. See https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/#enable-ssh-command-logging.`}).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:`update`,describe:`Update Zero Trust SSH settings`,builder:kl,handler:async n=>l({command:`zero-trust gateway audit-ssh-settings update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway audit-ssh-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/audit_ssh_settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({public_key:m(n[`public-key`],`public-key`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.auditSshSettings.update({...e,account_id:l})),{successLabel:`Updated`});return}n[`public-key`]===void 0&&(n[`public-key`]=await g(`public-key`,`Provide the Base64-encoded HPKE public key that encrypts SSH session logs. See https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/#enable-ssh-command-logging.`));let u=p({public_key:m(n[`public-key`],`public-key`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.auditSshSettings.update({...u,account_id:l})),{successLabel:`Updated`})})},jl={command:`audit-ssh-settings`,describe:`Operations for gateway.audit-ssh-settings`,builder:e=>e.command(El).command(Ol).command(Al).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ml(e){return e.usage(`$0 zero-trust gateway categories list
503
+ Updates a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).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(`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:`Update to be applied to the custom prompt topic.`})}const Ul={command:`update <entry-id>`,describe:`Update custom prompt topic`,builder:Hl,handler:async n=>l({command:`zero-trust dlp custom-prompt-topics update`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp custom-prompt-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/custom_prompt_topics/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),topic:m(n.topic,`topic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.customPromptTopics.update({...e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`)),n.topic===void 0&&(n.topic=await g(`topic`,`The topic field`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),topic:m(n.topic,`topic`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.customPromptTopics.update({...u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Wl={command:`custom-prompt-topics`,describe:`Data Loss Prevention - manage custom prompt topics for AI-based content detection`,builder:e=>e.command(Fl).command(Ll).command(zl).command(Vl).command(Ul).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gl(e){return e.usage(`$0 zero-trust dlp data-classes create
506
504
 
507
- List all categories.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nl={command:`list`,describe:`List categories`,builder:Ml,handler:async n=>l({command:`zero-trust gateway categories list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/categories`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.categories.list({account_id:l})),{successLabel:`Loaded`})})},Pl={command:`categories`,describe:`Operations for gateway.categories`,builder:e=>e.command(Nl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fl(e){return e.usage(`$0 zero-trust gateway certificates activate <certificate-id>
505
+ 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 Kl={command:`create`,describe:`Creates a new data class`,builder:Gl,handler:async n=>l({command:`zero-trust dlp data-classes create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataClasses.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`data-tags`]===void 0)throw Error(`--data-tags is required (or pass --body with this field set).`);if(n.expression===void 0&&(n.expression=await g(`expression`,`The expression field`)),n.name===void 0&&(n.name=await g(`name`,`The name field`)),n[`sensitivity-levels`]===void 0)throw Error(`--sensitivity-levels is required (or pass --body with this field set).`);let u=p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataClasses.create({...u,account_id:l})),{successLabel:`Created`})})};function ql(e){return e.usage(`$0 zero-trust dlp data-classes delete <data-class-id>
508
506
 
509
- Bind a single Zero Trust certificate to 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 Il={command:`activate <certificate-id>`,describe:`Activate a Zero Trust certificate`,builder:Fl,handler:async n=>l({command:`zero-trust gateway certificates activate`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates activate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}/activate`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.activate({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Created`})})};function Ll(e){return e.usage(`$0 zero-trust gateway certificates create
507
+ 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 Jl={command:`delete <data-class-id>`,describe:`Delete a single data class`,builder:ql,handler:async n=>l({command:`zero-trust dlp data-classes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes/${n[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(n[`data-class-id`]))}`,pathParams:{"data-class-id":String(n[`data-class-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
508
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.dataClasses.delete({account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Deleted`})})};function Yl(e){return e.usage(`$0 zero-trust dlp data-classes get <data-class-id>
510
509
 
511
- Create a new Zero Trust certificate.`).option(`validity-period-days`,{type:`number`,description:"Sets the certificate validity period in days (range: 1-10,950 days / ~30 years). Defaults to 1,825 days (5 years). **Important**: This field is only settable during the certificate creation. Certificates becomes immutable after creation - use the `/activate` and `/deactivate` endpoints to manage certificate lifecycle."}).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 Rl={command:`create`,describe:`Create Zero Trust certificate`,builder:Ll,handler:async n=>l({command:`zero-trust gateway certificates create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({validity_period_days:n[`validity-period-days`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.create({...e,account_id:l})),{successLabel:`Created`});return}let u=p({validity_period_days:n[`validity-period-days`]});o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.create({...u,account_id:l})),{successLabel:`Created`})})};function zl(e){return e.usage(`$0 zero-trust gateway certificates deactivate <certificate-id>
510
+ 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 Xl={command:`get <data-class-id>`,describe:`Retrieve a specific data class`,builder:Yl,handler:async n=>l({command:`zero-trust dlp data-classes get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes/${n[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(n[`data-class-id`]))}`,pathParams:{"data-class-id":String(n[`data-class-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataClasses.get({account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Loaded`})})};function Zl(e){return e.usage(`$0 zero-trust dlp data-classes list
512
511
 
513
- 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 Bl={command:`deactivate <certificate-id>`,describe:`Deactivate a Zero Trust certificate`,builder:zl,handler:async n=>l({command:`zero-trust gateway certificates deactivate`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates deactivate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}/deactivate`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.deactivate({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Created`})})};function Vl(e){return e.usage(`$0 zero-trust gateway certificates delete <certificate-id>
512
+ Lists data classes configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ql={command:`list`,describe:`Retrieve all data classes in an account`,builder:Zl,handler:async n=>l({command:`zero-trust dlp data-classes list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataClasses.list({account_id:l})),{successLabel:`Loaded`})})};function $l(e){return e.usage(`$0 zero-trust dlp data-classes update <data-class-id>
514
513
 
515
- 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 Hl={command:`delete <certificate-id>`,describe:`Delete Zero Trust certificate`,builder:Vl,handler:async n=>l({command:`zero-trust gateway certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
516
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.certificates.delete({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Deleted`})})};function Ul(e){return e.usage(`$0 zero-trust gateway certificates get <certificate-id>
514
+ Updates the configuration for a data class.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).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 data class to update.`})}const eu={command:`update <data-class-id>`,describe:`Update the attributes of a single data class`,builder:$l,handler:async n=>l({command:`zero-trust dlp data-classes update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-classes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_classes/${n[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(n[`data-class-id`]))}`,pathParams:{"data-class-id":String(n[`data-class-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataClasses.update({...e,account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Updated`});return}let u=p({data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),expression:m(n.expression,`expression`,`text`),name:m(n.name,`name`,`text`),sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataClasses.update({...u,account_id:l,data_class_id:n[`data-class-id`]})),{successLabel:`Updated`})})},tu={command:`data-classes`,describe:`Data Loss Prevention - manage data classes used to classify sensitive information`,builder:e=>e.command(Kl).command(Jl).command(Xl).command(Ql).command(eu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nu(e){return e.usage(`$0 zero-trust dlp data-tag-categories create
517
515
 
518
- 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 Wl={command:`get <certificate-id>`,describe:`Get Zero Trust certificate details`,builder:Ul,handler:async n=>l({command:`zero-trust gateway certificates get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.certificates.get({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Loaded`})})};function Gl(e){return e.usage(`$0 zero-trust gateway certificates list
516
+ 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 ru={command:`create`,describe:`Creates a new data tag category.`,builder:nu,handler:async n=>l({command:`zero-trust dlp data-tag-categories create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`),template_id:m(n[`template-id`],`template-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTagCategories.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`),template_id:m(n[`template-id`],`template-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTagCategories.create({...u,account_id:l})),{successLabel:`Created`})})};function iu(e){return e.usage(`$0 zero-trust dlp data-tag-categories delete <category-id>
519
517
 
520
- List all Zero Trust certificates for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kl={command:`list`,describe:`List Zero Trust certificates`,builder:Gl,handler:async n=>l({command:`zero-trust gateway certificates list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.certificates.list({account_id:l})),{successLabel:`Loaded`})})},ql={command:`certificates`,describe:`Operations for gateway.certificates`,builder:e=>e.command(Il).command(Rl).command(Bl).command(Hl).command(Wl).command(Kl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jl(e){return e.usage("$0 zero-trust gateway configurations edit\n\nUpdate (PATCH) a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, `certificate`, or `max_ttl_secs` without updating the entire configuration object. This endpoint returns an error if any settings collection lacks proper configuration.").option(`settings-activity-log-enabled`,{type:`boolean`,description:`Specify whether to log activity.`}).option(`settings-antivirus-enabled-download-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on downloads.`}).option(`settings-antivirus-enabled-upload-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on uploads.`}).option(`settings-antivirus-fail-closed`,{type:`boolean`,description:`Specify whether to block requests for unscannable files.`}).option(`settings-antivirus-notification-settings-enabled`,{type:`boolean`,description:`Specify whether to enable notifications.`}).option(`settings-antivirus-notification-settings-include-context`,{type:`boolean`,description:`Specify whether to include context information as query parameters.`}).option(`settings-antivirus-notification-settings-msg`,{type:`string`,description:`Specify the message to show in the notification.`}).option(`settings-antivirus-notification-settings-support-url`,{type:`string`,description:`Specify a URL that directs users to more information. If unset, the notification opens a block page.`}).option(`settings-block-page-background-color`,{type:`string`,description:"Specify the block page background color in `#rrggbb` format when the mode is customized_block_page."}).option(`settings-block-page-enabled`,{type:`boolean`,description:`Specify whether to enable the custom block page.`}).option(`settings-block-page-footer-text`,{type:`string`,description:`Specify the block page footer text when the mode is customized_block_page.`}).option(`settings-block-page-header-text`,{type:`string`,description:`Specify the block page header text when the mode is customized_block_page.`}).option(`settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to append context to target_uri as query parameters. This applies only when the mode is redirect_uri.`}).option(`settings-block-page-logo-path`,{type:`string`,description:`Specify the full URL to the logo file when the mode is customized_block_page.`}).option(`settings-block-page-mailto-address`,{type:`string`,description:`Specify the admin email for users to contact when the mode is customized_block_page.`}).option(`settings-block-page-mailto-subject`,{type:`string`,description:`Specify the subject line for emails created from the block page when the mode is customized_block_page.`}).option(`settings-block-page-mode`,{type:`string`,description:`Specify whether to redirect users to a Cloudflare-hosted block page or a customer-provided URI.`,choices:[`customized_block_page`,`redirect_uri`]}).option(`settings-block-page-name`,{type:`string`,description:`Specify the block page title when the mode is customized_block_page.`}).option(`settings-block-page-suppress-footer`,{type:`boolean`,description:`Specify whether to suppress detailed information at the bottom of the block page when the mode is customized_block_page.`}).option(`settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to redirect users to when the mode is redirect_uri.`}).option(`settings-body-scanning-inspection-mode`,{type:`string`,description:"Specify the inspection mode as either `deep` or `shallow`.",choices:[`deep`,`shallow`]}).option(`settings-browser-isolation-non-identity-enabled`,{type:`boolean`,description:`Specify whether to enable non-identity onramp support for Browser Isolation.`}).option(`settings-browser-isolation-url-browser-isolation-enabled`,{type:`boolean`,description:`Specify whether to enable Clientless Browser Isolation.`}).option(`settings-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate used for interception. Ensure the certificate is available at the edge(previously called 'active'). A nil UUID directs Cloudflare to use the Root CA.`}).option(`settings-custom-certificate-enabled`,{type:`boolean`,description:`Specify whether to enable a custom certificate authority for signing Gateway traffic.`}).option(`settings-custom-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate (ID from MTLS certificate store).`}).option(`settings-extended-email-matching-enabled`,{type:`boolean`,description:`Specify whether to match all variants of user emails (with + or . modifiers) used as criteria in Firewall policies.`}).option(`settings-fips-tls`,{type:`boolean`,description:`Enforce cipher suites and TLS versions compliant with FIPS 140-2.`}).option(`settings-host-selector-enabled`,{type:`boolean`,description:`Specify whether to enable filtering via hosts for egress policies.`}).option(`settings-inspection-mode`,{type:`string`,description:`Define the proxy inspection mode. 1. static: Gateway applies static inspection to HTTP on TCP(80). With TLS decryption on, Gateway inspects HTTPS traffic on TCP(443) and UDP(443). 2. dynamic: Gateway applies protocol detection to inspect HTTP and HTTPS traffic on any port. TLS decryption must remain on to inspect HTTPS traffic.`,choices:[`static`,`dynamic`]}).option(`settings-max-ttl-secs`,{type:`number`,description:"Account-level cap on DNS response TTLs, in seconds. Gateway rewrites DNS responses so returned record TTLs do not exceed this value. Null means no cap. Each DNS location can inherit, override, or disable it through the location `max_ttl` setting."}).option(`settings-protocol-detection-enabled`,{type:`boolean`,description:`Specify whether to detect protocols from the initial bytes of client traffic.`}).option(`settings-sandbox-enabled`,{type:`boolean`,description:`Specify whether to enable the sandbox.`}).option(`settings-sandbox-fallback-action`,{type:`string`,description:`Specify the action to take when the system cannot scan the file.`,choices:[`allow`,`block`]}).option(`settings-tls-decrypt-enabled`,{type:`boolean`,description:`Specify whether to inspect encrypted HTTP traffic.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify account settings.`}).check(e=>{if(`settings-activity-log-enabled.settings-antivirus-enabled-download-phase.settings-antivirus-enabled-upload-phase.settings-antivirus-fail-closed.settings-antivirus-notification-settings-enabled.settings-antivirus-notification-settings-include-context.settings-antivirus-notification-settings-msg.settings-antivirus-notification-settings-support-url.settings-block-page-background-color.settings-block-page-enabled.settings-block-page-footer-text.settings-block-page-header-text.settings-block-page-include-context.settings-block-page-logo-path.settings-block-page-mailto-address.settings-block-page-mailto-subject.settings-block-page-mode.settings-block-page-name.settings-block-page-suppress-footer.settings-block-page-target-uri.settings-body-scanning-inspection-mode.settings-browser-isolation-non-identity-enabled.settings-browser-isolation-url-browser-isolation-enabled.settings-certificate-id.settings-custom-certificate-enabled.settings-custom-certificate-id.settings-extended-email-matching-enabled.settings-fips-tls.settings-host-selector-enabled.settings-inspection-mode.settings-max-ttl-secs.settings-protocol-detection-enabled.settings-sandbox-enabled.settings-sandbox-fallback-action.settings-tls-decrypt-enabled`.split(`.`).some(t=>e[t]!==void 0)){let t=[`settings-certificate-id`,`settings-custom-certificate-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 --settings-* flag is set`)}return!0})}const Yl={command:`edit`,describe:`Patch Zero Trust account configuration`,builder:Jl,handler:async n=>l({command:`zero-trust gateway configurations edit`,classification:{safeFlags:[`settings-activity-log-enabled`,`settings-antivirus-enabled-download-phase`,`settings-antivirus-enabled-upload-phase`,`settings-antivirus-fail-closed`,`settings-antivirus-notification-settings-enabled`,`settings-antivirus-notification-settings-include-context`,`settings-block-page-enabled`,`settings-block-page-include-context`,`settings-block-page-mode`,`settings-block-page-suppress-footer`,`settings-body-scanning-inspection-mode`,`settings-browser-isolation-non-identity-enabled`,`settings-browser-isolation-url-browser-isolation-enabled`,`settings-custom-certificate-enabled`,`settings-extended-email-matching-enabled`,`settings-fips-tls`,`settings-host-selector-enabled`,`settings-inspection-mode`,`settings-protocol-detection-enabled`,`settings-sandbox-enabled`,`settings-sandbox-fallback-action`,`settings-tls-decrypt-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway configurations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.edit({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}});o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.edit({body:u,account_id:l})),{successLabel:`Updated`})})};function Xl(e){return e.usage(`$0 zero-trust gateway configurations get
518
+ 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 au={command:`delete <category-id>`,describe:`Delete a single data tag category.`,builder:iu,handler:async n=>l({command:`zero-trust dlp data-tag-categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
519
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.dataTagCategories.delete({account_id:l,category_id:n[`category-id`]})),{successLabel:`Deleted`})})};function ou(e){return e.usage(`$0 zero-trust dlp data-tag-categories get <category-id>
521
520
 
522
- Retrieve the current Zero Trust account configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zl={command:`get`,describe:`Get Zero Trust account configuration`,builder:Xl,handler:async n=>l({command:`zero-trust gateway configurations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.configurations.get({account_id:l})),{successLabel:`Loaded`})})};function Ql(e){return e.usage(`$0 zero-trust gateway configurations update
521
+ 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 su={command:`get <category-id>`,describe:`Retrieve a specific data tag category.`,builder:ou,handler:async n=>l({command:`zero-trust dlp data-tag-categories get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategories.get({account_id:l,category_id:n[`category-id`]})),{successLabel:`Loaded`})})};function cu(e){return e.usage(`$0 zero-trust dlp data-tag-categories list
523
522
 
524
- Update the current Zero Trust account configuration.`).option(`settings-activity-log-enabled`,{type:`boolean`,description:`Specify whether to log activity.`}).option(`settings-antivirus-enabled-download-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on downloads.`}).option(`settings-antivirus-enabled-upload-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on uploads.`}).option(`settings-antivirus-fail-closed`,{type:`boolean`,description:`Specify whether to block requests for unscannable files.`}).option(`settings-antivirus-notification-settings-enabled`,{type:`boolean`,description:`Specify whether to enable notifications.`}).option(`settings-antivirus-notification-settings-include-context`,{type:`boolean`,description:`Specify whether to include context information as query parameters.`}).option(`settings-antivirus-notification-settings-msg`,{type:`string`,description:`Specify the message to show in the notification.`}).option(`settings-antivirus-notification-settings-support-url`,{type:`string`,description:`Specify a URL that directs users to more information. If unset, the notification opens a block page.`}).option(`settings-block-page-background-color`,{type:`string`,description:"Specify the block page background color in `#rrggbb` format when the mode is customized_block_page."}).option(`settings-block-page-enabled`,{type:`boolean`,description:`Specify whether to enable the custom block page.`}).option(`settings-block-page-footer-text`,{type:`string`,description:`Specify the block page footer text when the mode is customized_block_page.`}).option(`settings-block-page-header-text`,{type:`string`,description:`Specify the block page header text when the mode is customized_block_page.`}).option(`settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to append context to target_uri as query parameters. This applies only when the mode is redirect_uri.`}).option(`settings-block-page-logo-path`,{type:`string`,description:`Specify the full URL to the logo file when the mode is customized_block_page.`}).option(`settings-block-page-mailto-address`,{type:`string`,description:`Specify the admin email for users to contact when the mode is customized_block_page.`}).option(`settings-block-page-mailto-subject`,{type:`string`,description:`Specify the subject line for emails created from the block page when the mode is customized_block_page.`}).option(`settings-block-page-mode`,{type:`string`,description:`Specify whether to redirect users to a Cloudflare-hosted block page or a customer-provided URI.`,choices:[`customized_block_page`,`redirect_uri`]}).option(`settings-block-page-name`,{type:`string`,description:`Specify the block page title when the mode is customized_block_page.`}).option(`settings-block-page-suppress-footer`,{type:`boolean`,description:`Specify whether to suppress detailed information at the bottom of the block page when the mode is customized_block_page.`}).option(`settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to redirect users to when the mode is redirect_uri.`}).option(`settings-body-scanning-inspection-mode`,{type:`string`,description:"Specify the inspection mode as either `deep` or `shallow`.",choices:[`deep`,`shallow`]}).option(`settings-browser-isolation-non-identity-enabled`,{type:`boolean`,description:`Specify whether to enable non-identity onramp support for Browser Isolation.`}).option(`settings-browser-isolation-url-browser-isolation-enabled`,{type:`boolean`,description:`Specify whether to enable Clientless Browser Isolation.`}).option(`settings-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate used for interception. Ensure the certificate is available at the edge(previously called 'active'). A nil UUID directs Cloudflare to use the Root CA.`}).option(`settings-custom-certificate-enabled`,{type:`boolean`,description:`Specify whether to enable a custom certificate authority for signing Gateway traffic.`}).option(`settings-custom-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate (ID from MTLS certificate store).`}).option(`settings-extended-email-matching-enabled`,{type:`boolean`,description:`Specify whether to match all variants of user emails (with + or . modifiers) used as criteria in Firewall policies.`}).option(`settings-fips-tls`,{type:`boolean`,description:`Enforce cipher suites and TLS versions compliant with FIPS 140-2.`}).option(`settings-host-selector-enabled`,{type:`boolean`,description:`Specify whether to enable filtering via hosts for egress policies.`}).option(`settings-inspection-mode`,{type:`string`,description:`Define the proxy inspection mode. 1. static: Gateway applies static inspection to HTTP on TCP(80). With TLS decryption on, Gateway inspects HTTPS traffic on TCP(443) and UDP(443). 2. dynamic: Gateway applies protocol detection to inspect HTTP and HTTPS traffic on any port. TLS decryption must remain on to inspect HTTPS traffic.`,choices:[`static`,`dynamic`]}).option(`settings-max-ttl-secs`,{type:`number`,description:"Account-level cap on DNS response TTLs, in seconds. Gateway rewrites DNS responses so returned record TTLs do not exceed this value. Null means no cap. Each DNS location can inherit, override, or disable it through the location `max_ttl` setting."}).option(`settings-protocol-detection-enabled`,{type:`boolean`,description:`Specify whether to detect protocols from the initial bytes of client traffic.`}).option(`settings-sandbox-enabled`,{type:`boolean`,description:`Specify whether to enable the sandbox.`}).option(`settings-sandbox-fallback-action`,{type:`string`,description:`Specify the action to take when the system cannot scan the file.`,choices:[`allow`,`block`]}).option(`settings-tls-decrypt-enabled`,{type:`boolean`,description:`Specify whether to inspect encrypted HTTP traffic.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify account settings.`}).check(e=>{if(`settings-activity-log-enabled.settings-antivirus-enabled-download-phase.settings-antivirus-enabled-upload-phase.settings-antivirus-fail-closed.settings-antivirus-notification-settings-enabled.settings-antivirus-notification-settings-include-context.settings-antivirus-notification-settings-msg.settings-antivirus-notification-settings-support-url.settings-block-page-background-color.settings-block-page-enabled.settings-block-page-footer-text.settings-block-page-header-text.settings-block-page-include-context.settings-block-page-logo-path.settings-block-page-mailto-address.settings-block-page-mailto-subject.settings-block-page-mode.settings-block-page-name.settings-block-page-suppress-footer.settings-block-page-target-uri.settings-body-scanning-inspection-mode.settings-browser-isolation-non-identity-enabled.settings-browser-isolation-url-browser-isolation-enabled.settings-certificate-id.settings-custom-certificate-enabled.settings-custom-certificate-id.settings-extended-email-matching-enabled.settings-fips-tls.settings-host-selector-enabled.settings-inspection-mode.settings-max-ttl-secs.settings-protocol-detection-enabled.settings-sandbox-enabled.settings-sandbox-fallback-action.settings-tls-decrypt-enabled`.split(`.`).some(t=>e[t]!==void 0)){let t=[`settings-certificate-id`,`settings-custom-certificate-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 --settings-* flag is set`)}return!0})}const $l={command:`update`,describe:`Update Zero Trust account configuration`,builder:Ql,handler:async n=>l({command:`zero-trust gateway configurations update`,classification:{safeFlags:[`settings-activity-log-enabled`,`settings-antivirus-enabled-download-phase`,`settings-antivirus-enabled-upload-phase`,`settings-antivirus-fail-closed`,`settings-antivirus-notification-settings-enabled`,`settings-antivirus-notification-settings-include-context`,`settings-block-page-enabled`,`settings-block-page-include-context`,`settings-block-page-mode`,`settings-block-page-suppress-footer`,`settings-body-scanning-inspection-mode`,`settings-browser-isolation-non-identity-enabled`,`settings-browser-isolation-url-browser-isolation-enabled`,`settings-custom-certificate-enabled`,`settings-extended-email-matching-enabled`,`settings-fips-tls`,`settings-host-selector-enabled`,`settings-inspection-mode`,`settings-protocol-detection-enabled`,`settings-sandbox-enabled`,`settings-sandbox-fallback-action`,`settings-tls-decrypt-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}});o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.update({body:u,account_id:l})),{successLabel:`Updated`})})},eu={command:`configurations`,describe:`Operations for gateway.configurations`,builder:e=>e.command(Yl).command(Zl).command($l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tu(e){return e.usage(`$0 zero-trust gateway create
523
+ Lists data tag categories configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lu={command:`list`,describe:`Retrieve all data tag categories in an account`,builder:cu,handler:async n=>l({command:`zero-trust dlp data-tag-categories list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategories.list({account_id:l})),{successLabel:`Loaded`})})};function uu(e){return e.usage(`$0 zero-trust dlp data-tag-categories update <category-id>
525
524
 
526
- Create a Zero Trust account for an existing Cloudflare account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nu={command:`create`,describe:`Create Zero Trust account`,builder:tu,handler:async n=>l({command:`zero-trust gateway create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.create({account_id:l})),{successLabel:`Created`})})};function ru(e){return e.usage(`$0 zero-trust gateway dns-destination-ips list
525
+ Updates a data tag category and its tags.`).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(`tags`,{type:`string`,description:"The desired final state of tags.\n- `None` (omitted): no tag changes.\n- `Some([])`: delete all tags.\n- `Some([...])`: desired final set + order. 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 data tag category to update.`})}const du={command:`update <category-id>`,describe:`Update the attributes of a single data tag category.`,builder:uu,handler:async n=>l({command:`zero-trust dlp data-tag-categories update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTagCategories.update({...e,account_id:l,category_id:n[`category-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),tags:f(n.tags,`tags`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTagCategories.update({...u,account_id:l,category_id:n[`category-id`]})),{successLabel:`Updated`})})},fu={command:`data-tag-categories`,describe:`Data Loss Prevention - manage categories that organize data tags`,builder:e=>e.command(ru).command(au).command(su).command(lu).command(du).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pu(e){return e.usage(`$0 zero-trust dlp data-tag-category-templates get <template-id>
527
526
 
528
- List Zero Trust Gateway IPv4 address pairs for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const iu={command:`list`,describe:`List Zero Trust Gateway DNS destination IPv4 address pairs`,builder:ru,handler:async n=>l({command:`zero-trust gateway dns-destination-ips list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway dns-destination-ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/dns_destination_ips`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.dnsDestinationIps.list({account_id:l})),{successLabel:`Loaded`})})},au={command:`dns-destination-ips`,describe:`Operations for gateway.dns-destination-ips`,builder:e=>e.command(iu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ou(e){return e.usage(`$0 zero-trust gateway egress-cidr-pairs list
527
+ Gets an available data tag category template.`).positional(`template-id`,{type:`string`,description:`Template ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mu={command:`get <template-id>`,describe:`Retrieve a specific data tag category template.`,builder:pu,handler:async n=>l({command:`zero-trust dlp data-tag-category-templates get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-category-templates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_category_templates/${n[`template-id`]==null?`<template-id>`:encodeURIComponent(String(n[`template-id`]))}`,pathParams:{"template-id":String(n[`template-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategoryTemplates.get({account_id:l,template_id:n[`template-id`]})),{successLabel:`Loaded`})})};function hu(e){return e.usage(`$0 zero-trust dlp data-tag-category-templates list
529
528
 
530
- Retrieve the list of egress CIDRs allocated to this Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const su={command:`list`,describe:`Get gateway egress CIDRs pairs assigned to this account`,builder:ou,handler:async n=>l({command:`zero-trust gateway egress-cidr-pairs list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway egress-cidr-pairs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/egress_cidr_pairs`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.egressCidrPairs.list({account_id:l})),{successLabel:`Loaded`})})},cu={command:`egress-cidr-pairs`,describe:`Operations for gateway.egress-cidr-pairs`,builder:e=>e.command(su).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lu(e){return e.usage(`$0 zero-trust gateway list
529
+ Lists available data tag category templates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gu={command:`list`,describe:`Retrieve all data tag category templates in an account`,builder:hu,handler:async n=>l({command:`zero-trust dlp data-tag-category-templates list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tag-category-templates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_category_templates`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTagCategoryTemplates.list({account_id:l})),{successLabel:`Loaded`})})},_u={command:`data-tag-category-templates`,describe:`Data Loss Prevention - browse templates for creating data tag categories`,builder:e=>e.command(mu).command(gu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vu(e){return e.usage(`$0 zero-trust dlp data-tags create <category-id>
531
530
 
532
- Retrieve information about the current Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uu={command:`list`,describe:`Get Zero Trust account information`,builder:lu,handler:async n=>l({command:`zero-trust gateway list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.list({account_id:l})),{successLabel:`Loaded`})})};function du(e){return e.usage(`$0 zero-trust gateway lists create
531
+ 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 yu={command:`create <category-id>`,describe:`Creates a new data tag.`,builder:vu,handler:async n=>l({command:`zero-trust dlp data-tags create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTags.create({body:e,account_id:l,category_id:n[`category-id`]})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.dataTags.create({body:u,account_id:l,category_id:n[`category-id`]})),{successLabel:`Created`})})};function bu(e){return e.usage(`$0 zero-trust dlp data-tags delete <tag-id>
533
532
 
534
- 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`]}).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 fu={command:`create`,describe:`Create Zero Trust list`,builder:du,handler:async n=>l({command:`zero-trust gateway lists create`,classification:{safeFlags:[`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.lists.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the list name.`)),n.type===void 0&&(n.type=await _(`type`,`Specify the list type.`,[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]));let u=p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.lists.create({...u,account_id:l})),{successLabel:`Created`})})};function pu(e){return e.usage(`$0 zero-trust gateway lists delete <list-id>
533
+ 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 xu={command:`delete <tag-id>`,describe:`Delete a single data tag.`,builder:bu,handler:async n=>l({command:`zero-trust dlp data-tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags/${n[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(n[`tag-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``),"tag-id":String(n[`tag-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
534
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.dataTags.delete({account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Deleted`})})};function Su(e){return e.usage(`$0 zero-trust dlp data-tags get <tag-id>
535
535
 
536
- 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 mu={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:pu,handler:async n=>l({command:`zero-trust gateway lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
537
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.lists.delete({account_id:l,list_id:n[`list-id`]})),{successLabel:`Deleted`})})};function hu(e){return e.usage(`$0 zero-trust gateway lists edit <list-id>
536
+ 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 Cu={command:`get <tag-id>`,describe:`Retrieve a specific data tag.`,builder:Su,handler:async n=>l({command:`zero-trust dlp data-tags get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags/${n[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(n[`tag-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``),"tag-id":String(n[`tag-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTags.get({account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Loaded`})})};function wu(e){return e.usage(`$0 zero-trust dlp data-tags list
538
537
 
539
- 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 gu={command:`edit <list-id>`,describe:`Patch Zero Trust list.`,builder:hu,handler:async n=>l({command:`zero-trust gateway lists edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({append:f(n.append,`append`),remove:n.remove}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.edit({...e,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`});return}let u=p({append:f(n.append,`append`),remove:n.remove});o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.edit({...u,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`})})};function _u(e){return e.usage(`$0 zero-trust gateway lists get <list-id>
538
+ Lists data tags in a category.`).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 Tu={command:`list`,describe:`Retrieve all data tags in a data tag category`,builder:wu,handler:async n=>l({command:`zero-trust dlp data-tags list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags`,pathParams:{"category-id":String(n[`category-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.dataTags.list({account_id:l,category_id:n[`category-id`]})),{successLabel:`Loaded`})})};function Eu(e){return e.usage(`$0 zero-trust dlp data-tags update <tag-id>
540
539
 
541
- Fetch a single 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})}const vu={command:`get <list-id>`,describe:`Get Zero Trust list details`,builder:_u,handler:async n=>l({command:`zero-trust gateway lists get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.lists.get({account_id:l,list_id:n[`list-id`]})),{successLabel:`Loaded`})})};function yu(e){return e.usage(`$0 zero-trust gateway lists items list
540
+ Updates a data tag in a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`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 data tag to update.`})}const Du={command:`update <tag-id>`,describe:`Update the attributes of a single data tag.`,builder:Eu,handler:async n=>l({command:`zero-trust dlp data-tags update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp data-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/data_tag_categories/${n[`category-id`]==null?`<category-id>`:encodeURIComponent(String(n[`category-id`]))}/data_tags/${n[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(n[`tag-id`]))}`,pathParams:{"category-id":String(n[`category-id`]??``),"tag-id":String(n[`tag-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTags.update({...e,account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.dataTags.update({...u,account_id:l,category_id:n[`category-id`],tag_id:n[`tag-id`]})),{successLabel:`Updated`})})},Ou={command:`data-tags`,describe:`Data Loss Prevention - manage tags used to classify and organize sensitive data`,builder:e=>e.command(yu).command(xu).command(Cu).command(Tu).command(Du).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ku(e){return e.usage(`$0 zero-trust dlp datasets create
542
541
 
543
- Fetch all items in a single Zero Trust list.`).option(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bu={command:`list`,describe:`Get Zero Trust list items`,builder:yu,handler:async n=>l({command:`zero-trust gateway lists items list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust gateway lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}/items`,pathParams:{"list-id":String(n[`list-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.lists.items.list({account_id:u,list_id:n[`list-id`],...i})),{successLabel:`Loaded`})})},xu={command:`items`,describe:`Operations for gateway.lists.items`,builder:e=>e.command(bu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Su(e){return e.usage(`$0 zero-trust gateway lists list
542
+ Creates a new DLP (Data Loss Prevention) dataset for storing custom detection patterns. Datasets can contain exact match data, word lists, or EDM (Exact Data Match) configurations.`).option(`case-sensitive`,{type:`boolean`,description:`Only applies to custom word lists.
543
+ Determines if the words should be matched in a case-sensitive manner
544
+ Cannot be set to false if \`secret\` is true or undefined`}).option(`description`,{type:`string`,description:`The description of the dataset.`}).option(`encoding-version`,{type:`number`,description:`Dataset encoding version
544
545
 
545
- Fetch all Zero Trust lists for an account.`).option(`type`,{type:`string`,description:`Specify the list type.`,choices:[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]}).option(`filter`,{type:`string`,description:"Filter the returned lists by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a list must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the list name.\n * `id` — substring match on the list ID (UUID), with or without dashes.\n * `type` — exact match on the list type. Supersedes the legacy `type` query\n parameter when both are supplied. Must be one of the valid type values.\n * `item_count` — exact integer match on the number of items in the list.\n\nEach entry must match one of the per-field patterns below: the field must be\none of `name`, `id`, `type`, or `item_count`; `name`/`id` accept any value,\n`type` is restricted to the valid list type values, and `item_count` must be\na non-negative integer."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the list name or description. When\ncombined with `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned lists by. When omitted, results are ordered by\n`created_at` in ascending order (i.e. creation order) for backwards\ncompatibility. Supported values:\n * `name` — sort alphabetically by list name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.\n * `item_count` — sort by number of items in the list.",choices:[`name`,`created_at`,`updated_at`,`item_count`]}).option(`direction`,{type:`string`,description:"Sort direction. Applies to the field named in `order_by`; when `order_by`\nis omitted it applies to the default `created_at` ordering. When\n`direction` is omitted the default is field-specific: explicitly choosing\n`created_at` or `updated_at` defaults to descending (newest first); `name`\nand `item_count` default to ascending; and the default `created_at`\nordering used when `order_by` is omitted is ascending (for backwards\ncompatibility).\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cu={command:`list`,describe:`List Zero Trust lists`,builder:y(Su),handler:async n=>l({command:`zero-trust gateway lists list`,classification:{safeFlags:[`type`,`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={type:n.type,filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.lists.list({account_id:u,...i})),{successLabel:`Loaded`})})};function wu(e){return e.usage(`$0 zero-trust gateway lists update <list-id>
546
+ Non-secret custom word lists with no header are always version 1.
547
+ Secret EDM lists with no header are version 1.
548
+ Multicolumn CSV with headers are version 2.
549
+ Omitting this field provides the default value 0, which is interpreted
550
+ the same as 1.`}).option(`name`,{type:`string`,description:`The name field`}).option(`secret`,{type:`boolean`,description:`Generate a secret dataset.
546
551
 
547
- Updates a configured Zero Trust list. Skips updating list items if not included in the payload. A non empty list items will overwrite the existing list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).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(`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 Tu={command:`update <list-id>`,describe:`Update Zero Trust list`,builder:wu,handler:async n=>l({command:`zero-trust gateway lists update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.update({...e,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the list name.`));let u=p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.update({...u,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`})})};function Eu(e){return e.usage("$0 zero-trust gateway lists upload\n\nCreate a new Zero Trust list by uploading a CSV file. The file must be `text/csv` or `text/plain` and cannot exceed 2 MB. The operation is processed asynchronously. Use the returned operation ID to poll for status.").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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Du={command:`upload`,describe:`Create Zero Trust list from CSV`,builder:Eu,handler:async n=>l({command:`zero-trust gateway lists upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/upload`,pathParams:{},bodyKind:`multipart`,body:{body:n.body,file:n.file}});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file!==void 0||n.body!==void 0){let e=new FormData;if(n.file){let t=h(n.file);e.append(`file`,new Blob([t]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&e.append(`file`,n.body);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/gateway/lists/upload`,{body:e})),{successLabel:`Created`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/gateway/lists/upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ou={command:`lists`,describe:`Operations for gateway.lists`,builder:e=>e.command(fu).command(mu).command(gu).command(vu).command(Cu).command(Tu).command(Du).command(xu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ku(e){return e.usage(`$0 zero-trust gateway locations create
552
+ If true, the response will include a secret to use with the EDM encoder.
553
+ 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 Au={command:`create`,describe:`Create a new dataset`,builder:ku,handler:async n=>l({command:`zero-trust dlp datasets create`,classification:{safeFlags:[`case-sensitive`,`secret`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),encoding_version:n[`encoding-version`],name:m(n.name,`name`,`text`),secret:n.secret}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),encoding_version:n[`encoding-version`],name:m(n.name,`name`,`text`),secret:n.secret});o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.create({...u,account_id:l})),{successLabel:`Created`})})};function ju(e){return e.usage(`$0 zero-trust dlp datasets delete <dataset-id>
548
554
 
549
- Create a new Zero Trust Gateway location.`).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`,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-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-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(`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`]}).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 Au={command:`create`,describe:`Create a Zero Trust Gateway location`,builder:ku,handler:async n=>l({command:`zero-trust gateway locations create`,classification:{safeFlags:[`client-default`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.locations.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the location name.`));let u=p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.locations.create({...u,account_id:l})),{successLabel:`Created`})})};function ju(e){return e.usage(`$0 zero-trust gateway locations delete <location-id>
555
+ 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 Mu={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:ju,handler:async n=>l({command:`zero-trust dlp datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
556
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.datasets.delete({account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Deleted`})})};function Nu(e){return e.usage(`$0 zero-trust dlp datasets get <dataset-id>
550
557
 
551
- 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 Mu={command:`delete <location-id>`,describe:`Delete a Zero Trust Gateway location`,builder:ju,handler:async n=>l({command:`zero-trust gateway locations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations/${n[`location-id`]==null?`<location-id>`:encodeURIComponent(String(n[`location-id`]))}`,pathParams:{"location-id":String(n[`location-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
552
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.locations.delete({account_id:l,location_id:n[`location-id`]})),{successLabel:`Deleted`})})};function Nu(e){return e.usage(`$0 zero-trust gateway locations get <location-id>
558
+ 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 Pu={command:`get <dataset-id>`,describe:`Fetch a specific dataset`,builder:Nu,handler:async n=>l({command:`zero-trust dlp datasets get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.datasets.get({account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Loaded`})})};function Fu(e){return e.usage(`$0 zero-trust dlp datasets list
553
559
 
554
- 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 Pu={command:`get <location-id>`,describe:`Get Zero Trust Gateway location details`,builder:Nu,handler:async n=>l({command:`zero-trust gateway locations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations/${n[`location-id`]==null?`<location-id>`:encodeURIComponent(String(n[`location-id`]))}`,pathParams:{"location-id":String(n[`location-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.locations.get({account_id:l,location_id:n[`location-id`]})),{successLabel:`Loaded`})})};function Fu(e){return e.usage(`$0 zero-trust gateway locations list
560
+ Lists all DLP datasets configured for the account, including custom word lists and EDM datasets.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Iu={command:`list`,describe:`Fetch all datasets`,builder:Fu,handler:async n=>l({command:`zero-trust dlp datasets list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.datasets.list({account_id:l})),{successLabel:`Loaded`})})};function Lu(e){return e.usage(`$0 zero-trust dlp datasets prepare-upload <dataset-id>
555
561
 
556
- List Zero Trust Gateway locations for an account.`).option(`filter`,{type:`string`,description:"Filter the returned locations by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a location must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the location name.\n * `id` — substring match on the location ID (UUID), with or without dashes.\n * `is_default` — whether it is the default for the account.\n\nEach entry must match one of the per-field patterns below:\n * the field must be one of `name`, `id`, or `is_default`;\n * `name`/`id` accept any value;\n * `is_default` only accepts `true` or `false`; any other value returns `400`"}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the location name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned locations by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by location name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Iu={command:`list`,describe:`List Zero Trust Gateway locations`,builder:y(Fu),handler:async n=>l({command:`zero-trust gateway locations list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway locations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.locations.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Lu(e){return e.usage(`$0 zero-trust gateway locations update <location-id>
562
+ Creates a new version of a DLP dataset, allowing you to stage changes before activation. Used for single-column EDM and custom word lists.`).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 Ru={command:`prepare-upload <dataset-id>`,describe:`Prepare to upload a new version of a dataset`,builder:Lu,handler:async n=>l({command:`zero-trust dlp datasets prepare-upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets prepare-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}/upload`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.dlp.datasets.prepareUpload({account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Created`})})};function zu(e){return e.usage(`$0 zero-trust dlp datasets update <dataset-id>
557
563
 
558
- Update a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`}).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.`}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).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-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(`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`]}).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 Ru={command:`update <location-id>`,describe:`Update a Zero Trust Gateway location`,builder:Lu,handler:async n=>l({command:`zero-trust gateway locations update`,classification:{safeFlags:[`client-default`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations/${n[`location-id`]==null?`<location-id>`:encodeURIComponent(String(n[`location-id`]))}`,pathParams:{"location-id":String(n[`location-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.locations.update({...e,account_id:l,location_id:n[`location-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the location name.`));let u=p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.locations.update({...u,account_id:l,location_id:n[`location-id`]})),{successLabel:`Updated`})})},zu={command:`locations`,describe:`Operations for gateway.locations`,builder:e=>e.command(Au).command(Mu).command(Pu).command(Iu).command(Ru).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bu(e){return e.usage(`$0 zero-trust gateway logging get
564
+ 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.
559
565
 
560
- Retrieve the current logging settings for the Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vu={command:`get`,describe:`Get logging settings for the Zero Trust account`,builder:Bu,handler:async n=>l({command:`zero-trust gateway logging get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway logging get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/logging`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.logging.get({account_id:l})),{successLabel:`Loaded`})})};function Hu(e){return e.usage(`$0 zero-trust gateway logging update
566
+ 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 Bu={command:`update <dataset-id>`,describe:`Update details about a dataset`,builder:zu,handler:async n=>l({command:`zero-trust dlp datasets update`,classification:{safeFlags:[`case-sensitive`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.datasets.update({...e,account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Updated`});return}let u=p({case_sensitive:n[`case-sensitive`],description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.datasets.update({...u,account_id:l,dataset_id:n[`dataset-id`]})),{successLabel:`Updated`})})};function Vu(e){return e.usage(`$0 zero-trust dlp datasets upload <version>
561
567
 
562
- Update logging settings for the current Zero Trust account.`).option(`redact-pii`,{type:`boolean`,description:`Indicate whether to redact personally identifiable information from activity logging (PII fields include source IP, user email, user ID, device ID, URL, referrer, and user agent).`}).option(`settings-by-rule-type-dns-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-dns-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-http-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-http-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-l4-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-l4-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).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 Uu={command:`update`,describe:`Update Zero Trust account logging settings`,builder:Hu,handler:async n=>l({command:`zero-trust gateway logging update`,classification:{safeFlags:[`redact-pii`,`settings-by-rule-type-dns-log-all`,`settings-by-rule-type-dns-log-blocks`,`settings-by-rule-type-http-log-all`,`settings-by-rule-type-http-log-blocks`,`settings-by-rule-type-l4-log-all`,`settings-by-rule-type-l4-log-blocks`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway logging update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/logging`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({redact_pii:n[`redact-pii`],settings_by_rule_type:{dns:{log_all:n[`settings-by-rule-type-dns-log-all`],log_blocks:n[`settings-by-rule-type-dns-log-blocks`]},http:{log_all:n[`settings-by-rule-type-http-log-all`],log_blocks:n[`settings-by-rule-type-http-log-blocks`]},l4:{log_all:n[`settings-by-rule-type-l4-log-all`],log_blocks:n[`settings-by-rule-type-l4-log-blocks`]}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.logging.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({redact_pii:n[`redact-pii`],settings_by_rule_type:{dns:{log_all:n[`settings-by-rule-type-dns-log-all`],log_blocks:n[`settings-by-rule-type-dns-log-blocks`]},http:{log_all:n[`settings-by-rule-type-http-log-all`],log_blocks:n[`settings-by-rule-type-http-log-blocks`]},l4:{log_all:n[`settings-by-rule-type-l4-log-all`],log_blocks:n[`settings-by-rule-type-l4-log-blocks`]}}});o(await c(`Updating`,async()=>i.zeroTrust.gateway.logging.update({body:u,account_id:l})),{successLabel:`Updated`})})},Wu={command:`logging`,describe:`Operations for gateway.logging`,builder:e=>e.command(Vu).command(Uu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gu(e){return e.usage(`$0 zero-trust gateway operations get <operation-id>
568
+ 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 Hu={command:`upload <version>`,describe:`Upload a new version of a dataset`,builder:Vu,handler:async n=>l({command:`zero-trust dlp datasets upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp datasets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/datasets/${n[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(n[`dataset-id`]))}/upload/${n.version==null?`<version>`:encodeURIComponent(String(n.version))}`,pathParams:{"dataset-id":String(n[`dataset-id`]??``),version:String(n.version??``)},bodyKind:`octet-stream`,body:n.body});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file){let e=h(n.file);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(n[`dataset-id`]))}/upload/${encodeURIComponent(String(n.version))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(n[`dataset-id`]))}/upload/${encodeURIComponent(String(n.version))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Uu={command:`datasets`,describe:`Data Loss Prevention - manage datasets, versions, and uploads`,builder:e=>e.command(Au).command(Mu).command(Pu).command(Iu).command(Ru).command(Bu).command(Hu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wu(e){return e.usage(`$0 zero-trust dlp document-fingerprints create
563
569
 
564
- Fetch a single Zero Trust Gateway operation by its ID.`).positional(`operation-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 Ku={command:`get <operation-id>`,describe:`Zero Trust Gateway operation details`,builder:Gu,handler:async n=>l({command:`zero-trust gateway operations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/operations/${n[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(n[`operation-id`]))}`,pathParams:{"operation-id":String(n[`operation-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.operations.get({account_id:l,operation_id:n[`operation-id`]})),{successLabel:`Loaded`})})};function qu(e){return e.usage(`$0 zero-trust gateway operations list
570
+ 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 Gu={command:`create`,describe:`Creates a new document fingerprint.`,builder:Wu,handler:async n=>l({command:`zero-trust dlp document-fingerprints create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp document-fingerprints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.documentFingerprints.create({...e,account_id:l})),{successLabel:`Created`});return}if(n[`match-percent`]===void 0)throw Error(`--match-percent is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.documentFingerprints.create({...u,account_id:l})),{successLabel:`Created`})})};function Ku(e){return e.usage(`$0 zero-trust dlp document-fingerprints delete <document-fingerprint-id>
565
571
 
566
- List all Zero Trust Gateway operations for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ju={command:`list`,describe:`List Zero Trust Gateway operations`,builder:qu,handler:async n=>l({command:`zero-trust gateway operations list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/operations`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.operations.list({account_id:l})),{successLabel:`Loaded`})})},Yu={command:`operations`,describe:`Operations for gateway.operations`,builder:e=>e.command(Ku).command(Ju).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xu(e){return e.usage(`$0 zero-trust gateway pacfiles create
572
+ 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 qu={command:`delete <document-fingerprint-id>`,describe:`Delete a single document fingerprint.`,builder:Ku,handler:async n=>l({command:`zero-trust dlp document-fingerprints delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp document-fingerprints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
573
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.documentFingerprints.delete({account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Deleted`})})};function Ju(e){return e.usage(`$0 zero-trust dlp document-fingerprints get <document-fingerprint-id>
567
574
 
568
- 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 Zu={command:`create`,describe:`Create a PAC file`,builder:Xu,handler:async n=>l({command:`zero-trust gateway pacfiles create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),slug:m(n.slug,`slug`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.pacfiles.create({...e,account_id:l})),{successLabel:`Created`});return}n.contents===void 0&&(n.contents=await g(`contents`,`Actual contents of the PAC file`)),n.name===void 0&&(n.name=await g(`name`,`Name of the PAC file.`));let u=p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),slug:m(n.slug,`slug`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.pacfiles.create({...u,account_id:l})),{successLabel:`Created`})})};function Qu(e){return e.usage(`$0 zero-trust gateway pacfiles delete <pacfile-id>
575
+ 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 Yu={command:`get <document-fingerprint-id>`,describe:`Retrieve data about a specific document fingerprint.`,builder:Ju,handler:async n=>l({command:`zero-trust dlp document-fingerprints get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp document-fingerprints get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.documentFingerprints.get({account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Loaded`})})};function Xu(e){return e.usage(`$0 zero-trust dlp document-fingerprints list
569
576
 
570
- 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 $u={command:`delete <pacfile-id>`,describe:`Delete a PAC file`,builder:Qu,handler:async n=>l({command:`zero-trust gateway pacfiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles/${n[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(n[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(n[`pacfile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
571
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.pacfiles.delete({account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Deleted`})})};function ed(e){return e.usage(`$0 zero-trust gateway pacfiles get <pacfile-id>
577
+ Lists all document fingerprints configured for DLP scanning in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zu={command:`list`,describe:`Retrieve data about all document fingerprints.`,builder:Xu,handler:async n=>l({command:`zero-trust dlp document-fingerprints list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp document-fingerprints list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.documentFingerprints.list({account_id:l})),{successLabel:`Loaded`})})};function Qu(e){return e.usage(`$0 zero-trust dlp document-fingerprints update <document-fingerprint-id>
572
578
 
573
- 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 td={command:`get <pacfile-id>`,describe:`Get a PAC file`,builder:ed,handler:async n=>l({command:`zero-trust gateway pacfiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles/${n[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(n[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(n[`pacfile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.pacfiles.get({account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Loaded`})})};function nd(e){return e.usage(`$0 zero-trust gateway pacfiles list
579
+ Updates metadata for an existing document fingerprint, such as its name or description.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).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 document fingerprint to update.`})}const $u={command:`update <document-fingerprint-id>`,describe:`Update the attributes of a single document fingerprint.`,builder:Qu,handler:async n=>l({command:`zero-trust dlp document-fingerprints update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp document-fingerprints update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.documentFingerprints.update({...e,account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Created`});return}let u=p({description:m(n.description,`description`,`text`),match_percent:n[`match-percent`],name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.documentFingerprints.update({...u,account_id:l,document_fingerprint_id:n[`document-fingerprint-id`]})),{successLabel:`Created`})})};function ed(e){return e.usage(`$0 zero-trust dlp document-fingerprints upload <document-fingerprint-id>
574
580
 
575
- List all Zero Trust Gateway PAC files for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rd={command:`list`,describe:`List PAC files`,builder:nd,handler:async n=>l({command:`zero-trust gateway pacfiles list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust gateway pacfiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.pacfiles.list({account_id:u,...i})),{successLabel:`Loaded`})})};function id(e){return e.usage(`$0 zero-trust gateway pacfiles update <pacfile-id>
581
+ Uploads a new document to create or update a fingerprint. The document structure is analyzed to enable detection of similar documents.`).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(`body`,{type:`string`,description:`File used for document fingerprinting.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const td={command:`upload <document-fingerprint-id>`,describe:`Uploads a new version for a document fingerprint.`,builder:ed,handler:async n=>l({command:`zero-trust dlp document-fingerprints upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp document-fingerprints upload`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/document_fingerprints/${n[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(n[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(n[`document-fingerprint-id`]??``)},bodyKind:`multipart`,body:{body:n.body,file:n.file}});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file!==void 0||n.body!==void 0){let e=new FormData;if(n.file){let t=h(n.file);e.append(`file`,new Blob([t]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&e.append(`file`,n.body);o(await c(`Updating`,async()=>i(l,`PUT`,`/accounts/${u}/dlp/document_fingerprints/${encodeURIComponent(String(n[`document-fingerprint-id`]))}`,{body:e})),{successLabel:`Updated`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Updating`,async()=>i(l,`PUT`,`/accounts/${u}/dlp/document_fingerprints/${encodeURIComponent(String(n[`document-fingerprint-id`]))}`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},nd={command:`document-fingerprints`,describe:`Data Loss Prevention - manage document fingerprints for detecting matching documents`,builder:e=>e.command(Gu).command(qu).command(Yu).command(Zu).command($u).command(td).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rd(e){return e.usage(`$0 zero-trust dlp email account-mapping create
576
582
 
577
- Update a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).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(`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 ad={command:`update <pacfile-id>`,describe:`Update a Zero Trust Gateway PAC file`,builder:id,handler:async n=>l({command:`zero-trust gateway pacfiles update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles/${n[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(n[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(n[`pacfile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.pacfiles.update({...e,account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Updated`});return}n.contents===void 0&&(n.contents=await g(`contents`,`Actual contents of the PAC file`)),n.description===void 0&&(n.description=await g(`description`,`Detailed description of the PAC file.`)),n.name===void 0&&(n.name=await g(`name`,`Name of the PAC file.`));let u=p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.pacfiles.update({...u,account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Updated`})})},od={command:`pacfiles`,describe:`Operations for gateway.pacfiles`,builder:e=>e.command(Zu).command($u).command(td).command(rd).command(ad).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function sd(e){return e.usage(`$0 zero-trust gateway proxy-endpoints create
583
+ Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration.`).option(`auth-requirements-allowed-microsoft-organizations`,{type:`string`,array:!0,description:`The auth_requirements.allowed_microsoft_organizations field`}).option(`auth-requirements-type`,{type:`string`,description:`The auth_requirements.type field`,choices:[`Org`,`NoAuth`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Account mapping.`})}const id={command:`create`,describe:`Create mapping`,builder:rd,handler:async n=>l({command:`zero-trust dlp email account-mapping create`,classification:{safeFlags:[`auth-requirements-type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email account-mapping create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/account_mapping`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({auth_requirements:{allowed_microsoft_organizations:n[`auth-requirements-allowed-microsoft-organizations`],type:m(n[`auth-requirements-type`],`auth-requirements-type`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.accountMapping.create({...e,account_id:l})),{successLabel:`Created`});return}n[`auth-requirements-type`]===void 0&&(n[`auth-requirements-type`]=await _(`auth-requirements-type`,`The auth_requirements.type field`,[`Org`,`NoAuth`]));let u=p({auth_requirements:{allowed_microsoft_organizations:n[`auth-requirements-allowed-microsoft-organizations`],type:m(n[`auth-requirements-type`],`auth-requirements-type`,`text`)}});o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.accountMapping.create({...u,account_id:l})),{successLabel:`Created`})})};function ad(e){return e.usage(`$0 zero-trust dlp email account-mapping get
578
584
 
579
- Create a new Zero Trust Gateway proxy endpoint.`).option(`kind`,{type:`string`,description:`The proxy endpoint kind.`,choices:[`ip`,`identity`],default:`ip`}).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 cd={command:`create`,describe:`Create a proxy endpoint`,builder:sd,handler:async n=>l({command:`zero-trust gateway proxy-endpoints create`,classification:{safeFlags:[`kind`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({kind:m(n.kind,`kind`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.proxyEndpoints.create({body:e,account_id:l})),{successLabel:`Created`});return}n.kind===`identity`&&n.kind===void 0&&(n.kind=await g(`kind`,`The proxy endpoint kind.`,{question:`Enter value for --kind`}));let u=p({kind:m(n.kind,`kind`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.proxyEndpoints.create({body:u,account_id:l})),{successLabel:`Created`})})};function ld(e){return e.usage(`$0 zero-trust gateway proxy-endpoints delete <proxy-endpoint-id>
585
+ Retrieves the email provider mapping configuration for DLP email scanning.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const od={command:`get`,describe:`Get mapping`,builder:ad,handler:async n=>l({command:`zero-trust dlp email account-mapping get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email account-mapping get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/account_mapping`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.email.accountMapping.get({account_id:l})),{successLabel:`Loaded`})})},sd={command:`account-mapping`,describe:`Data Loss Prevention - configure account mappings for outbound email scanning`,builder:e=>e.command(id).command(od).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function cd(e){return e.usage(`$0 zero-trust dlp email rules bulk-edit
580
586
 
581
- 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 ud={command:`delete <proxy-endpoint-id>`,describe:`Delete a proxy endpoint`,builder:ld,handler:async n=>l({command:`zero-trust gateway proxy-endpoints delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints/${n[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(n[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(n[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
582
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.proxyEndpoints.delete({account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Deleted`})})};function dd(e){return e.usage(`$0 zero-trust gateway proxy-endpoints edit <proxy-endpoint-id>
587
+ Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Rule priorities.`})}const ld={command:`bulk-edit`,describe:`Update email scanner rule priorities`,builder:cd,handler:async n=>l({command:`zero-trust dlp email rules bulk-edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.email.rules.bulkEdit({...e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function ud(e){return e.usage(`$0 zero-trust dlp email rules create
583
588
 
584
- 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 fd={command:`edit <proxy-endpoint-id>`,describe:`Update a proxy endpoint`,builder:dd,handler:async n=>l({command:`zero-trust gateway proxy-endpoints edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints/${n[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(n[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(n[`proxy-endpoint-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ips:n.ips,name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.proxyEndpoints.edit({...e,account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Updated`});return}let u=p({ips:n.ips,name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.proxyEndpoints.edit({...u,account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Updated`})})};function pd(e){return e.usage(`$0 zero-trust gateway proxy-endpoints get <proxy-endpoint-id>
589
+ 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`]}).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 dd={command:`create`,describe:`Create email scanner rule`,builder:ud,handler:async n=>l({command:`zero-trust dlp email rules create`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.rules.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`action-action`]===void 0&&(n[`action-action`]=await _(`action-action`,`The action.action field`,[`Block`])),n.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.email.rules.create({body:u,account_id:l})),{successLabel:`Created`})})};function fd(e){return e.usage(`$0 zero-trust dlp email rules delete <rule-id>
585
590
 
586
- Get a single 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})}const md={command:`get <proxy-endpoint-id>`,describe:`Get a proxy endpoint`,builder:pd,handler:async n=>l({command:`zero-trust gateway proxy-endpoints get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints/${n[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(n[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(n[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.proxyEndpoints.get({account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Loaded`})})};function hd(e){return e.usage(`$0 zero-trust gateway proxy-endpoints list
591
+ 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 pd={command:`delete <rule-id>`,describe:`Delete email scanner rule`,builder:fd,handler:async n=>l({command:`zero-trust dlp email rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
592
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.email.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function md(e){return e.usage(`$0 zero-trust dlp email rules get <rule-id>
587
593
 
588
- List all Zero Trust Gateway proxy endpoints for an account.`).option(`filter`,{type:`string`,description:"Filter the returned proxy endpoints by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (an endpoint must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the endpoint name.\n * `id` — substring match on the endpoint ID (UUID), with or without dashes.\n * `kind` — exact match on the endpoint kind. The value must be `ip` or `identity`; any other value returns `400`.\n\nEach entry must match one of the per-field patterns below: the field\nmust be one of `name`, `id`, or `kind`; `name`/`id` accept any value,\nwhile `kind` only accepts `ip` or `identity`."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the endpoint name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned endpoints by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by endpoint name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gd={command:`list`,describe:`List proxy endpoints`,builder:y(hd),handler:async n=>l({command:`zero-trust gateway proxy-endpoints list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.proxyEndpoints.list({account_id:u,...i})),{successLabel:`Loaded`})})},_d={command:`proxy-endpoints`,describe:`Operations for gateway.proxy-endpoints`,builder:e=>e.command(cd).command(ud).command(fd).command(md).command(gd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vd(e){return e.usage(`$0 zero-trust gateway rules bulk-edit
594
+ 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 hd={command:`get <rule-id>`,describe:`Get an email scanner rule`,builder:md,handler:async n=>l({command:`zero-trust dlp email rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.email.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function gd(e){return e.usage(`$0 zero-trust dlp email rules list
589
595
 
590
- Update select fields of multiple Zero Trust Gateway rules in a single request. This is commonly used to reorder rules by updating their precedence values. Only the fields provided for each rule are updated.`).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 yd={command:`bulk-edit`,describe:`Patch multiple Zero Trust Gateway rules`,builder:vd,handler:async n=>l({command:`zero-trust gateway rules bulk-edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.bulkEdit({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function bd(e){return e.usage(`$0 zero-trust gateway rules create
596
+ Lists all email scanner rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _d={command:`list`,describe:`List all email scanner rules`,builder:gd,handler:async n=>l({command:`zero-trust dlp email rules list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.email.rules.list({account_id:l})),{successLabel:`Loaded`})})};function vd(e){return e.usage(`$0 zero-trust dlp email rules update <rule-id>
591
597
 
592
- 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`]}).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(`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-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-audit-ssh-command-logging`,{type:`boolean`,description:`Enable SSH command logging.`}).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`]}).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`]}).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`]}).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`]}).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`]}).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`]}).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).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-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`]}).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-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`]}).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(`rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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-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-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 xd={command:`create`,describe:`Create a Zero Trust Gateway rule`,builder:bd,handler:async n=>l({command:`zero-trust gateway rules create`,classification:{safeFlags:`action.enabled.rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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(`.`)}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.rules.create({...e,account_id:l})),{successLabel:`Created`});return}n.action===void 0&&(n.action=await _(`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`])),n.name===void 0&&(n.name=await g(`name`,`Specify the rule name.`));let u=p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.rules.create({...u,account_id:l})),{successLabel:`Created`})})};function Sd(e){return e.usage(`$0 zero-trust gateway rules delete <rule-id>
598
+ Updates a DLP email scanning rule.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`action-action`,{type:`string`,description:`The action.action field`,choices:[`Block`]}).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 yd={command:`update <rule-id>`,describe:`Update email scanner rule`,builder:vd,handler:async n=>l({command:`zero-trust dlp email rules update`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp email rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/email/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.email.rules.update({body:e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}if(n[`action-action`]===void 0&&(n[`action-action`]=await _(`action-action`,`The action.action field`,[`Block`])),n.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({action:{action:m(n[`action-action`],`action-action`,`text`),message:m(n[`action-message`],`action-message`,`text`)},conditions:f(n.conditions,`conditions`),description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.email.rules.update({body:u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},bd={command:`rules`,describe:`Data Loss Prevention - manage outbound email scanning rules and their priorities`,builder:e=>e.command(ld).command(dd).command(pd).command(hd).command(_d).command(yd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xd={command:`email`,describe:`Operations for dlp.email`,builder:e=>e.command(sd).command(bd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sd(e){return e.usage(`$0 zero-trust dlp entries create
593
599
 
594
- 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 Cd={command:`delete <rule-id>`,describe:`Delete a Zero Trust Gateway rule`,builder:Sd,handler:async n=>l({command:`zero-trust gateway rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
595
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function wd(e){return e.usage("$0 zero-trust gateway rules edit <rule-id>\n\nUpdate select fields of an existing Zero Trust Gateway rule. Only the fields provided in the request body are updated. This endpoint supports a limited subset of fields (`name`, `description`, `precedence`, `enabled`). To update other fields such as `action`, `traffic`, `identity`, `device_posture`, `rule_settings`, `schedule`, or `expiration`, use the PUT endpoint for a full rule replacement.").positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify the rule description.`}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`}).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(`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 Td={command:`edit <rule-id>`,describe:`Patch a Zero Trust Gateway rule`,builder:wd,handler:async n=>l({command:`zero-trust gateway rules edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),precedence:n.precedence}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.edit({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),precedence:n.precedence});o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.edit({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})};function Ed(e){return e.usage(`$0 zero-trust gateway rules get <rule-id>
600
+ 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`]}).option(`profile-id`,{type:`string`,description:`The profile_id field`}).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 Cd={command:`create`,describe:`Create custom entry`,builder:Sd,handler:async n=>l({command:`zero-trust dlp entries create`,classification:{safeFlags:[`enabled`,`pattern-validation`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},profile_id:m(n[`profile-id`],`profile-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.create({...e,account_id:l})),{successLabel:`Created`});return}if(n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);n.name===void 0&&(n.name=await g(`name`,`The name field`)),n[`pattern-regex`]===void 0&&(n[`pattern-regex`]=await g(`pattern-regex`,`The pattern.regex field`));let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},profile_id:m(n[`profile-id`],`profile-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.entries.create({...u,account_id:l})),{successLabel:`Created`})})};function wd(e){return e.usage(`$0 zero-trust dlp entries delete <entry-id>
596
601
 
597
- 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 Dd={command:`get <rule-id>`,describe:`Get Zero Trust Gateway rule details.`,builder:Ed,handler:async n=>l({command:`zero-trust gateway rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function Od(e){return e.usage(`$0 zero-trust gateway rules list-tenant
602
+ 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 Td={command:`delete <entry-id>`,describe:`Delete custom entry`,builder:wd,handler:async n=>l({command:`zero-trust dlp entries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
603
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.entries.delete({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Deleted`})})};function Ed(e){return e.usage(`$0 zero-trust dlp entries get <entry-id>
598
604
 
599
- List Zero Trust Gateway rules for the parent account of an account in the MSP configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kd={command:`list-tenant`,describe:`List Zero Trust Gateway rules inherited from the parent account`,builder:Od,handler:async n=>l({command:`zero-trust gateway rules list-tenant`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules list-tenant`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/tenant`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.rules.listTenant({account_id:l})),{successLabel:`Loaded`})})};function Ad(e){return e.usage(`$0 zero-trust gateway rules list
605
+ 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 Dd={command:`get <entry-id>`,describe:`Get DLP Entry`,builder:Ed,handler:async n=>l({command:`zero-trust dlp entries get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.entries.get({account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Loaded`})})};function Od(e){return e.usage(`$0 zero-trust dlp entries list
600
606
 
601
- List Zero Trust Gateway rules for an account.`).option(`filter`,{type:`string`,description:"Filter the returned rules by one or more `field:value` pairs. Repeat the\nparameter to combine filters with logical AND.\n\nSupported fields are `name`, `id`, `action`, `enabled`, `source_account`,\n`is_shared`, `filters`, and `expression` (max 1024 bytes). The `source_account`\nvalue is matched as a normalized UUID substring. The `filters` value must\nbe one of the rule filter names and matches a member of the rule's `filters`\narray. The `expression` filter performs a case-insensitive literal\nsubstring match across traffic, identity, and device posture expressions."}).option(`search`,{type:`string`,description:`Case-insensitive substring search across rule name and description.`}).option(`order-by`,{type:`string`,description:"Field to sort the returned rules by. Supported values are `name`,\n`created_at`, `updated_at`, and `precedence`.",choices:[`name`,`created_at`,`updated_at`,`precedence`]}).option(`direction`,{type:`string`,description:"Sort direction. When `order_by` is omitted, this controls the direction\nof the existing precedence ordering. Shared rules remain first in either\ndirection. Accepted values are `asc` and `desc`.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jd={command:`list`,describe:`List Zero Trust Gateway rules`,builder:y(Ad),handler:async n=>l({command:`zero-trust gateway rules list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.rules.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Md(e){return e.usage("$0 zero-trust gateway rules reset-expiration <rule-id>\n\nResets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both `expiration.expires_at` and `expiration.duration`.").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 Nd={command:`reset-expiration <rule-id>`,describe:`Reset the expiration of a Zero Trust Gateway Rule`,builder:Md,handler:async n=>l({command:`zero-trust gateway rules reset-expiration`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules reset-expiration`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}/reset_expiration`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.rules.resetExpiration({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Created`})})};function Pd(e){return e.usage(`$0 zero-trust gateway rules update <rule-id>
607
+ Lists all DLP entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kd={command:`list`,describe:`List all entries`,builder:Od,handler:async n=>l({command:`zero-trust dlp entries list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.entries.list({account_id:l})),{successLabel:`Loaded`})})};function Ad(e){return e.usage(`$0 zero-trust dlp entries update <entry-id>
602
608
 
603
- Update a configured Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).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`]}).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.`}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`}).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(`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.`}).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-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-audit-ssh-command-logging`,{type:`boolean`,description:`Enable SSH command logging.`}).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`]}).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`]}).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`]}).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`]}).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`]}).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`]}).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).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-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`]}).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-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`]}).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.`}).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(`rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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-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-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 Fd={command:`update <rule-id>`,describe:`Update a Zero Trust Gateway rule`,builder:Pd,handler:async n=>l({command:`zero-trust gateway rules update`,classification:{safeFlags:`action.enabled.rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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(`.`)}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.update({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}n.action===void 0&&(n.action=await _(`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`])),n.name===void 0&&(n.name=await g(`name`,`Specify the rule name.`));let u=p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.update({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},Id={command:`rules`,describe:`Operations for gateway.rules`,builder:e=>e.command(yd).command(xd).command(Cd).command(Td).command(Dd).command(jd).command(kd).command(Nd).command(Fd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ld={command:`gateway`,describe:`Operations for gateway`,builder:e=>e.command(nu).command(uu).command(wl).command(jl).command(Pl).command(ql).command(eu).command(au).command(cu).command(Ou).command(zu).command(Wu).command(Yu).command(od).command(_d).command(Id).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Rd(e){return e.usage(`$0 zero-trust identity-providers create
609
+ Updates a DLP entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description 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`]}).option(`type`,{type:`string`,description:`The type field`,choices:[`custom`,`predefined`,`integration`]}).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 jd={command:`update <entry-id>`,describe:`Update entry`,builder:Ad,handler:async n=>l({command:`zero-trust dlp entries update`,classification:{safeFlags:[`pattern-validation`,`type`,`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/entries/${n[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(n[`entry-id`]))}`,pathParams:{"entry-id":String(n[`entry-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},type:m(n.type,`type`,`text`),enabled:n.enabled}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.update({body:e,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`});return}if(n.type===void 0&&(n.type=await _(`type`,`The type field`,[`custom`,`predefined`,`integration`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),pattern:{regex:m(n[`pattern-regex`],`pattern-regex`,`text`),validation:m(n[`pattern-validation`],`pattern-validation`,`text`)},type:m(n.type,`type`,`text`),enabled:n.enabled});o(await c(`Updating`,async()=>i.zeroTrust.dlp.entries.update({body:u,account_id:l,entry_id:n[`entry-id`]})),{successLabel:`Updated`})})},Md={command:`entries`,describe:`Data Loss Prevention - list and manage detection entries`,builder:e=>e.command(Cd).command(Td).command(Dd).command(kd).command(jd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nd(e){return e.usage(`$0 zero-trust dlp limits list
604
610
 
605
- 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 zd={command:`create`,describe:`Add an Access identity provider`,builder:Rd,handler:async i=>l({command:`zero-trust identity-providers create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({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:i.body===void 0?void 0:d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Creating`,async()=>l.zeroTrust.identityProviders.create({body:e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Created`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Bd(e){return e.usage(`$0 zero-trust identity-providers delete <identity-provider-id>
611
+ 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 Pd={command:`list`,describe:`Fetch limits associated with DLP for account`,builder:Nd,handler:async n=>l({command:`zero-trust dlp limits list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/limits`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.limits.list({account_id:l})),{successLabel:`Loaded`})})},Fd={command:`limits`,describe:`Data Loss Prevention - view account limits and resource quotas`,builder:e=>e.command(Pd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Id(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 Ld={command:`validate`,describe:`Validate a DLP regex pattern`,builder:Id,handler:async n=>l({command:`zero-trust dlp patterns validate`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp patterns validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/patterns/validate`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({max_match_bytes:n[`max-match-bytes`],regex:m(n.regex,`regex`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.patterns.validate({...e,account_id:l})),{successLabel:`Created`});return}n.regex===void 0&&(n.regex=await g(`regex`,`The regex field`));let u=p({max_match_bytes:n[`max-match-bytes`],regex:m(n.regex,`regex`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.patterns.validate({...u,account_id:l})),{successLabel:`Created`})})},Rd={command:`patterns`,describe:`Data Loss Prevention - validate regular expressions used for content detection`,builder:e=>e.command(Ld).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zd(e){return e.usage(`$0 zero-trust dlp profiles custom create
606
612
 
607
- 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 Vd={command:`delete <identity-provider-id>`,describe:`Delete an Access identity provider`,builder:Bd,handler:async i=>l({command:`zero-trust identity-providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${i[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(i[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"identity-provider-id":String(i[`identity-provider-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=d:i.accountId=d,!await v({force:!!i.force})){process.stderr.write(`Aborted.
608
- `);return}o(await c(`Deleting`,async()=>l.zeroTrust.identityProviders.delete({account_or_zone:u,account_or_zone_id:d,identity_provider_id:i[`identity-provider-id`]})),{successLabel:`Deleted`})})};function Hd(e){return e.usage(`$0 zero-trust identity-providers get <identity-provider-id>
613
+ 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 Bd={command:`create`,describe:`Create custom profile`,builder:zd,handler:async n=>l({command:`zero-trust dlp profiles custom create`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.profiles.custom.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.profiles.custom.create({...u,account_id:l})),{successLabel:`Created`})})};function Vd(e){return e.usage(`$0 zero-trust dlp profiles custom delete <profile-id>
609
614
 
610
- Fetches a configured 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 Ud={command:`get <identity-provider-id>`,describe:`Get an Access identity provider`,builder:Hd,handler:async i=>l({command:`zero-trust identity-providers get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${i[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(i[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"identity-provider-id":String(i[`identity-provider-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.zeroTrust.identityProviders.get({account_or_zone:u,account_or_zone_id:d,identity_provider_id:i[`identity-provider-id`]})),{successLabel:`Loaded`})})};function Wd(e){return e.usage(`$0 zero-trust identity-providers list
615
+ 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 Hd={command:`delete <profile-id>`,describe:`Delete custom profile`,builder:Vd,handler:async n=>l({command:`zero-trust dlp profiles custom delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
616
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.profiles.custom.delete({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Deleted`})})};function Ud(e){return e.usage(`$0 zero-trust dlp profiles custom update <profile-id>
611
617
 
612
- 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 Gd={command:`list`,describe:`List Access identity providers`,builder:Wd,handler:async i=>l({command:`zero-trust identity-providers list`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let l={scim_enabled:i[`scim-enabled`],page:i.page,per_page:i[`per-page`]};if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await r();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.zeroTrust.identityProviders.list({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})})};function Kd(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 qd={command:`create <identity-provider-id>`,describe:`Create SAML encryption certificate for Identity Provider`,builder:Kd,handler:async n=>l({command:`zero-trust identity-providers saml-certificate create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust identity-providers saml-certificate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/identity_providers/${n[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(n[`identity-provider-id`]))}/saml_certificate`,pathParams:{"identity-provider-id":String(n[`identity-provider-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.identityProviders.samlCertificate.create({account_id:l,identity_provider_id:n[`identity-provider-id`]})),{successLabel:`Created`})})},Jd={command:`saml-certificate`,describe:`Operations for identity-providers.saml-certificate`,builder:e=>e.command(qd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yd(e){return e.usage(`$0 zero-trust identity-providers scim groups list
618
+ 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.
619
+ 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 Wd={command:`update <profile-id>`,describe:`Update custom profile`,builder:Ud,handler:async n=>l({command:`zero-trust dlp profiles custom update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.custom.update({...e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},data_classes:n[`data-classes`],data_tags:n[`data-tags`],description:m(n.description,`description`,`text`),entries:f(n.entries,`entries`),name:m(n.name,`name`,`text`),ocr_enabled:n[`ocr-enabled`],sensitivity_levels:f(n[`sensitivity-levels`],`sensitivity-levels`),shared_entries:f(n[`shared-entries`],`shared-entries`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.custom.update({...u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`})})},Gd={command:`custom`,describe:`Data Loss Prevention - manage custom profiles`,builder:e=>e.command(Bd).command(Hd).command(Wd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Kd(e){return e.usage(`$0 zero-trust dlp profiles get <profile-id>
613
620
 
614
- 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 Xd={command:`list`,describe:`List SCIM Group resources`,builder:Yd,handler:async n=>l({command:`zero-trust identity-providers scim groups list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={cf_resource_id:n[`cf-resource-id`],idp_resource_id:n[`idp-resource-id`],name:n.name,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust identity-providers scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/identity_providers/${n[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(n[`identity-provider-id`]))}/scim/groups`,pathParams:{"identity-provider-id":String(n[`identity-provider-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.identityProviders.scim.groups.list({account_id:u,identity_provider_id:n[`identity-provider-id`],...i})),{successLabel:`Loaded`})})},Zd={command:`groups`,describe:`Operations for identity-providers.scim.groups`,builder:e=>e.command(Xd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qd(e){return e.usage(`$0 zero-trust identity-providers scim users list
621
+ Fetches a DLP profile by ID.`).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 qd={command:`get <profile-id>`,describe:`Get DLP Profile`,builder:Kd,handler:async n=>l({command:`zero-trust dlp profiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.profiles.get({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Loaded`})})};function Jd(e){return e.usage(`$0 zero-trust dlp profiles list
615
622
 
616
- Lists SCIM User 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 User 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 users in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,description:'The IdP-generated Id of the SCIM User 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 users in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`username`,{type:`string`,description:`The username of the SCIM User resource.`}).option(`email`,{type:`string`,description:`The email address of the SCIM User resource.`}).option(`name`,{type:`string`,description:`The name of the SCIM User 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 $d={command:`list`,describe:`List SCIM User resources`,builder:Qd,handler:async n=>l({command:`zero-trust identity-providers scim users list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={cf_resource_id:n[`cf-resource-id`],idp_resource_id:n[`idp-resource-id`],username:n.username,email:n.email,name:n.name,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust identity-providers scim users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/identity_providers/${n[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(n[`identity-provider-id`]))}/scim/users`,pathParams:{"identity-provider-id":String(n[`identity-provider-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.identityProviders.scim.users.list({account_id:u,identity_provider_id:n[`identity-provider-id`],...i})),{successLabel:`Loaded`})})},ef={command:`users`,describe:`Operations for identity-providers.scim.users`,builder:e=>e.command($d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},tf={command:`scim`,describe:`Operations for identity-providers.scim`,builder:e=>e.command(Zd).command(ef).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nf(e){return e.usage(`$0 zero-trust identity-providers update <identity-provider-id>
623
+ Lists all DLP profiles in an account.`).option(`all`,{type:`boolean`,description:`Return all profiles, including those that current account does not have access to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yd={command:`list`,describe:`List all profiles`,builder:Jd,handler:async n=>l({command:`zero-trust dlp profiles list`,classification:{safeFlags:[`all`,`dry-run`]}},n,async()=>{let i={all:n.all};if(n.dryRun){s({command:`cf zero-trust dlp profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.dlp.profiles.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Xd(e){return e.usage(`$0 zero-trust dlp profiles predefined update <profile-id>
617
624
 
618
- Updates a configured 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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const rf={command:`update <identity-provider-id>`,describe:`Update an Access identity provider`,builder:nf,handler:async i=>l({command:`zero-trust identity-providers update`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${i[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(i[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"identity-provider-id":String(i[`identity-provider-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?void 0:d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Updating`,async()=>l.zeroTrust.identityProviders.update({body:e,account_or_zone:u,account_or_zone_id:f,identity_provider_id:i[`identity-provider-id`]})),{successLabel:`Updated`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},af={command:`identity-providers`,describe:`Operations for identity-providers`,builder:e=>e.command(zd).command(Vd).command(Ud).command(Gd).command(rf).command(Jd).command(tf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function of(e){return e.usage(`$0 zero-trust organizations create
625
+ Updates a DLP predefined profile. Only supports enabling/disabling entries.`).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(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`}).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 predefined 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 Zd={command:`update <profile-id>`,describe:`Update predefined profile`,builder:Xd,handler:async n=>l({command:`zero-trust dlp profiles predefined update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp profiles predefined update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.predefined.update({...e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`});return}let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]});o(await c(`Updating`,async()=>i.zeroTrust.dlp.profiles.predefined.update({...u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`})})},Qd={command:`predefined`,describe:`Data Loss Prevention - manage predefined profiles`,builder:e=>e.command(Zd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$d={command:`profiles`,describe:`Data Loss Prevention - list and retrieve profiles`,builder:e=>e.command(qd).command(Yd).command(Gd).command(Qd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ef(e){return e.usage(`$0 zero-trust dlp sensitivity-group-templates get <template-id>
619
626
 
620
- Sets up a Zero Trust organization for your account or zone.`).option(`allow-authenticate-via-warp`,{type:`boolean`,description:`When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.`,default:!1}).option(`auth-domain`,{type:`string`,description:`The unique subdomain assigned to your Zero Trust organization.`}).option(`auto-redirect-to-identity`,{type:`boolean`,description:"When set to `true`, users skip the identity provider selection step during login.",default:!1}).option(`deny-unmatched-requests`,{type:`boolean`,description:"Determines whether to deny all requests to Cloudflare-protected resources that lack an associated Access application. If enabled, you must explicitly configure an Access application and policy to allow traffic to your Cloudflare-protected resources. For domains you want to be public across all subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` array."}).option(`deny-unmatched-requests-exempted-zone-names`,{type:`string`,array:!0,description:"Contains zone names to exempt from the `deny_unmatched_requests` feature. Requests to a subdomain in an exempted zone will block unauthenticated traffic by default if there is a configured Access application and policy that matches the request."}).option(`is-ui-read-only`,{type:`boolean`,description:`Lock all settings as Read-Only in the Dashboard, regardless of user permission. Updates may only be made via the API or Terraform for this account when enabled.`,default:!1}).option(`login-design-background-color`,{type:`string`,description:`The background color on your login page.`}).option(`login-design-footer-text`,{type:`string`,description:`The text at the bottom of your login page.`}).option(`login-design-header-text`,{type:`string`,description:`The text at the top of your login page.`}).option(`login-design-logo-path`,{type:`string`,description:`The URL of the logo on your login page.`}).option(`login-design-text-color`,{type:`string`,description:`The text color on your login page.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:"Lists the MFA methods that users can authenticate with. The `piv_key` and `ssh_fido2_key` values are supported only for infrastructure applications."}).option(`mfa-config-amr-matching-session-duration`,{type:`string`,description:`Allows a user to skip MFA via Authentication Method Reference (AMR) matching when the AMR claim provided by the IdP the user used to authenticate contains "mfa". Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days).`}).option(`mfa-config-required-aaguids`,{type:`string`,description:`Specifies a Cloudflare List of required FIDO2 authenticator device AAGUIDs.`}).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(`mfa-piv-key-requirements-pin-policy`,{type:`string`,description:"Defines when a PIN is required to use the SSH key. Valid values: `never` (no PIN required), `once` (PIN required once per session), `always` (PIN required for each use).",choices:[`never`,`once`,`always`]}).option(`mfa-piv-key-requirements-require-fips-device`,{type:`boolean`,description:`Requires the PIV key to be stored on a FIPS 140-2 Level 1 or higher validated device.`}).option(`mfa-piv-key-requirements-ssh-key-size`,{type:`string`,array:!0,description:`Specifies the allowed SSH key sizes in bits. Valid sizes depend on key type. Ed25519 has a fixed key size and does not accept this parameter.`}).option(`mfa-piv-key-requirements-ssh-key-type`,{type:`string`,array:!0,description:"Specifies the allowed SSH key types. Valid values are `ecdsa`, `ed25519`, and `rsa`."}).option(`mfa-piv-key-requirements-touch-policy`,{type:`string`,description:"Defines when physical touch is required to use the SSH key. Valid values: `never` (no touch required), `always` (touch required for each use), `cached` (touch cached for 15 seconds).",choices:[`never`,`always`,`cached`]}).option(`mfa-required-for-all-apps`,{type:`boolean`,description:`Determines whether global MFA settings apply to applications by default. The organization must have MFA enabled with at least one authentication method and a session duration configured. Note: 'allowed_authenticators' cannot contain only the infrastructure SSH authenticators ('piv_key' and 'ssh_fido2_key') if the organization has any non-infrastructure applications.`,default:!1}).option(`name`,{type:`string`,description:`The name of your Zero Trust organization.`}).option(`service-token-inactivity-action`,{type:`string`,description:`The action applied to an inactive service token.`,choices:[`disable`,`delete`]}).option(`service-token-inactivity-enabled`,{type:`boolean`,description:`Whether automatic enforcement for inactive service tokens is enabled.`}).option(`service-token-inactivity-inactivity-threshold-days`,{type:`number`,description:`The number of days a service token must be inactive before the configured action is applied.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`ui-read-only-toggle-reason`,{type:`string`,description:`A description of the reason why the UI read only field is being toggled.`}).option(`user-seat-expiration-inactive-time`,{type:`string`,description:"The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Minimum value for this setting is 1 month (730h). Must be in the format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`."}).option(`warp-auth-non-browser-401`,{type:`boolean`,description:`When enabled, unsuccessful WARP authentication requests with a non-HTML Accept header return a 401 response instead of redirecting to the login page.`,default:!1}).option(`warp-auth-session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `30m` or `2h45m`. Valid time units are: m, h."}).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([`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0)){let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].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 --service_token_inactivity-* flag is set`)}return!0})}const sf={command:`create`,describe:`Create your Zero Trust organization`,builder:of,handler:async i=>l({command:`zero-trust organizations create`,classification:{safeFlags:[`allow-authenticate-via-warp`,`auto-redirect-to-identity`,`deny-unmatched-requests`,`is-ui-read-only`,`mfa-piv-key-requirements-pin-policy`,`mfa-piv-key-requirements-require-fips-device`,`mfa-piv-key-requirements-touch-policy`,`mfa-required-for-all-apps`,`service-token-inactivity-action`,`service-token-inactivity-enabled`,`warp-auth-non-browser-401`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}):d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Creating`,async()=>l.zeroTrust.organizations.create({...e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Created`});return}i[`auth-domain`]===void 0&&(i[`auth-domain`]=await g(`auth-domain`,`The unique subdomain assigned to your Zero Trust organization.`)),i.name===void 0&&(i.name=await g(`name`,`The name of your Zero Trust organization.`));let h=p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)});o(await c(`Creating`,async()=>l.zeroTrust.organizations.create({...h,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Created`})})};function cf(e){return e.usage(`$0 zero-trust organizations doh get
627
+ Gets an available sensitivity group template.`).positional(`template-id`,{type:`string`,description:`Template ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tf={command:`get <template-id>`,describe:`Retrieve a specific sensitivity group template.`,builder:ef,handler:async n=>l({command:`zero-trust dlp sensitivity-group-templates get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-group-templates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/templates/${n[`template-id`]==null?`<template-id>`:encodeURIComponent(String(n[`template-id`]))}`,pathParams:{"template-id":String(n[`template-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroupTemplates.get({account_id:l,template_id:n[`template-id`]})),{successLabel:`Loaded`})})};function nf(e){return e.usage(`$0 zero-trust dlp sensitivity-group-templates list
621
628
 
622
- Returns the DoH settings for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lf={command:`get`,describe:`Get your Zero Trust organization DoH settings`,builder:cf,handler:async n=>l({command:`zero-trust organizations doh get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust organizations doh get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/organizations/doh`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.organizations.doh.get({account_id:l})),{successLabel:`Loaded`})})};function uf(e){return e.usage(`$0 zero-trust organizations doh update
629
+ Lists available sensitivity group templates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rf={command:`list`,describe:`Retrieve all sensitivity group templates in an account`,builder:nf,handler:async n=>l({command:`zero-trust dlp sensitivity-group-templates list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-group-templates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/templates`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroupTemplates.list({account_id:l})),{successLabel:`Loaded`})})},af={command:`sensitivity-group-templates`,describe:`Data Loss Prevention - browse templates for creating sensitivity groups`,builder:e=>e.command(tf).command(rf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function of(e){return e.usage(`$0 zero-trust dlp sensitivity-groups create
623
630
 
624
- Updates the DoH settings for your Zero Trust organization.`).option(`doh-jwt-duration`,{type:`string`,description:"The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. Note that the maximum duration for this setting is the same as the key rotation period on the account. Default expiration is 24h"}).option(`service-token-id`,{type:`string`,description:`The uuid of the service token you want to use for DoH authentication`}).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 df={command:`update`,describe:`Update your Zero Trust organization DoH settings`,builder:uf,handler:async n=>l({command:`zero-trust organizations doh update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust organizations doh update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/organizations/doh`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({doh_jwt_duration:m(n[`doh-jwt-duration`],`doh-jwt-duration`,`text`),service_token_id:m(n[`service-token-id`],`service-token-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.organizations.doh.update({...e,account_id:l})),{successLabel:`Updated`});return}let u=p({doh_jwt_duration:m(n[`doh-jwt-duration`],`doh-jwt-duration`,`text`),service_token_id:m(n[`service-token-id`],`service-token-id`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.organizations.doh.update({...u,account_id:l})),{successLabel:`Updated`})})},ff={command:`doh`,describe:`Operations for organizations.doh`,builder:e=>e.command(lf).command(df).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pf(e){return e.usage(`$0 zero-trust organizations list
631
+ 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 sf={command:`create`,describe:`Creates a new sensitivity group.`,builder:of,handler:async n=>l({command:`zero-trust dlp sensitivity-groups create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`),template_id:m(n[`template-id`],`template-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityGroups.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`),template_id:m(n[`template-id`],`template-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityGroups.create({...u,account_id:l})),{successLabel:`Created`})})};function cf(e){return e.usage(`$0 zero-trust dlp sensitivity-groups delete <sensitivity-group-id>
625
632
 
626
- Returns the configuration for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mf={command:`list`,describe:`Get your Zero Trust organization`,builder:pf,handler:async i=>l({command:`zero-trust organizations list`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.zeroTrust.organizations.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function hf(e){return e.usage(`$0 zero-trust organizations revoke-users
633
+ 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 lf={command:`delete <sensitivity-group-id>`,describe:`Delete a single sensitivity group.`,builder:cf,handler:async n=>l({command:`zero-trust dlp sensitivity-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
634
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.sensitivityGroups.delete({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Deleted`})})};function uf(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get-level-order <sensitivity-group-id>
627
635
 
628
- 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 gf={command:`revoke-users`,describe:`Revoke all Access tokens for a user`,builder:hf,handler:async i=>l({command:`zero-trust organizations revoke-users`,classification:{safeFlags:[`devices`,`warp-session-reauth`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations revoke-users`,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:i.body===void 0?p({devices:i.devices,email:m(i.email,`email`,`text`),user_uid:m(i[`user-uid`],`user-uid`,`text`),warp_session_reauth:i[`warp-session-reauth`]}):d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,!await v({force:!!i.force,message:`This operation revokes all access tokens for a user destructively.`})){process.stderr.write(`Aborted.
629
- `);return}if(i.body){let e=d(i.body);o(await c(`Deleting`,async()=>l.zeroTrust.organizations.revokeUsers({...e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Deleted`});return}i.email===void 0&&(i.email=await g(`email`,`The email of the user to revoke.`));let h=p({devices:i.devices,email:m(i.email,`email`,`text`),user_uid:m(i[`user-uid`],`user-uid`,`text`),warp_session_reauth:i[`warp-session-reauth`]});o(await c(`Deleting`,async()=>l.zeroTrust.organizations.revokeUsers({...h,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Deleted`})})};function _f(e){return e.usage(`$0 zero-trust organizations update
636
+ 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 df={command:`get-level-order <sensitivity-group-id>`,describe:`Retrieve the ordered list of level IDs for a sensitivity group.`,builder:uf,handler:async n=>l({command:`zero-trust dlp sensitivity-groups get-level-order`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups get-level-order`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroups.getLevelOrder({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Loaded`})})};function ff(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get <sensitivity-group-id>
630
637
 
631
- Updates the configuration for your Zero Trust organization.`).option(`allow-authenticate-via-warp`,{type:`boolean`,description:`When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.`}).option(`auth-domain`,{type:`string`,description:`The unique subdomain assigned to your Zero Trust organization.`}).option(`auto-redirect-to-identity`,{type:`boolean`,description:"When set to `true`, users skip the identity provider selection step during login."}).option(`custom-pages-forbidden`,{type:`string`,description:`The uid of the custom page to use when a user is denied access after failing a non-identity rule.`}).option(`custom-pages-identity-denied`,{type:`string`,description:`The uid of the custom page to use when a user is denied access.`}).option(`deny-unmatched-requests`,{type:`boolean`,description:"Determines whether to deny all requests to Cloudflare-protected resources that lack an associated Access application. If enabled, you must explicitly configure an Access application and policy to allow traffic to your Cloudflare-protected resources. For domains you want to be public across all subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` array."}).option(`deny-unmatched-requests-exempted-zone-names`,{type:`string`,array:!0,description:"Contains zone names to exempt from the `deny_unmatched_requests` feature. Requests to a subdomain in an exempted zone will block unauthenticated traffic by default if there is a configured Access application and policy that matches the request."}).option(`is-ui-read-only`,{type:`boolean`,description:`Lock all settings as Read-Only in the Dashboard, regardless of user permission. Updates may only be made via the API or Terraform for this account when enabled.`}).option(`login-design-background-color`,{type:`string`,description:`The background color on your login page.`}).option(`login-design-footer-text`,{type:`string`,description:`The text at the bottom of your login page.`}).option(`login-design-header-text`,{type:`string`,description:`The text at the top of your login page.`}).option(`login-design-logo-path`,{type:`string`,description:`The URL of the logo on your login page.`}).option(`login-design-text-color`,{type:`string`,description:`The text color on your login page.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:"Lists the MFA methods that users can authenticate with. The `piv_key` and `ssh_fido2_key` values are supported only for infrastructure applications."}).option(`mfa-config-amr-matching-session-duration`,{type:`string`,description:`Allows a user to skip MFA via Authentication Method Reference (AMR) matching when the AMR claim provided by the IdP the user used to authenticate contains "mfa". Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days).`}).option(`mfa-config-required-aaguids`,{type:`string`,description:`Specifies a Cloudflare List of required FIDO2 authenticator device AAGUIDs.`}).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(`mfa-piv-key-requirements-pin-policy`,{type:`string`,description:"Defines when a PIN is required to use the SSH key. Valid values: `never` (no PIN required), `once` (PIN required once per session), `always` (PIN required for each use).",choices:[`never`,`once`,`always`]}).option(`mfa-piv-key-requirements-require-fips-device`,{type:`boolean`,description:`Requires the PIV key to be stored on a FIPS 140-2 Level 1 or higher validated device.`}).option(`mfa-piv-key-requirements-ssh-key-size`,{type:`string`,array:!0,description:`Specifies the allowed SSH key sizes in bits. Valid sizes depend on key type. Ed25519 has a fixed key size and does not accept this parameter.`}).option(`mfa-piv-key-requirements-ssh-key-type`,{type:`string`,array:!0,description:"Specifies the allowed SSH key types. Valid values are `ecdsa`, `ed25519`, and `rsa`."}).option(`mfa-piv-key-requirements-touch-policy`,{type:`string`,description:"Defines when physical touch is required to use the SSH key. Valid values: `never` (no touch required), `always` (touch required for each use), `cached` (touch cached for 15 seconds).",choices:[`never`,`always`,`cached`]}).option(`mfa-required-for-all-apps`,{type:`boolean`,description:`Determines whether global MFA settings apply to applications by default. The organization must have MFA enabled with at least one authentication method and a session duration configured. Note: 'allowed_authenticators' cannot contain only the infrastructure SSH authenticators ('piv_key' and 'ssh_fido2_key') if the organization has any non-infrastructure applications.`}).option(`name`,{type:`string`,description:`The name of your Zero Trust organization.`}).option(`service-token-inactivity-action`,{type:`string`,description:`The action applied to an inactive service token.`,choices:[`disable`,`delete`]}).option(`service-token-inactivity-enabled`,{type:`boolean`,description:`Whether automatic enforcement for inactive service tokens is enabled.`}).option(`service-token-inactivity-inactivity-threshold-days`,{type:`number`,description:`The number of days a service token must be inactive before the configured action is applied.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`ui-read-only-toggle-reason`,{type:`string`,description:`A description of the reason why the UI read only field is being toggled.`}).option(`user-seat-expiration-inactive-time`,{type:`string`,description:"The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Minimum value for this setting is 1 month (730h). Must be in the format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`."}).option(`warp-auth-non-browser-401`,{type:`boolean`,description:`When enabled, unsuccessful WARP authentication requests with a non-HTML Accept header return a 401 response instead of redirecting to the login page.`}).option(`warp-auth-session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `30m` or `2h45m`. Valid time units are: m, h."}).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([`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0)){let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].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 --service_token_inactivity-* flag is set`)}return!0})}const vf={command:`update`,describe:`Update your Zero Trust organization`,builder:_f,handler:async i=>l({command:`zero-trust organizations update`,classification:{safeFlags:[`allow-authenticate-via-warp`,`auto-redirect-to-identity`,`deny-unmatched-requests`,`is-ui-read-only`,`mfa-piv-key-requirements-pin-policy`,`mfa-piv-key-requirements-require-fips-device`,`mfa-piv-key-requirements-touch-policy`,`mfa-required-for-all-apps`,`service-token-inactivity-action`,`service-token-inactivity-enabled`,`warp-auth-non-browser-401`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],custom_pages:{forbidden:m(i[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:m(i[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}):d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Updating`,async()=>l.zeroTrust.organizations.update({...e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Updated`});return}let h=p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],custom_pages:{forbidden:m(i[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:m(i[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)});o(await c(`Updating`,async()=>l.zeroTrust.organizations.update({...h,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Updated`})})},yf={command:`organizations`,describe:`Operations for organizations`,builder:e=>e.command(sf).command(mf).command(gf).command(vf).command(ff).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bf(e){return e.usage(`$0 zero-trust profiles custom list
638
+ Gets 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})}const pf={command:`get <sensitivity-group-id>`,describe:`Retrieve a specific sensitivity group.`,builder:ff,handler:async n=>l({command:`zero-trust dlp sensitivity-groups get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroups.get({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Loaded`})})};function mf(e){return e.usage(`$0 zero-trust dlp sensitivity-groups list
632
639
 
633
- Lists all DLP custom profiles in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xf={command:`list`,describe:`List all custom profiles`,builder:bf,handler:async n=>l({command:`zero-trust profiles custom list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust profiles custom list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/custom`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.profiles.custom.list({account_id:l})),{successLabel:`Loaded`})})},Sf={command:`custom`,describe:`Profiles operations`,builder:e=>e.command(xf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cf(e){return e.usage(`$0 zero-trust profiles predefined create
640
+ Lists sensitivity groups configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hf={command:`list`,describe:`Retrieve all sensitivity groups in an account`,builder:mf,handler:async n=>l({command:`zero-trust dlp sensitivity-groups list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityGroups.list({account_id:l})),{successLabel:`Loaded`})})};function gf(e){return e.usage(`$0 zero-trust dlp sensitivity-groups update-level-order <sensitivity-group-id>
634
641
 
635
- Creates a DLP predefined profile. Only supports enabling/disabling entries.`).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`,default:!1}).option(`allowed-match-count`,{type:`number`,description:`The allowed_match_count field`,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(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`,default:!1}).option(`profile-id`,{type:`string`,description:`The profile_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Predefined profiles can not be created. This endpoint will only update an existing predefined profiles settings.`}).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 wf={command:`create`,describe:`Create predefined profile`,builder:Cf,handler:async n=>l({command:`zero-trust profiles predefined create`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust profiles predefined create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`],profile_id:m(n[`profile-id`],`profile-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.profiles.predefined.create({...e,account_id:l})),{successLabel:`Created`});return}n[`profile-id`]===void 0&&(n[`profile-id`]=await g(`profile-id`,`The profile_id field`));let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`],profile_id:m(n[`profile-id`],`profile-id`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.profiles.predefined.create({...u,account_id:l})),{successLabel:`Created`})})};function Tf(e){return e.usage(`$0 zero-trust profiles predefined get <profile-id>
642
+ Updates the order of sensitivity levels in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`level-ids`,{type:`string`,array:!0,description:`The level_ids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired ordered list of level IDs.`})}const _f={command:`update-level-order <sensitivity-group-id>`,describe:`Set the ordering of levels within a sensitivity group.`,builder:gf,handler:async n=>l({command:`zero-trust dlp sensitivity-groups update-level-order`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups update-level-order`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({level_ids:n[`level-ids`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.updateLevelOrder({body:e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`});return}if(n[`level-ids`]===void 0)throw Error(`--level-ids is required (or pass --body with this field set).`);let u=p({level_ids:n[`level-ids`]});o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.updateLevelOrder({body:u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`})})};function vf(e){return e.usage(`$0 zero-trust dlp sensitivity-groups update <sensitivity-group-id>
636
643
 
637
- Fetches a predefined DLP profile by id.`).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 Ef={command:`get <profile-id>`,describe:`Get predefined profile`,builder:Tf,handler:async n=>l({command:`zero-trust profiles predefined get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust profiles predefined get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.profiles.predefined.get({account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Loaded`})})};function Df(e){return e.usage(`$0 zero-trust profiles predefined update <profile-id>
644
+ Updates a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`levels`,{type:`string`,description:"The desired final state of levels.\n- `None` (omitted): no level changes.\n- `Some([])`: delete all levels.\n- `Some([...])`: desired final set + order. Provide as a JSON array of objects or @path/to/file.json."}).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 group to update.`})}const yf={command:`update <sensitivity-group-id>`,describe:`Update the attributes of a single sensitivity group.`,builder:vf,handler:async n=>l({command:`zero-trust dlp sensitivity-groups update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.update({...e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),levels:f(n.levels,`levels`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityGroups.update({...u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Updated`})})},bf={command:`sensitivity-groups`,describe:`Data Loss Prevention - manage sensitivity groups and their level ordering`,builder:e=>e.command(sf).command(lf).command(pf).command(df).command(hf).command(yf).command(_f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xf(e){return e.usage(`$0 zero-trust dlp sensitivity-levels create <sensitivity-group-id>
638
645
 
639
- Updates a DLP predefined profile. Only supports enabling/disabling entries.`).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(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`}).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 predefined 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 Of={command:`update <profile-id>`,describe:`Update predefined profile`,builder:Df,handler:async n=>l({command:`zero-trust profiles predefined update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust profiles predefined update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/profiles/predefined/${n[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(n[`profile-id`]))}`,pathParams:{"profile-id":String(n[`profile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.profiles.predefined.update({...e,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`});return}let u=p({ai_context_enabled:n[`ai-context-enabled`],allowed_match_count:n[`allowed-match-count`],confidence_threshold:m(n[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:n[`context-awareness-enabled`],skip:{files:n[`context-awareness-skip-files`]}},entries:f(n.entries,`entries`),ocr_enabled:n[`ocr-enabled`]});o(await c(`Updating`,async()=>i.zeroTrust.profiles.predefined.update({...u,account_id:l,profile_id:n[`profile-id`]})),{successLabel:`Updated`})})},kf={command:`predefined`,describe:`Profiles operations`,builder:e=>e.command(wf).command(Ef).command(Of).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Af={command:`profiles`,describe:`Operations for profiles`,builder:e=>e.command(Sf).command(kf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jf(e){return e.usage(`$0 zero-trust risk-scoring behaviours get
646
+ 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 Sf={command:`create <sensitivity-group-id>`,describe:`Creates a new sensitivity level.`,builder:xf,handler:async n=>l({command:`zero-trust dlp sensitivity-levels create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityLevels.create({body:e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`The name field`));let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.dlp.sensitivityLevels.create({body:u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Created`})})};function Cf(e){return e.usage(`$0 zero-trust dlp sensitivity-levels delete <sensitivity-level-id>
640
647
 
641
- Retrieves configured risk score behaviors that define how user actions affect their overall risk score.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mf={command:`get`,describe:`Get all behaviors and associated configuration`,builder:jf,handler:async n=>l({command:`zero-trust risk-scoring behaviours get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring behaviours get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/behaviors`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.behaviours.get({account_id:l})),{successLabel:`Loaded`})})};function Nf(e){return e.usage(`$0 zero-trust risk-scoring behaviours update
648
+ 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 wf={command:`delete <sensitivity-level-id>`,describe:`Delete a single sensitivity level.`,builder:Cf,handler:async n=>l({command:`zero-trust dlp sensitivity-levels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels/${n[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(n[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``),"sensitivity-level-id":String(n[`sensitivity-level-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
649
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.sensitivityLevels.delete({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Deleted`})})};function Tf(e){return e.usage(`$0 zero-trust dlp sensitivity-levels get <sensitivity-level-id>
642
650
 
643
- Updates risk score behavior configurations, defining weights and thresholds for risk calculation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Behaviors.`})}const Pf={command:`update`,describe:`Update configuration for risk behaviors`,builder:Nf,handler:async n=>l({command:`zero-trust risk-scoring behaviours update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring behaviours update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/behaviors`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.riskScoring.behaviours.update({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ff={command:`behaviours`,describe:`User and entity risk scores derived from behavior signals, used to trigger adaptive access policies`,builder:e=>e.command(Mf).command(Pf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function If(e){return e.usage(`$0 zero-trust risk-scoring get <user-id>
651
+ 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 Ef={command:`get <sensitivity-level-id>`,describe:`Retrieve a specific sensitivity level.`,builder:Tf,handler:async n=>l({command:`zero-trust dlp sensitivity-levels get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels/${n[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(n[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``),"sensitivity-level-id":String(n[`sensitivity-level-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityLevels.get({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Loaded`})})};function Df(e){return e.usage(`$0 zero-trust dlp sensitivity-levels list
644
652
 
645
- Retrieves the detailed risk score breakdown for a specific user, including contributing factors.`).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})}const Lf={command:`get <user-id>`,describe:`Get risk event/score information for a specific user`,builder:If,handler:async n=>l({command:`zero-trust risk-scoring get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.get({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})};function Rf(e){return e.usage(`$0 zero-trust risk-scoring integrations create
653
+ Lists sensitivity levels in a sensitivity group.`).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 Of={command:`list`,describe:`Retrieve all sensitivity levels in a sensitivity group`,builder:Df,handler:async n=>l({command:`zero-trust dlp sensitivity-levels list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.sensitivityLevels.list({account_id:l,sensitivity_group_id:n[`sensitivity-group-id`]})),{successLabel:`Loaded`})})};function kf(e){return e.usage(`$0 zero-trust dlp sensitivity-levels update <sensitivity-level-id>
646
654
 
647
- 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`]}).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).
648
- 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 zf={command:`create`,describe:`Create new risk score integration.`,builder:Rf,handler:async n=>l({command:`zero-trust risk-scoring integrations create`,classification:{safeFlags:[`integration-type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({integration_type:m(n[`integration-type`],`integration-type`,`text`),reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.riskScoring.integrations.create({...e,account_id:l})),{successLabel:`Created`});return}n[`integration-type`]===void 0&&(n[`integration-type`]=await _(`integration-type`,`The integration_type field`,[`Okta`])),n[`tenant-url`]===void 0&&(n[`tenant-url`]=await g(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=p({integration_type:m(n[`integration-type`],`integration-type`,`text`),reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.riskScoring.integrations.create({...u,account_id:l})),{successLabel:`Created`})})};function Bf(e){return e.usage(`$0 zero-trust risk-scoring integrations delete <integration-id>
655
+ 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 Af={command:`update <sensitivity-level-id>`,describe:`Update the attributes of a single sensitivity level.`,builder:kf,handler:async n=>l({command:`zero-trust dlp sensitivity-levels update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp sensitivity-levels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/sensitivity_groups/${n[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(n[`sensitivity-group-id`]))}/levels/${n[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(n[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(n[`sensitivity-group-id`]??``),"sensitivity-level-id":String(n[`sensitivity-level-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityLevels.update({...e,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.dlp.sensitivityLevels.update({...u,account_id:l,sensitivity_group_id:n[`sensitivity-group-id`],sensitivity_level_id:n[`sensitivity-level-id`]})),{successLabel:`Updated`})})},jf={command:`sensitivity-levels`,describe:`Data Loss Prevention - manage sensitivity levels within sensitivity groups`,builder:e=>e.command(Sf).command(wf).command(Ef).command(Of).command(Af).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mf(e){return e.usage(`$0 zero-trust dlp settings delete
649
656
 
650
- 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 Vf={command:`delete <integration-id>`,describe:`Delete a risk score integration.`,builder:Bf,handler:async n=>l({command:`zero-trust risk-scoring integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
651
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.riskScoring.integrations.delete({account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Deleted`})})};function Hf(e){return e.usage(`$0 zero-trust risk-scoring integrations get <integration-id>
657
+ 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 Nf={command:`delete`,describe:`Delete (reset) DLP account-level settings to initial values.`,builder:Mf,handler:async n=>l({command:`zero-trust dlp settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
658
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.dlp.settings.delete({account_id:l})),{successLabel:`Deleted`})})};function Pf(e){return e.usage(`$0 zero-trust dlp settings edit
652
659
 
653
- 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 Uf={command:`get <integration-id>`,describe:`Get risk score integration by id.`,builder:Hf,handler:async n=>l({command:`zero-trust risk-scoring integrations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.integrations.get({account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Loaded`})})};function Wf(e){return e.usage(`$0 zero-trust risk-scoring integrations list
660
+ 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`]}).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
654
661
 
655
- Lists all configured Zero Trust risk score integrations for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gf={command:`list`,describe:`List all risk score integrations for the account.`,builder:Wf,handler:async n=>l({command:`zero-trust risk-scoring integrations list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.integrations.list({account_id:l})),{successLabel:`Loaded`})})};function Kf(e){return e.usage(`$0 zero-trust risk-scoring integrations references get <reference-id>
662
+ - Set to a non-empty base64 string to enable payload logging with the given key.
663
+ - Set to an empty string to disable payload logging.
664
+ - Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`DLP settings fields to update.`})}const Ff={command:`edit`,describe:`Partially update DLP account-level settings.`,builder:Pf,handler:async n=>l({command:`zero-trust dlp settings edit`,classification:{safeFlags:[`ai-context-analysis`,`ocr`,`payload-logging-masking-level`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.settings.edit({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}});o(await c(`Updating`,async()=>i.zeroTrust.dlp.settings.edit({body:u,account_id:l})),{successLabel:`Updated`})})};function If(e){return e.usage(`$0 zero-trust dlp settings get
656
665
 
657
- Retrieves a Zero Trust risk score integration using its external reference ID.`).positional(`reference-id`,{type:`string`,description:`Reference ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qf={command:`get <reference-id>`,describe:`Get risk score integration by reference id.`,builder:Kf,handler:async n=>l({command:`zero-trust risk-scoring integrations references get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations references get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/reference_id/${n[`reference-id`]==null?`<reference-id>`:encodeURIComponent(String(n[`reference-id`]))}`,pathParams:{"reference-id":String(n[`reference-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.integrations.references.get({account_id:l,reference_id:n[`reference-id`]})),{successLabel:`Loaded`})})},Jf={command:`references`,describe:`User and entity risk scores derived from behavior signals, used to trigger adaptive access policies`,builder:e=>e.command(qf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yf(e){return e.usage(`$0 zero-trust risk-scoring integrations update <integration-id>
666
+ Gets the account-level DLP settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lf={command:`get`,describe:`Get DLP account-level settings.`,builder:If,handler:async n=>l({command:`zero-trust dlp settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.dlp.settings.get({account_id:l})),{successLabel:`Loaded`})})};function Rf(e){return e.usage(`$0 zero-trust dlp settings update
658
667
 
659
- 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).
660
- 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 Xf={command:`update <integration-id>`,describe:`Update a risk score integration.`,builder:Yf,handler:async n=>l({command:`zero-trust risk-scoring integrations update`,classification:{safeFlags:[`active`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({active:n.active,reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.riskScoring.integrations.update({...e,account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Updated`});return}if(n.active===void 0)throw Error(`--active is required (or pass --body with this field set).`);n[`tenant-url`]===void 0&&(n[`tenant-url`]=await g(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=p({active:n.active,reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.riskScoring.integrations.update({...u,account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Updated`})})},Zf={command:`integrations`,describe:`User and entity risk scores derived from behavior signals, used to trigger adaptive access policies`,builder:e=>e.command(zf).command(Vf).command(Uf).command(Gf).command(Xf).command(Jf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qf(e){return e.usage(`$0 zero-trust risk-scoring reset <user-id>
668
+ Missing fields are reset to initial (unconfigured) 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`]}).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
661
669
 
662
- 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 $f={command:`reset <user-id>`,describe:`Clear the risk score for a particular user`,builder:Qf,handler:async n=>l({command:`zero-trust risk-scoring reset`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring reset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/reset`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force,message:`This operation wipes risk-scoring history.`})){process.stderr.write(`Aborted.
663
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.riskScoring.reset({account_id:l,user_id:n[`user-id`]})),{successLabel:`Deleted`})})};function ep(e){return e.usage(`$0 zero-trust risk-scoring summary get
670
+ - Set to a non-empty base64 string to enable payload logging with the given key.
671
+ - Set to an empty string to disable payload logging.
672
+ - Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`New DLP settings.`})}const zf={command:`update`,describe:`Update DLP account-level settings (full replacement).`,builder:Rf,handler:async n=>l({command:`zero-trust dlp settings update`,classification:{safeFlags:[`ai-context-analysis`,`ocr`,`payload-logging-masking-level`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust dlp settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.dlp.settings.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}});o(await c(`Updating`,async()=>i.zeroTrust.dlp.settings.update({body:u,account_id:l})),{successLabel:`Updated`})})},Bf={command:`settings`,describe:`Data Loss Prevention - manage account-level settings`,builder:e=>e.command(Nf).command(Ff).command(Lf).command(zf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Vf={command:`dlp`,describe:`Operations for dlp`,builder:e=>e.command(Wl).command(tu).command(fu).command(_u).command(Ou).command(Uu).command(nd).command(xd).command(Md).command(Fd).command(Rd).command($d).command(af).command(bf).command(jf).command(Bf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hf(e){return e.usage(`$0 zero-trust gateway app-types list
664
673
 
665
- 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 tp={command:`get`,describe:`Get risk score info for all users in the account`,builder:ep,handler:async n=>l({command:`zero-trust risk-scoring summary get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/summary`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.summary.get({account_id:l})),{successLabel:`Loaded`})})},np={command:`summary`,describe:`User and entity risk scores derived from behavior signals, used to trigger adaptive access policies`,builder:e=>e.command(tp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rp={command:`risk-scoring`,describe:`User and entity risk scores derived from behavior signals, used to trigger adaptive access policies`,builder:e=>e.command(Lf).command($f).command(Ff).command(Zf).command(np).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ip(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 ap={command:`edit`,describe:`Update a user seat`,builder:ip,handler:async n=>l({command:`zero-trust seats edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust seats edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/seats`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.seats.edit({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},op={command:`seats`,describe:`Operations for seats`,builder:e=>e.command(ap).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function sp(e){return e.usage(`$0 zero-trust settings delete
674
+ List all application and application type mappings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Uf={command:`list`,describe:`List application and application type mappings`,builder:Hf,handler:async n=>l({command:`zero-trust gateway app-types list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway app-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/app_types`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.appTypes.list({account_id:l})),{successLabel:`Loaded`})})},Wf={command:`app-types`,describe:`Operations for gateway.app-types`,builder:e=>e.command(Uf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gf(e){return e.usage(`$0 zero-trust gateway audit-ssh-settings get
666
675
 
667
- 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 cp={command:`delete`,describe:`Delete (reset) DLP account-level settings to initial values.`,builder:sp,handler:async n=>l({command:`zero-trust settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
668
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.settings.delete({account_id:l})),{successLabel:`Deleted`})})};function lp(e){return e.usage(`$0 zero-trust settings edit
676
+ Retrieve all Zero Trust Audit SSH and SSH with Access for Infrastructure settings for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kf={command:`get`,describe:`Get Zero Trust SSH settings`,builder:Gf,handler:async n=>l({command:`zero-trust gateway audit-ssh-settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway audit-ssh-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/audit_ssh_settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.auditSshSettings.get({account_id:l})),{successLabel:`Loaded`})})};function qf(e){return e.usage(`$0 zero-trust gateway audit-ssh-settings rotate-seed
669
677
 
670
- 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`]}).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
678
+ Rotate the SSH account seed that generates the host key identity when connecting through the Cloudflare SSH Proxy.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jf={command:`rotate-seed`,describe:`Rotate Zero Trust SSH account seed`,builder:qf,handler:async n=>l({command:`zero-trust gateway audit-ssh-settings rotate-seed`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway audit-ssh-settings rotate-seed`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/audit_ssh_settings/rotate_seed`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.auditSshSettings.rotateSeed({account_id:l})),{successLabel:`Created`})})};function Yf(e){return e.usage(`$0 zero-trust gateway audit-ssh-settings update
671
679
 
672
- - Set to a non-empty base64 string to enable payload logging with the given key.
673
- - Set to an empty string to disable payload logging.
674
- - Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`DLP settings fields to update.`})}const up={command:`edit`,describe:`Partially update DLP account-level settings.`,builder:lp,handler:async n=>l({command:`zero-trust settings edit`,classification:{safeFlags:[`ai-context-analysis`,`ocr`,`payload-logging-masking-level`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.settings.edit({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}});o(await c(`Updating`,async()=>i.zeroTrust.settings.edit({body:u,account_id:l})),{successLabel:`Updated`})})};function dp(e){return e.usage(`$0 zero-trust settings get
680
+ Update Zero Trust Audit SSH and SSH with Access for Infrastructure settings for an account.`).option(`public-key`,{type:`string`,description:`Provide the Base64-encoded HPKE public key that encrypts SSH session logs. See https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/#enable-ssh-command-logging.`}).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 Xf={command:`update`,describe:`Update Zero Trust SSH settings`,builder:Yf,handler:async n=>l({command:`zero-trust gateway audit-ssh-settings update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway audit-ssh-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/audit_ssh_settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({public_key:m(n[`public-key`],`public-key`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.auditSshSettings.update({...e,account_id:l})),{successLabel:`Updated`});return}n[`public-key`]===void 0&&(n[`public-key`]=await g(`public-key`,`Provide the Base64-encoded HPKE public key that encrypts SSH session logs. See https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/#enable-ssh-command-logging.`));let u=p({public_key:m(n[`public-key`],`public-key`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.auditSshSettings.update({...u,account_id:l})),{successLabel:`Updated`})})},Zf={command:`audit-ssh-settings`,describe:`Operations for gateway.audit-ssh-settings`,builder:e=>e.command(Kf).command(Jf).command(Xf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qf(e){return e.usage(`$0 zero-trust gateway categories list
675
681
 
676
- Gets the account-level DLP settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fp={command:`get`,describe:`Get DLP account-level settings.`,builder:dp,handler:async n=>l({command:`zero-trust settings get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.settings.get({account_id:l})),{successLabel:`Loaded`})})};function pp(e){return e.usage(`$0 zero-trust settings update
682
+ List all categories.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $f={command:`list`,describe:`List categories`,builder:Qf,handler:async n=>l({command:`zero-trust gateway categories list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/categories`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.categories.list({account_id:l})),{successLabel:`Loaded`})})},ep={command:`categories`,describe:`Operations for gateway.categories`,builder:e=>e.command($f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tp(e){return e.usage(`$0 zero-trust gateway certificates activate <certificate-id>
677
683
 
678
- Missing fields are reset to initial (unconfigured) 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`]}).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
684
+ Bind a single Zero Trust certificate to 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 np={command:`activate <certificate-id>`,describe:`Activate a Zero Trust certificate`,builder:tp,handler:async n=>l({command:`zero-trust gateway certificates activate`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates activate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}/activate`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.activate({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Created`})})};function rp(e){return e.usage(`$0 zero-trust gateway certificates create
679
685
 
680
- - Set to a non-empty base64 string to enable payload logging with the given key.
681
- - Set to an empty string to disable payload logging.
682
- - Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`New DLP settings.`})}const mp={command:`update`,describe:`Update DLP account-level settings (full replacement).`,builder:pp,handler:async n=>l({command:`zero-trust settings update`,classification:{safeFlags:[`ai-context-analysis`,`ocr`,`payload-logging-masking-level`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.settings.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({ai_context_analysis:n[`ai-context-analysis`],ocr:n.ocr,payload_logging:{masking_level:m(n[`payload-logging-masking-level`],`payload-logging-masking-level`,`text`),public_key:m(n[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}});o(await c(`Updating`,async()=>i.zeroTrust.settings.update({body:u,account_id:l})),{successLabel:`Updated`})})},hp={command:`settings`,describe:`Settings operations`,builder:e=>e.command(cp).command(up).command(fp).command(mp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gp(e){return e.usage(`$0 zero-trust users mfa authenticators delete <authenticator-id>
686
+ Create a new Zero Trust certificate.`).option(`validity-period-days`,{type:`number`,description:"Sets the certificate validity period in days (range: 1-10,950 days / ~30 years). Defaults to 1,825 days (5 years). **Important**: This field is only settable during the certificate creation. Certificates becomes immutable after creation - use the `/activate` and `/deactivate` endpoints to manage certificate lifecycle."}).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 ip={command:`create`,describe:`Create Zero Trust certificate`,builder:rp,handler:async n=>l({command:`zero-trust gateway certificates create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({validity_period_days:n[`validity-period-days`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.create({...e,account_id:l})),{successLabel:`Created`});return}let u=p({validity_period_days:n[`validity-period-days`]});o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.create({...u,account_id:l})),{successLabel:`Created`})})};function ap(e){return e.usage(`$0 zero-trust gateway certificates deactivate <certificate-id>
687
+
688
+ 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 op={command:`deactivate <certificate-id>`,describe:`Deactivate a Zero Trust certificate`,builder:ap,handler:async n=>l({command:`zero-trust gateway certificates deactivate`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates deactivate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}/deactivate`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.certificates.deactivate({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Created`})})};function sp(e){return e.usage(`$0 zero-trust gateway certificates delete <certificate-id>
689
+
690
+ 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 cp={command:`delete <certificate-id>`,describe:`Delete Zero Trust certificate`,builder:sp,handler:async n=>l({command:`zero-trust gateway certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
691
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.certificates.delete({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Deleted`})})};function lp(e){return e.usage(`$0 zero-trust gateway certificates get <certificate-id>
692
+
693
+ 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 up={command:`get <certificate-id>`,describe:`Get Zero Trust certificate details`,builder:lp,handler:async n=>l({command:`zero-trust gateway certificates get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates/${n[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(n[`certificate-id`]))}`,pathParams:{"certificate-id":String(n[`certificate-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.certificates.get({account_id:l,certificate_id:n[`certificate-id`]})),{successLabel:`Loaded`})})};function dp(e){return e.usage(`$0 zero-trust gateway certificates list
694
+
695
+ List all Zero Trust certificates for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fp={command:`list`,describe:`List Zero Trust certificates`,builder:dp,handler:async n=>l({command:`zero-trust gateway certificates list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/certificates`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.certificates.list({account_id:l})),{successLabel:`Loaded`})})},pp={command:`certificates`,describe:`Operations for gateway.certificates`,builder:e=>e.command(np).command(ip).command(op).command(cp).command(up).command(fp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mp(e){return e.usage("$0 zero-trust gateway configurations edit\n\nUpdate (PATCH) a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, `certificate`, or `max_ttl_secs` without updating the entire configuration object. This endpoint returns an error if any settings collection lacks proper configuration.").option(`settings-activity-log-enabled`,{type:`boolean`,description:`Specify whether to log activity.`}).option(`settings-antivirus-enabled-download-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on downloads.`}).option(`settings-antivirus-enabled-upload-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on uploads.`}).option(`settings-antivirus-fail-closed`,{type:`boolean`,description:`Specify whether to block requests for unscannable files.`}).option(`settings-antivirus-notification-settings-enabled`,{type:`boolean`,description:`Specify whether to enable notifications.`}).option(`settings-antivirus-notification-settings-include-context`,{type:`boolean`,description:`Specify whether to include context information as query parameters.`}).option(`settings-antivirus-notification-settings-msg`,{type:`string`,description:`Specify the message to show in the notification.`}).option(`settings-antivirus-notification-settings-support-url`,{type:`string`,description:`Specify a URL that directs users to more information. If unset, the notification opens a block page.`}).option(`settings-block-page-background-color`,{type:`string`,description:"Specify the block page background color in `#rrggbb` format when the mode is customized_block_page."}).option(`settings-block-page-enabled`,{type:`boolean`,description:`Specify whether to enable the custom block page.`}).option(`settings-block-page-footer-text`,{type:`string`,description:`Specify the block page footer text when the mode is customized_block_page.`}).option(`settings-block-page-header-text`,{type:`string`,description:`Specify the block page header text when the mode is customized_block_page.`}).option(`settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to append context to target_uri as query parameters. This applies only when the mode is redirect_uri.`}).option(`settings-block-page-logo-path`,{type:`string`,description:`Specify the full URL to the logo file when the mode is customized_block_page.`}).option(`settings-block-page-mailto-address`,{type:`string`,description:`Specify the admin email for users to contact when the mode is customized_block_page.`}).option(`settings-block-page-mailto-subject`,{type:`string`,description:`Specify the subject line for emails created from the block page when the mode is customized_block_page.`}).option(`settings-block-page-mode`,{type:`string`,description:`Specify whether to redirect users to a Cloudflare-hosted block page or a customer-provided URI.`,choices:[`customized_block_page`,`redirect_uri`]}).option(`settings-block-page-name`,{type:`string`,description:`Specify the block page title when the mode is customized_block_page.`}).option(`settings-block-page-suppress-footer`,{type:`boolean`,description:`Specify whether to suppress detailed information at the bottom of the block page when the mode is customized_block_page.`}).option(`settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to redirect users to when the mode is redirect_uri.`}).option(`settings-body-scanning-inspection-mode`,{type:`string`,description:"Specify the inspection mode as either `deep` or `shallow`.",choices:[`deep`,`shallow`]}).option(`settings-browser-isolation-non-identity-enabled`,{type:`boolean`,description:`Specify whether to enable non-identity onramp support for Browser Isolation.`}).option(`settings-browser-isolation-url-browser-isolation-enabled`,{type:`boolean`,description:`Specify whether to enable Clientless Browser Isolation.`}).option(`settings-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate used for interception. Ensure the certificate is available at the edge(previously called 'active'). A nil UUID directs Cloudflare to use the Root CA.`}).option(`settings-custom-certificate-enabled`,{type:`boolean`,description:`Specify whether to enable a custom certificate authority for signing Gateway traffic.`}).option(`settings-custom-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate (ID from MTLS certificate store).`}).option(`settings-extended-email-matching-enabled`,{type:`boolean`,description:`Specify whether to match all variants of user emails (with + or . modifiers) used as criteria in Firewall policies.`}).option(`settings-fips-tls`,{type:`boolean`,description:`Enforce cipher suites and TLS versions compliant with FIPS 140-2.`}).option(`settings-host-selector-enabled`,{type:`boolean`,description:`Specify whether to enable filtering via hosts for egress policies.`}).option(`settings-inspection-mode`,{type:`string`,description:`Define the proxy inspection mode. 1. static: Gateway applies static inspection to HTTP on TCP(80). With TLS decryption on, Gateway inspects HTTPS traffic on TCP(443) and UDP(443). 2. dynamic: Gateway applies protocol detection to inspect HTTP and HTTPS traffic on any port. TLS decryption must remain on to inspect HTTPS traffic.`,choices:[`static`,`dynamic`]}).option(`settings-max-ttl-secs`,{type:`number`,description:"Account-level cap on DNS response TTLs, in seconds. Gateway rewrites DNS responses so returned record TTLs do not exceed this value. Null means no cap. Each DNS location can inherit, override, or disable it through the location `max_ttl` setting."}).option(`settings-protocol-detection-enabled`,{type:`boolean`,description:`Specify whether to detect protocols from the initial bytes of client traffic.`}).option(`settings-sandbox-enabled`,{type:`boolean`,description:`Specify whether to enable the sandbox.`}).option(`settings-sandbox-fallback-action`,{type:`string`,description:`Specify the action to take when the system cannot scan the file.`,choices:[`allow`,`block`]}).option(`settings-tls-decrypt-enabled`,{type:`boolean`,description:`Specify whether to inspect encrypted HTTP traffic.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify account settings.`}).check(e=>{if(`settings-activity-log-enabled.settings-antivirus-enabled-download-phase.settings-antivirus-enabled-upload-phase.settings-antivirus-fail-closed.settings-antivirus-notification-settings-enabled.settings-antivirus-notification-settings-include-context.settings-antivirus-notification-settings-msg.settings-antivirus-notification-settings-support-url.settings-block-page-background-color.settings-block-page-enabled.settings-block-page-footer-text.settings-block-page-header-text.settings-block-page-include-context.settings-block-page-logo-path.settings-block-page-mailto-address.settings-block-page-mailto-subject.settings-block-page-mode.settings-block-page-name.settings-block-page-suppress-footer.settings-block-page-target-uri.settings-body-scanning-inspection-mode.settings-browser-isolation-non-identity-enabled.settings-browser-isolation-url-browser-isolation-enabled.settings-certificate-id.settings-custom-certificate-enabled.settings-custom-certificate-id.settings-extended-email-matching-enabled.settings-fips-tls.settings-host-selector-enabled.settings-inspection-mode.settings-max-ttl-secs.settings-protocol-detection-enabled.settings-sandbox-enabled.settings-sandbox-fallback-action.settings-tls-decrypt-enabled`.split(`.`).some(t=>e[t]!==void 0)){let t=[`settings-certificate-id`,`settings-custom-certificate-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 --settings-* flag is set`)}return!0})}const hp={command:`edit`,describe:`Patch Zero Trust account configuration`,builder:mp,handler:async n=>l({command:`zero-trust gateway configurations edit`,classification:{safeFlags:[`settings-activity-log-enabled`,`settings-antivirus-enabled-download-phase`,`settings-antivirus-enabled-upload-phase`,`settings-antivirus-fail-closed`,`settings-antivirus-notification-settings-enabled`,`settings-antivirus-notification-settings-include-context`,`settings-block-page-enabled`,`settings-block-page-include-context`,`settings-block-page-mode`,`settings-block-page-suppress-footer`,`settings-body-scanning-inspection-mode`,`settings-browser-isolation-non-identity-enabled`,`settings-browser-isolation-url-browser-isolation-enabled`,`settings-custom-certificate-enabled`,`settings-extended-email-matching-enabled`,`settings-fips-tls`,`settings-host-selector-enabled`,`settings-inspection-mode`,`settings-protocol-detection-enabled`,`settings-sandbox-enabled`,`settings-sandbox-fallback-action`,`settings-tls-decrypt-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway configurations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.edit({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}});o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.edit({body:u,account_id:l})),{successLabel:`Updated`})})};function gp(e){return e.usage(`$0 zero-trust gateway configurations get
696
+
697
+ Retrieve the current Zero Trust account configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _p={command:`get`,describe:`Get Zero Trust account configuration`,builder:gp,handler:async n=>l({command:`zero-trust gateway configurations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.configurations.get({account_id:l})),{successLabel:`Loaded`})})};function vp(e){return e.usage(`$0 zero-trust gateway configurations update
698
+
699
+ Update the current Zero Trust account configuration.`).option(`settings-activity-log-enabled`,{type:`boolean`,description:`Specify whether to log activity.`}).option(`settings-antivirus-enabled-download-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on downloads.`}).option(`settings-antivirus-enabled-upload-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on uploads.`}).option(`settings-antivirus-fail-closed`,{type:`boolean`,description:`Specify whether to block requests for unscannable files.`}).option(`settings-antivirus-notification-settings-enabled`,{type:`boolean`,description:`Specify whether to enable notifications.`}).option(`settings-antivirus-notification-settings-include-context`,{type:`boolean`,description:`Specify whether to include context information as query parameters.`}).option(`settings-antivirus-notification-settings-msg`,{type:`string`,description:`Specify the message to show in the notification.`}).option(`settings-antivirus-notification-settings-support-url`,{type:`string`,description:`Specify a URL that directs users to more information. If unset, the notification opens a block page.`}).option(`settings-block-page-background-color`,{type:`string`,description:"Specify the block page background color in `#rrggbb` format when the mode is customized_block_page."}).option(`settings-block-page-enabled`,{type:`boolean`,description:`Specify whether to enable the custom block page.`}).option(`settings-block-page-footer-text`,{type:`string`,description:`Specify the block page footer text when the mode is customized_block_page.`}).option(`settings-block-page-header-text`,{type:`string`,description:`Specify the block page header text when the mode is customized_block_page.`}).option(`settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to append context to target_uri as query parameters. This applies only when the mode is redirect_uri.`}).option(`settings-block-page-logo-path`,{type:`string`,description:`Specify the full URL to the logo file when the mode is customized_block_page.`}).option(`settings-block-page-mailto-address`,{type:`string`,description:`Specify the admin email for users to contact when the mode is customized_block_page.`}).option(`settings-block-page-mailto-subject`,{type:`string`,description:`Specify the subject line for emails created from the block page when the mode is customized_block_page.`}).option(`settings-block-page-mode`,{type:`string`,description:`Specify whether to redirect users to a Cloudflare-hosted block page or a customer-provided URI.`,choices:[`customized_block_page`,`redirect_uri`]}).option(`settings-block-page-name`,{type:`string`,description:`Specify the block page title when the mode is customized_block_page.`}).option(`settings-block-page-suppress-footer`,{type:`boolean`,description:`Specify whether to suppress detailed information at the bottom of the block page when the mode is customized_block_page.`}).option(`settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to redirect users to when the mode is redirect_uri.`}).option(`settings-body-scanning-inspection-mode`,{type:`string`,description:"Specify the inspection mode as either `deep` or `shallow`.",choices:[`deep`,`shallow`]}).option(`settings-browser-isolation-non-identity-enabled`,{type:`boolean`,description:`Specify whether to enable non-identity onramp support for Browser Isolation.`}).option(`settings-browser-isolation-url-browser-isolation-enabled`,{type:`boolean`,description:`Specify whether to enable Clientless Browser Isolation.`}).option(`settings-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate used for interception. Ensure the certificate is available at the edge(previously called 'active'). A nil UUID directs Cloudflare to use the Root CA.`}).option(`settings-custom-certificate-enabled`,{type:`boolean`,description:`Specify whether to enable a custom certificate authority for signing Gateway traffic.`}).option(`settings-custom-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate (ID from MTLS certificate store).`}).option(`settings-extended-email-matching-enabled`,{type:`boolean`,description:`Specify whether to match all variants of user emails (with + or . modifiers) used as criteria in Firewall policies.`}).option(`settings-fips-tls`,{type:`boolean`,description:`Enforce cipher suites and TLS versions compliant with FIPS 140-2.`}).option(`settings-host-selector-enabled`,{type:`boolean`,description:`Specify whether to enable filtering via hosts for egress policies.`}).option(`settings-inspection-mode`,{type:`string`,description:`Define the proxy inspection mode. 1. static: Gateway applies static inspection to HTTP on TCP(80). With TLS decryption on, Gateway inspects HTTPS traffic on TCP(443) and UDP(443). 2. dynamic: Gateway applies protocol detection to inspect HTTP and HTTPS traffic on any port. TLS decryption must remain on to inspect HTTPS traffic.`,choices:[`static`,`dynamic`]}).option(`settings-max-ttl-secs`,{type:`number`,description:"Account-level cap on DNS response TTLs, in seconds. Gateway rewrites DNS responses so returned record TTLs do not exceed this value. Null means no cap. Each DNS location can inherit, override, or disable it through the location `max_ttl` setting."}).option(`settings-protocol-detection-enabled`,{type:`boolean`,description:`Specify whether to detect protocols from the initial bytes of client traffic.`}).option(`settings-sandbox-enabled`,{type:`boolean`,description:`Specify whether to enable the sandbox.`}).option(`settings-sandbox-fallback-action`,{type:`string`,description:`Specify the action to take when the system cannot scan the file.`,choices:[`allow`,`block`]}).option(`settings-tls-decrypt-enabled`,{type:`boolean`,description:`Specify whether to inspect encrypted HTTP traffic.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify account settings.`}).check(e=>{if(`settings-activity-log-enabled.settings-antivirus-enabled-download-phase.settings-antivirus-enabled-upload-phase.settings-antivirus-fail-closed.settings-antivirus-notification-settings-enabled.settings-antivirus-notification-settings-include-context.settings-antivirus-notification-settings-msg.settings-antivirus-notification-settings-support-url.settings-block-page-background-color.settings-block-page-enabled.settings-block-page-footer-text.settings-block-page-header-text.settings-block-page-include-context.settings-block-page-logo-path.settings-block-page-mailto-address.settings-block-page-mailto-subject.settings-block-page-mode.settings-block-page-name.settings-block-page-suppress-footer.settings-block-page-target-uri.settings-body-scanning-inspection-mode.settings-browser-isolation-non-identity-enabled.settings-browser-isolation-url-browser-isolation-enabled.settings-certificate-id.settings-custom-certificate-enabled.settings-custom-certificate-id.settings-extended-email-matching-enabled.settings-fips-tls.settings-host-selector-enabled.settings-inspection-mode.settings-max-ttl-secs.settings-protocol-detection-enabled.settings-sandbox-enabled.settings-sandbox-fallback-action.settings-tls-decrypt-enabled`.split(`.`).some(t=>e[t]!==void 0)){let t=[`settings-certificate-id`,`settings-custom-certificate-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 --settings-* flag is set`)}return!0})}const yp={command:`update`,describe:`Update Zero Trust account configuration`,builder:vp,handler:async n=>l({command:`zero-trust gateway configurations update`,classification:{safeFlags:[`settings-activity-log-enabled`,`settings-antivirus-enabled-download-phase`,`settings-antivirus-enabled-upload-phase`,`settings-antivirus-fail-closed`,`settings-antivirus-notification-settings-enabled`,`settings-antivirus-notification-settings-include-context`,`settings-block-page-enabled`,`settings-block-page-include-context`,`settings-block-page-mode`,`settings-block-page-suppress-footer`,`settings-body-scanning-inspection-mode`,`settings-browser-isolation-non-identity-enabled`,`settings-browser-isolation-url-browser-isolation-enabled`,`settings-custom-certificate-enabled`,`settings-extended-email-matching-enabled`,`settings-fips-tls`,`settings-host-selector-enabled`,`settings-inspection-mode`,`settings-protocol-detection-enabled`,`settings-sandbox-enabled`,`settings-sandbox-fallback-action`,`settings-tls-decrypt-enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({settings:{activity_log:{enabled:n[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:n[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:n[`settings-antivirus-enabled-upload-phase`],fail_closed:n[`settings-antivirus-fail-closed`],notification_settings:{enabled:n[`settings-antivirus-notification-settings-enabled`],include_context:n[`settings-antivirus-notification-settings-include-context`],msg:m(n[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:m(n[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:m(n[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:n[`settings-block-page-enabled`],footer_text:m(n[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:m(n[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:n[`settings-block-page-include-context`],logo_path:m(n[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:m(n[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:m(n[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:m(n[`settings-block-page-mode`],`settings-block-page-mode`,`text`),name:m(n[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:n[`settings-block-page-suppress-footer`],target_uri:m(n[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:m(n[`settings-body-scanning-inspection-mode`],`settings-body-scanning-inspection-mode`,`text`)},browser_isolation:{non_identity_enabled:n[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:n[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:m(n[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:n[`settings-custom-certificate-enabled`],id:m(n[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:n[`settings-extended-email-matching-enabled`]},fips:{tls:n[`settings-fips-tls`]},host_selector:{enabled:n[`settings-host-selector-enabled`]},inspection:{mode:m(n[`settings-inspection-mode`],`settings-inspection-mode`,`text`)},max_ttl_secs:n[`settings-max-ttl-secs`],protocol_detection:{enabled:n[`settings-protocol-detection-enabled`]},sandbox:{enabled:n[`settings-sandbox-enabled`],fallback_action:m(n[`settings-sandbox-fallback-action`],`settings-sandbox-fallback-action`,`text`)},tls_decrypt:{enabled:n[`settings-tls-decrypt-enabled`]}}});o(await c(`Updating`,async()=>i.zeroTrust.gateway.configurations.update({body:u,account_id:l})),{successLabel:`Updated`})})},bp={command:`configurations`,describe:`Operations for gateway.configurations`,builder:e=>e.command(hp).command(_p).command(yp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xp(e){return e.usage(`$0 zero-trust gateway create
700
+
701
+ Create a Zero Trust account for an existing Cloudflare account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sp={command:`create`,describe:`Create Zero Trust account`,builder:xp,handler:async n=>l({command:`zero-trust gateway create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.create({account_id:l})),{successLabel:`Created`})})};function Cp(e){return e.usage(`$0 zero-trust gateway dns-destination-ips list
702
+
703
+ List Zero Trust Gateway IPv4 address pairs for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wp={command:`list`,describe:`List Zero Trust Gateway DNS destination IPv4 address pairs`,builder:Cp,handler:async n=>l({command:`zero-trust gateway dns-destination-ips list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway dns-destination-ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/dns_destination_ips`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.dnsDestinationIps.list({account_id:l})),{successLabel:`Loaded`})})},Tp={command:`dns-destination-ips`,describe:`Operations for gateway.dns-destination-ips`,builder:e=>e.command(wp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ep(e){return e.usage(`$0 zero-trust gateway egress-cidr-pairs list
704
+
705
+ Retrieve the list of egress CIDRs allocated to this Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dp={command:`list`,describe:`Get gateway egress CIDRs pairs assigned to this account`,builder:Ep,handler:async n=>l({command:`zero-trust gateway egress-cidr-pairs list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway egress-cidr-pairs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/egress_cidr_pairs`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.egressCidrPairs.list({account_id:l})),{successLabel:`Loaded`})})},Op={command:`egress-cidr-pairs`,describe:`Operations for gateway.egress-cidr-pairs`,builder:e=>e.command(Dp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kp(e){return e.usage(`$0 zero-trust gateway list
706
+
707
+ Retrieve information about the current Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ap={command:`list`,describe:`Get Zero Trust account information`,builder:kp,handler:async n=>l({command:`zero-trust gateway list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.list({account_id:l})),{successLabel:`Loaded`})})};function jp(e){return e.usage(`$0 zero-trust gateway lists create
708
+
709
+ 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`]}).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 Mp={command:`create`,describe:`Create Zero Trust list`,builder:jp,handler:async n=>l({command:`zero-trust gateway lists create`,classification:{safeFlags:[`type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.lists.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the list name.`)),n.type===void 0&&(n.type=await _(`type`,`Specify the list type.`,[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]));let u=p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`),type:m(n.type,`type`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.lists.create({...u,account_id:l})),{successLabel:`Created`})})};function Np(e){return e.usage(`$0 zero-trust gateway lists delete <list-id>
710
+
711
+ 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 Pp={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:Np,handler:async n=>l({command:`zero-trust gateway lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
712
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.lists.delete({account_id:l,list_id:n[`list-id`]})),{successLabel:`Deleted`})})};function Fp(e){return e.usage(`$0 zero-trust gateway lists edit <list-id>
713
+
714
+ 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 Ip={command:`edit <list-id>`,describe:`Patch Zero Trust list.`,builder:Fp,handler:async n=>l({command:`zero-trust gateway lists edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({append:f(n.append,`append`),remove:n.remove}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.edit({...e,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`});return}let u=p({append:f(n.append,`append`),remove:n.remove});o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.edit({...u,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`})})};function Lp(e){return e.usage(`$0 zero-trust gateway lists get <list-id>
715
+
716
+ Fetch a single 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})}const Rp={command:`get <list-id>`,describe:`Get Zero Trust list details`,builder:Lp,handler:async n=>l({command:`zero-trust gateway lists get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.lists.get({account_id:l,list_id:n[`list-id`]})),{successLabel:`Loaded`})})};function zp(e){return e.usage(`$0 zero-trust gateway lists items list
717
+
718
+ Fetch all items in a single Zero Trust list.`).option(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bp={command:`list`,describe:`Get Zero Trust list items`,builder:zp,handler:async n=>l({command:`zero-trust gateway lists items list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust gateway lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}/items`,pathParams:{"list-id":String(n[`list-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.lists.items.list({account_id:u,list_id:n[`list-id`],...i})),{successLabel:`Loaded`})})},Vp={command:`items`,describe:`Operations for gateway.lists.items`,builder:e=>e.command(Bp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hp(e){return e.usage(`$0 zero-trust gateway lists list
719
+
720
+ Fetch all Zero Trust lists for an account.`).option(`type`,{type:`string`,description:`Specify the list type.`,choices:[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]}).option(`filter`,{type:`string`,description:"Filter the returned lists by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a list must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the list name.\n * `id` — substring match on the list ID (UUID), with or without dashes.\n * `type` — exact match on the list type. Supersedes the legacy `type` query\n parameter when both are supplied. Must be one of the valid type values.\n * `item_count` — exact integer match on the number of items in the list.\n\nEach entry must match one of the per-field patterns below: the field must be\none of `name`, `id`, `type`, or `item_count`; `name`/`id` accept any value,\n`type` is restricted to the valid list type values, and `item_count` must be\na non-negative integer."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the list name or description. When\ncombined with `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned lists by. When omitted, results are ordered by\n`created_at` in ascending order (i.e. creation order) for backwards\ncompatibility. Supported values:\n * `name` — sort alphabetically by list name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.\n * `item_count` — sort by number of items in the list.",choices:[`name`,`created_at`,`updated_at`,`item_count`]}).option(`direction`,{type:`string`,description:"Sort direction. Applies to the field named in `order_by`; when `order_by`\nis omitted it applies to the default `created_at` ordering. When\n`direction` is omitted the default is field-specific: explicitly choosing\n`created_at` or `updated_at` defaults to descending (newest first); `name`\nand `item_count` default to ascending; and the default `created_at`\nordering used when `order_by` is omitted is ascending (for backwards\ncompatibility).\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Up={command:`list`,describe:`List Zero Trust lists`,builder:y(Hp),handler:async n=>l({command:`zero-trust gateway lists list`,classification:{safeFlags:[`type`,`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={type:n.type,filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.lists.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Wp(e){return e.usage(`$0 zero-trust gateway lists update <list-id>
721
+
722
+ Updates a configured Zero Trust list. Skips updating list items if not included in the payload. A non empty list items will overwrite the existing list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).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(`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 Gp={command:`update <list-id>`,describe:`Update Zero Trust list`,builder:Wp,handler:async n=>l({command:`zero-trust gateway lists update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/${n[`list-id`]==null?`<list-id>`:encodeURIComponent(String(n[`list-id`]))}`,pathParams:{"list-id":String(n[`list-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.update({...e,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the list name.`));let u=p({description:m(n.description,`description`,`text`),items:f(n.items,`items`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.lists.update({...u,account_id:l,list_id:n[`list-id`]})),{successLabel:`Updated`})})};function Kp(e){return e.usage("$0 zero-trust gateway lists upload\n\nCreate a new Zero Trust list by uploading a CSV file. The file must be `text/csv` or `text/plain` and cannot exceed 2 MB. The operation is processed asynchronously. Use the returned operation ID to poll for status.").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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const qp={command:`upload`,describe:`Create Zero Trust list from CSV`,builder:Kp,handler:async n=>l({command:`zero-trust gateway lists upload`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway lists upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/lists/upload`,pathParams:{},bodyKind:`multipart`,body:{body:n.body,file:n.file}});return}let l=await a(n),u=n.local?e:await r();if(n.accountId=u,n.file!==void 0||n.body!==void 0){let e=new FormData;if(n.file){let t=h(n.file);e.append(`file`,new Blob([t]),n.file.split(/[\\/]/).filter(Boolean).pop())}else n.body!==void 0&&e.append(`file`,n.body);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/gateway/lists/upload`,{body:e})),{successLabel:`Created`});return}if(n.body){let e=m(n.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/gateway/lists/upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Jp={command:`lists`,describe:`Operations for gateway.lists`,builder:e=>e.command(Mp).command(Pp).command(Ip).command(Rp).command(Up).command(Gp).command(qp).command(Vp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yp(e){return e.usage(`$0 zero-trust gateway locations create
723
+
724
+ Create a new Zero Trust Gateway location.`).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`,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-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-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(`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`]}).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 Xp={command:`create`,describe:`Create a Zero Trust Gateway location`,builder:Yp,handler:async n=>l({command:`zero-trust gateway locations create`,classification:{safeFlags:[`client-default`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.locations.create({...e,account_id:l})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the location name.`));let u=p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.locations.create({...u,account_id:l})),{successLabel:`Created`})})};function Zp(e){return e.usage(`$0 zero-trust gateway locations delete <location-id>
725
+
726
+ 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 Qp={command:`delete <location-id>`,describe:`Delete a Zero Trust Gateway location`,builder:Zp,handler:async n=>l({command:`zero-trust gateway locations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations/${n[`location-id`]==null?`<location-id>`:encodeURIComponent(String(n[`location-id`]))}`,pathParams:{"location-id":String(n[`location-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
727
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.locations.delete({account_id:l,location_id:n[`location-id`]})),{successLabel:`Deleted`})})};function $p(e){return e.usage(`$0 zero-trust gateway locations get <location-id>
728
+
729
+ 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 em={command:`get <location-id>`,describe:`Get Zero Trust Gateway location details`,builder:$p,handler:async n=>l({command:`zero-trust gateway locations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations/${n[`location-id`]==null?`<location-id>`:encodeURIComponent(String(n[`location-id`]))}`,pathParams:{"location-id":String(n[`location-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.locations.get({account_id:l,location_id:n[`location-id`]})),{successLabel:`Loaded`})})};function tm(e){return e.usage(`$0 zero-trust gateway locations list
730
+
731
+ List Zero Trust Gateway locations for an account.`).option(`filter`,{type:`string`,description:"Filter the returned locations by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a location must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the location name.\n * `id` — substring match on the location ID (UUID), with or without dashes.\n * `is_default` — whether it is the default for the account.\n\nEach entry must match one of the per-field patterns below:\n * the field must be one of `name`, `id`, or `is_default`;\n * `name`/`id` accept any value;\n * `is_default` only accepts `true` or `false`; any other value returns `400`"}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the location name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned locations by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by location name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nm={command:`list`,describe:`List Zero Trust Gateway locations`,builder:y(tm),handler:async n=>l({command:`zero-trust gateway locations list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway locations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.locations.list({account_id:u,...i})),{successLabel:`Loaded`})})};function rm(e){return e.usage(`$0 zero-trust gateway locations update <location-id>
732
+
733
+ Update a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`}).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.`}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).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-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(`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`]}).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 im={command:`update <location-id>`,describe:`Update a Zero Trust Gateway location`,builder:rm,handler:async n=>l({command:`zero-trust gateway locations update`,classification:{safeFlags:[`client-default`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway locations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/locations/${n[`location-id`]==null?`<location-id>`:encodeURIComponent(String(n[`location-id`]))}`,pathParams:{"location-id":String(n[`location-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.locations.update({...e,account_id:l,location_id:n[`location-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await g(`name`,`Specify the location name.`));let u=p({client_default:n[`client-default`],dns_destination_ips_id:m(n[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:n[`ecs-support`],endpoints:{doh:{enabled:n[`endpoints-doh-enabled`],require_token:n[`endpoints-doh-require-token`]},dot:{enabled:n[`endpoints-dot-enabled`]},ipv4:{enabled:n[`endpoints-ipv4-enabled`]},ipv6:{enabled:n[`endpoints-ipv6-enabled`]}},max_ttl:{mode:m(n[`max-ttl-mode`],`max-ttl-mode`,`text`),ttl_secs:n[`max-ttl-ttl-secs`]},name:m(n.name,`name`,`text`),networks:f(n.networks,`networks`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.locations.update({...u,account_id:l,location_id:n[`location-id`]})),{successLabel:`Updated`})})},am={command:`locations`,describe:`Operations for gateway.locations`,builder:e=>e.command(Xp).command(Qp).command(em).command(nm).command(im).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function om(e){return e.usage(`$0 zero-trust gateway logging get
734
+
735
+ Retrieve the current logging settings for the Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sm={command:`get`,describe:`Get logging settings for the Zero Trust account`,builder:om,handler:async n=>l({command:`zero-trust gateway logging get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway logging get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/logging`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.logging.get({account_id:l})),{successLabel:`Loaded`})})};function cm(e){return e.usage(`$0 zero-trust gateway logging update
736
+
737
+ Update logging settings for the current Zero Trust account.`).option(`redact-pii`,{type:`boolean`,description:`Indicate whether to redact personally identifiable information from activity logging (PII fields include source IP, user email, user ID, device ID, URL, referrer, and user agent).`}).option(`settings-by-rule-type-dns-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-dns-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-http-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-http-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-l4-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-l4-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).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 lm={command:`update`,describe:`Update Zero Trust account logging settings`,builder:cm,handler:async n=>l({command:`zero-trust gateway logging update`,classification:{safeFlags:[`redact-pii`,`settings-by-rule-type-dns-log-all`,`settings-by-rule-type-dns-log-blocks`,`settings-by-rule-type-http-log-all`,`settings-by-rule-type-http-log-blocks`,`settings-by-rule-type-l4-log-all`,`settings-by-rule-type-l4-log-blocks`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway logging update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/logging`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({redact_pii:n[`redact-pii`],settings_by_rule_type:{dns:{log_all:n[`settings-by-rule-type-dns-log-all`],log_blocks:n[`settings-by-rule-type-dns-log-blocks`]},http:{log_all:n[`settings-by-rule-type-http-log-all`],log_blocks:n[`settings-by-rule-type-http-log-blocks`]},l4:{log_all:n[`settings-by-rule-type-l4-log-all`],log_blocks:n[`settings-by-rule-type-l4-log-blocks`]}}}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.logging.update({body:e,account_id:l})),{successLabel:`Updated`});return}let u=p({redact_pii:n[`redact-pii`],settings_by_rule_type:{dns:{log_all:n[`settings-by-rule-type-dns-log-all`],log_blocks:n[`settings-by-rule-type-dns-log-blocks`]},http:{log_all:n[`settings-by-rule-type-http-log-all`],log_blocks:n[`settings-by-rule-type-http-log-blocks`]},l4:{log_all:n[`settings-by-rule-type-l4-log-all`],log_blocks:n[`settings-by-rule-type-l4-log-blocks`]}}});o(await c(`Updating`,async()=>i.zeroTrust.gateway.logging.update({body:u,account_id:l})),{successLabel:`Updated`})})},um={command:`logging`,describe:`Operations for gateway.logging`,builder:e=>e.command(sm).command(lm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dm(e){return e.usage(`$0 zero-trust gateway operations get <operation-id>
738
+
739
+ Fetch a single Zero Trust Gateway operation by its ID.`).positional(`operation-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 fm={command:`get <operation-id>`,describe:`Zero Trust Gateway operation details`,builder:dm,handler:async n=>l({command:`zero-trust gateway operations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/operations/${n[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(n[`operation-id`]))}`,pathParams:{"operation-id":String(n[`operation-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.operations.get({account_id:l,operation_id:n[`operation-id`]})),{successLabel:`Loaded`})})};function pm(e){return e.usage(`$0 zero-trust gateway operations list
740
+
741
+ List all Zero Trust Gateway operations for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mm={command:`list`,describe:`List Zero Trust Gateway operations`,builder:pm,handler:async n=>l({command:`zero-trust gateway operations list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/operations`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.operations.list({account_id:l})),{successLabel:`Loaded`})})},hm={command:`operations`,describe:`Operations for gateway.operations`,builder:e=>e.command(fm).command(mm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gm(e){return e.usage(`$0 zero-trust gateway pacfiles create
742
+
743
+ 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 _m={command:`create`,describe:`Create a PAC file`,builder:gm,handler:async n=>l({command:`zero-trust gateway pacfiles create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),slug:m(n.slug,`slug`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.pacfiles.create({...e,account_id:l})),{successLabel:`Created`});return}n.contents===void 0&&(n.contents=await g(`contents`,`Actual contents of the PAC file`)),n.name===void 0&&(n.name=await g(`name`,`Name of the PAC file.`));let u=p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`),slug:m(n.slug,`slug`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.pacfiles.create({...u,account_id:l})),{successLabel:`Created`})})};function vm(e){return e.usage(`$0 zero-trust gateway pacfiles delete <pacfile-id>
744
+
745
+ 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 ym={command:`delete <pacfile-id>`,describe:`Delete a PAC file`,builder:vm,handler:async n=>l({command:`zero-trust gateway pacfiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles/${n[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(n[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(n[`pacfile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
746
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.pacfiles.delete({account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Deleted`})})};function bm(e){return e.usage(`$0 zero-trust gateway pacfiles get <pacfile-id>
747
+
748
+ 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 xm={command:`get <pacfile-id>`,describe:`Get a PAC file`,builder:bm,handler:async n=>l({command:`zero-trust gateway pacfiles get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles/${n[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(n[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(n[`pacfile-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.pacfiles.get({account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Loaded`})})};function Sm(e){return e.usage(`$0 zero-trust gateway pacfiles list
749
+
750
+ List all Zero Trust Gateway PAC files for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cm={command:`list`,describe:`List PAC files`,builder:Sm,handler:async n=>l({command:`zero-trust gateway pacfiles list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust gateway pacfiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.pacfiles.list({account_id:u,...i})),{successLabel:`Loaded`})})};function wm(e){return e.usage(`$0 zero-trust gateway pacfiles update <pacfile-id>
751
+
752
+ Update a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).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(`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 Tm={command:`update <pacfile-id>`,describe:`Update a Zero Trust Gateway PAC file`,builder:wm,handler:async n=>l({command:`zero-trust gateway pacfiles update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway pacfiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/pacfiles/${n[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(n[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(n[`pacfile-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.pacfiles.update({...e,account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Updated`});return}n.contents===void 0&&(n.contents=await g(`contents`,`Actual contents of the PAC file`)),n.description===void 0&&(n.description=await g(`description`,`Detailed description of the PAC file.`)),n.name===void 0&&(n.name=await g(`name`,`Name of the PAC file.`));let u=p({contents:m(n.contents,`contents`,`text`),description:m(n.description,`description`,`text`),name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.pacfiles.update({...u,account_id:l,pacfile_id:n[`pacfile-id`]})),{successLabel:`Updated`})})},Em={command:`pacfiles`,describe:`Operations for gateway.pacfiles`,builder:e=>e.command(_m).command(ym).command(xm).command(Cm).command(Tm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Dm(e){return e.usage(`$0 zero-trust gateway proxy-endpoints create
753
+
754
+ Create a new Zero Trust Gateway proxy endpoint.`).option(`kind`,{type:`string`,description:`The proxy endpoint kind.`,choices:[`ip`,`identity`],default:`ip`}).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 Om={command:`create`,describe:`Create a proxy endpoint`,builder:Dm,handler:async n=>l({command:`zero-trust gateway proxy-endpoints create`,classification:{safeFlags:[`kind`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({kind:m(n.kind,`kind`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.proxyEndpoints.create({body:e,account_id:l})),{successLabel:`Created`});return}n.kind===`identity`&&n.kind===void 0&&(n.kind=await g(`kind`,`The proxy endpoint kind.`,{question:`Enter value for --kind`}));let u=p({kind:m(n.kind,`kind`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.proxyEndpoints.create({body:u,account_id:l})),{successLabel:`Created`})})};function km(e){return e.usage(`$0 zero-trust gateway proxy-endpoints delete <proxy-endpoint-id>
755
+
756
+ 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 Am={command:`delete <proxy-endpoint-id>`,describe:`Delete a proxy endpoint`,builder:km,handler:async n=>l({command:`zero-trust gateway proxy-endpoints delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints/${n[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(n[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(n[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
757
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.proxyEndpoints.delete({account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Deleted`})})};function jm(e){return e.usage(`$0 zero-trust gateway proxy-endpoints edit <proxy-endpoint-id>
758
+
759
+ 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 Mm={command:`edit <proxy-endpoint-id>`,describe:`Update a proxy endpoint`,builder:jm,handler:async n=>l({command:`zero-trust gateway proxy-endpoints edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints/${n[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(n[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(n[`proxy-endpoint-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({ips:n.ips,name:m(n.name,`name`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.proxyEndpoints.edit({...e,account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Updated`});return}let u=p({ips:n.ips,name:m(n.name,`name`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.proxyEndpoints.edit({...u,account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Updated`})})};function Nm(e){return e.usage(`$0 zero-trust gateway proxy-endpoints get <proxy-endpoint-id>
760
+
761
+ Get a single 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})}const Pm={command:`get <proxy-endpoint-id>`,describe:`Get a proxy endpoint`,builder:Nm,handler:async n=>l({command:`zero-trust gateway proxy-endpoints get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints/${n[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(n[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(n[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.proxyEndpoints.get({account_id:l,proxy_endpoint_id:n[`proxy-endpoint-id`]})),{successLabel:`Loaded`})})};function Fm(e){return e.usage(`$0 zero-trust gateway proxy-endpoints list
762
+
763
+ List all Zero Trust Gateway proxy endpoints for an account.`).option(`filter`,{type:`string`,description:"Filter the returned proxy endpoints by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (an endpoint must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the endpoint name.\n * `id` — substring match on the endpoint ID (UUID), with or without dashes.\n * `kind` — exact match on the endpoint kind. The value must be `ip` or `identity`; any other value returns `400`.\n\nEach entry must match one of the per-field patterns below: the field\nmust be one of `name`, `id`, or `kind`; `name`/`id` accept any value,\nwhile `kind` only accepts `ip` or `identity`."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the endpoint name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned endpoints by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by endpoint name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Im={command:`list`,describe:`List proxy endpoints`,builder:y(Fm),handler:async n=>l({command:`zero-trust gateway proxy-endpoints list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway proxy-endpoints list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.proxyEndpoints.list({account_id:u,...i})),{successLabel:`Loaded`})})},Lm={command:`proxy-endpoints`,describe:`Operations for gateway.proxy-endpoints`,builder:e=>e.command(Om).command(Am).command(Mm).command(Pm).command(Im).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Rm(e){return e.usage(`$0 zero-trust gateway rules bulk-edit
764
+
765
+ Update select fields of multiple Zero Trust Gateway rules in a single request. This is commonly used to reorder rules by updating their precedence values. Only the fields provided for each rule are updated.`).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 zm={command:`bulk-edit`,describe:`Patch multiple Zero Trust Gateway rules`,builder:Rm,handler:async n=>l({command:`zero-trust gateway rules bulk-edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.bulkEdit({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Bm(e){return e.usage(`$0 zero-trust gateway rules create
766
+
767
+ 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`]}).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(`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-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-audit-ssh-command-logging`,{type:`boolean`,description:`Enable SSH command logging.`}).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`]}).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`]}).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`]}).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`]}).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`]}).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`]}).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).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-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`]}).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-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`]}).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(`rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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-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-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 Vm={command:`create`,describe:`Create a Zero Trust Gateway rule`,builder:Bm,handler:async n=>l({command:`zero-trust gateway rules create`,classification:{safeFlags:`action.enabled.rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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(`.`)}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.gateway.rules.create({...e,account_id:l})),{successLabel:`Created`});return}n.action===void 0&&(n.action=await _(`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`])),n.name===void 0&&(n.name=await g(`name`,`Specify the rule name.`));let u=p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.gateway.rules.create({...u,account_id:l})),{successLabel:`Created`})})};function Hm(e){return e.usage(`$0 zero-trust gateway rules delete <rule-id>
768
+
769
+ 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 Um={command:`delete <rule-id>`,describe:`Delete a Zero Trust Gateway rule`,builder:Hm,handler:async n=>l({command:`zero-trust gateway rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
770
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.gateway.rules.delete({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Deleted`})})};function Wm(e){return e.usage("$0 zero-trust gateway rules edit <rule-id>\n\nUpdate select fields of an existing Zero Trust Gateway rule. Only the fields provided in the request body are updated. This endpoint supports a limited subset of fields (`name`, `description`, `precedence`, `enabled`). To update other fields such as `action`, `traffic`, `identity`, `device_posture`, `rule_settings`, `schedule`, or `expiration`, use the PUT endpoint for a full rule replacement.").positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify the rule description.`}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`}).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(`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 Gm={command:`edit <rule-id>`,describe:`Patch a Zero Trust Gateway rule`,builder:Wm,handler:async n=>l({command:`zero-trust gateway rules edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),precedence:n.precedence}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.edit({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}let u=p({description:m(n.description,`description`,`text`),enabled:n.enabled,name:m(n.name,`name`,`text`),precedence:n.precedence});o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.edit({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})};function Km(e){return e.usage(`$0 zero-trust gateway rules get <rule-id>
771
+
772
+ 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 qm={command:`get <rule-id>`,describe:`Get Zero Trust Gateway rule details.`,builder:Km,handler:async n=>l({command:`zero-trust gateway rules get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.rules.get({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Loaded`})})};function Jm(e){return e.usage(`$0 zero-trust gateway rules list-tenant
773
+
774
+ List Zero Trust Gateway rules for the parent account of an account in the MSP configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ym={command:`list-tenant`,describe:`List Zero Trust Gateway rules inherited from the parent account`,builder:Jm,handler:async n=>l({command:`zero-trust gateway rules list-tenant`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules list-tenant`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/tenant`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.gateway.rules.listTenant({account_id:l})),{successLabel:`Loaded`})})};function Xm(e){return e.usage(`$0 zero-trust gateway rules list
775
+
776
+ List Zero Trust Gateway rules for an account.`).option(`filter`,{type:`string`,description:"Filter the returned rules by one or more `field:value` pairs. Repeat the\nparameter to combine filters with logical AND.\n\nSupported fields are `name`, `id`, `action`, `enabled`, `source_account`,\n`is_shared`, `filters`, and `expression` (max 1024 bytes). The `source_account`\nvalue is matched as a normalized UUID substring. The `filters` value must\nbe one of the rule filter names and matches a member of the rule's `filters`\narray. The `expression` filter performs a case-insensitive literal\nsubstring match across traffic, identity, and device posture expressions."}).option(`search`,{type:`string`,description:`Case-insensitive substring search across rule name and description.`}).option(`order-by`,{type:`string`,description:"Field to sort the returned rules by. Supported values are `name`,\n`created_at`, `updated_at`, and `precedence`.",choices:[`name`,`created_at`,`updated_at`,`precedence`]}).option(`direction`,{type:`string`,description:"Sort direction. When `order_by` is omitted, this controls the direction\nof the existing precedence ordering. Shared rules remain first in either\ndirection. Accepted values are `asc` and `desc`.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zm={command:`list`,describe:`List Zero Trust Gateway rules`,builder:y(Xm),handler:async n=>l({command:`zero-trust gateway rules list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},n,async()=>{let i={filter:n.filter,search:n.search,order_by:n[`order-by`],direction:n.direction};if(n.dryRun){s({command:`cf zero-trust gateway rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.gateway.rules.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Qm(e){return e.usage("$0 zero-trust gateway rules reset-expiration <rule-id>\n\nResets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both `expiration.expires_at` and `expiration.duration`.").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 $m={command:`reset-expiration <rule-id>`,describe:`Reset the expiration of a Zero Trust Gateway Rule`,builder:Qm,handler:async n=>l({command:`zero-trust gateway rules reset-expiration`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules reset-expiration`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}/reset_expiration`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.gateway.rules.resetExpiration({account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Created`})})};function eh(e){return e.usage(`$0 zero-trust gateway rules update <rule-id>
777
+
778
+ Update a configured Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).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`]}).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.`}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`}).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(`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.`}).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-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-audit-ssh-command-logging`,{type:`boolean`,description:`Enable SSH command logging.`}).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`]}).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`]}).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`]}).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`]}).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`]}).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`]}).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).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-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`]}).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-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`]}).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.`}).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(`rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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-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-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 th={command:`update <rule-id>`,describe:`Update a Zero Trust Gateway rule`,builder:eh,handler:async n=>l({command:`zero-trust gateway rules update`,classification:{safeFlags:`action.enabled.rule-settings-allow-child-bypass.rule-settings-audit-ssh-command-logging.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(`.`)}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust gateway rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/gateway/rules/${n[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(n[`rule-id`]))}`,pathParams:{"rule-id":String(n[`rule-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.update({...e,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`});return}n.action===void 0&&(n.action=await _(`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`])),n.name===void 0&&(n.name=await g(`name`,`Specify the rule name.`));let u=p({action:m(n.action,`action`,`text`),description:m(n.description,`description`,`text`),device_posture:m(n[`device-posture`],`device-posture`,`text`),enabled:n.enabled,expiration:{duration:n[`expiration-duration`]},filters:n.filters,identity:m(n.identity,`identity`,`text`),name:m(n.name,`name`,`text`),precedence:n.precedence,rule_settings:{allow_child_bypass:n[`rule-settings-allow-child-bypass`],audit_ssh:{command_logging:n[`rule-settings-audit-ssh-command-logging`]},biso_admin_controls:{copy:m(n[`rule-settings-biso-admin-controls-copy`],`rule-settings-biso-admin-controls-copy`,`text`),dcp:n[`rule-settings-biso-admin-controls-dcp`],dd:n[`rule-settings-biso-admin-controls-dd`],dk:n[`rule-settings-biso-admin-controls-dk`],download:m(n[`rule-settings-biso-admin-controls-download`],`rule-settings-biso-admin-controls-download`,`text`),dp:n[`rule-settings-biso-admin-controls-dp`],du:n[`rule-settings-biso-admin-controls-du`],keyboard:m(n[`rule-settings-biso-admin-controls-keyboard`],`rule-settings-biso-admin-controls-keyboard`,`text`),paste:m(n[`rule-settings-biso-admin-controls-paste`],`rule-settings-biso-admin-controls-paste`,`text`),printing:m(n[`rule-settings-biso-admin-controls-printing`],`rule-settings-biso-admin-controls-printing`,`text`),upload:m(n[`rule-settings-biso-admin-controls-upload`],`rule-settings-biso-admin-controls-upload`,`text`),version:m(n[`rule-settings-biso-admin-controls-version`],`rule-settings-biso-admin-controls-version`,`text`),wm_id:m(n[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:n[`rule-settings-block-page-include-context`],target_uri:m(n[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:n[`rule-settings-block-page-enabled`],block_reason:m(n[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:n[`rule-settings-bypass-parent-rule`],check_session:{duration:m(n[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:n[`rule-settings-check-session-enforce`]},delete_headers:n[`rule-settings-delete-headers`],egress:{ipv4:m(n[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:m(n[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:m(n[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:n[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:n[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:n[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:n[`rule-settings-ip-categories`],ip_indicator_feeds:n[`rule-settings-ip-indicator-feeds`],l4override:{ip:m(n[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:n[`rule-settings-l4override-port`]},notification_settings:{enabled:n[`rule-settings-notification-settings-enabled`],include_context:n[`rule-settings-notification-settings-include-context`],msg:m(n[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:m(n[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:m(n[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:n[`rule-settings-override-ips`],payload_log:{enabled:n[`rule-settings-payload-log-enabled`]},quarantine:{file_types:n[`rule-settings-quarantine-file-types`]},redirect:{include_context:n[`rule-settings-redirect-include-context`],preserve_path_and_query:n[`rule-settings-redirect-preserve-path-and-query`],target_uri:m(n[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:m(n[`rule-settings-resolve-dns-internally-fallback`],`rule-settings-resolve-dns-internally-fallback`,`text`),view_id:m(n[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:n[`rule-settings-resolve-dns-through-cloudflare`],untrusted_cert:{action:m(n[`rule-settings-untrusted-cert-action`],`rule-settings-untrusted-cert-action`,`text`)}},schedule:{fri:m(n[`schedule-fri`],`schedule-fri`,`text`),mon:m(n[`schedule-mon`],`schedule-mon`,`text`),sat:m(n[`schedule-sat`],`schedule-sat`,`text`),sun:m(n[`schedule-sun`],`schedule-sun`,`text`),thu:m(n[`schedule-thu`],`schedule-thu`,`text`),time_zone:m(n[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:m(n[`schedule-tue`],`schedule-tue`,`text`),wed:m(n[`schedule-wed`],`schedule-wed`,`text`)},traffic:m(n.traffic,`traffic`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.gateway.rules.update({...u,account_id:l,rule_id:n[`rule-id`]})),{successLabel:`Updated`})})},nh={command:`rules`,describe:`Operations for gateway.rules`,builder:e=>e.command(zm).command(Vm).command(Um).command(Gm).command(qm).command(Zm).command(Ym).command($m).command(th).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rh={command:`gateway`,describe:`Operations for gateway`,builder:e=>e.command(Sp).command(Ap).command(Wf).command(Zf).command(ep).command(pp).command(bp).command(Tp).command(Op).command(Jp).command(am).command(um).command(hm).command(Em).command(Lm).command(nh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ih(e){return e.usage(`$0 zero-trust identity-providers create
779
+
780
+ 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 ah={command:`create`,describe:`Add an Access identity provider`,builder:ih,handler:async i=>l({command:`zero-trust identity-providers create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({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:i.body===void 0?void 0:d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Creating`,async()=>l.zeroTrust.identityProviders.create({body:e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Created`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function oh(e){return e.usage(`$0 zero-trust identity-providers delete <identity-provider-id>
781
+
782
+ 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 sh={command:`delete <identity-provider-id>`,describe:`Delete an Access identity provider`,builder:oh,handler:async i=>l({command:`zero-trust identity-providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${i[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(i[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"identity-provider-id":String(i[`identity-provider-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=d:i.accountId=d,!await v({force:!!i.force})){process.stderr.write(`Aborted.
783
+ `);return}o(await c(`Deleting`,async()=>l.zeroTrust.identityProviders.delete({account_or_zone:u,account_or_zone_id:d,identity_provider_id:i[`identity-provider-id`]})),{successLabel:`Deleted`})})};function ch(e){return e.usage(`$0 zero-trust identity-providers get <identity-provider-id>
784
+
785
+ Fetches a configured 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 lh={command:`get <identity-provider-id>`,describe:`Get an Access identity provider`,builder:ch,handler:async i=>l({command:`zero-trust identity-providers get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${i[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(i[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"identity-provider-id":String(i[`identity-provider-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.zeroTrust.identityProviders.get({account_or_zone:u,account_or_zone_id:d,identity_provider_id:i[`identity-provider-id`]})),{successLabel:`Loaded`})})};function uh(e){return e.usage(`$0 zero-trust identity-providers list
786
+
787
+ 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 dh={command:`list`,describe:`List Access identity providers`,builder:uh,handler:async i=>l({command:`zero-trust identity-providers list`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let l={scim_enabled:i[`scim-enabled`],page:i.page,per_page:i[`per-page`]};if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await r();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.zeroTrust.identityProviders.list({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})})};function fh(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 ph={command:`create <identity-provider-id>`,describe:`Create SAML encryption certificate for Identity Provider`,builder:fh,handler:async n=>l({command:`zero-trust identity-providers saml-certificate create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust identity-providers saml-certificate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/identity_providers/${n[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(n[`identity-provider-id`]))}/saml_certificate`,pathParams:{"identity-provider-id":String(n[`identity-provider-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Creating`,async()=>i.zeroTrust.identityProviders.samlCertificate.create({account_id:l,identity_provider_id:n[`identity-provider-id`]})),{successLabel:`Created`})})},mh={command:`saml-certificate`,describe:`Operations for identity-providers.saml-certificate`,builder:e=>e.command(ph).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hh(e){return e.usage(`$0 zero-trust identity-providers scim groups list
788
+
789
+ 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 gh={command:`list`,describe:`List SCIM Group resources`,builder:hh,handler:async n=>l({command:`zero-trust identity-providers scim groups list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={cf_resource_id:n[`cf-resource-id`],idp_resource_id:n[`idp-resource-id`],name:n.name,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust identity-providers scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/identity_providers/${n[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(n[`identity-provider-id`]))}/scim/groups`,pathParams:{"identity-provider-id":String(n[`identity-provider-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.identityProviders.scim.groups.list({account_id:u,identity_provider_id:n[`identity-provider-id`],...i})),{successLabel:`Loaded`})})},_h={command:`groups`,describe:`Operations for identity-providers.scim.groups`,builder:e=>e.command(gh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vh(e){return e.usage(`$0 zero-trust identity-providers scim users list
790
+
791
+ Lists SCIM User 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 User 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 users in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,description:'The IdP-generated Id of the SCIM User 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 users in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`username`,{type:`string`,description:`The username of the SCIM User resource.`}).option(`email`,{type:`string`,description:`The email address of the SCIM User resource.`}).option(`name`,{type:`string`,description:`The name of the SCIM User 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 yh={command:`list`,describe:`List SCIM User resources`,builder:vh,handler:async n=>l({command:`zero-trust identity-providers scim users list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let i={cf_resource_id:n[`cf-resource-id`],idp_resource_id:n[`idp-resource-id`],username:n.username,email:n.email,name:n.name,page:n.page,per_page:n[`per-page`]};if(n.dryRun){s({command:`cf zero-trust identity-providers scim users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/identity_providers/${n[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(n[`identity-provider-id`]))}/scim/users`,pathParams:{"identity-provider-id":String(n[`identity-provider-id`]??``)},query:i,bodyKind:`none`});return}let l=await a(n),u=n.local?e:await r();n.accountId=u,o(await c(`Loading`,async()=>l.zeroTrust.identityProviders.scim.users.list({account_id:u,identity_provider_id:n[`identity-provider-id`],...i})),{successLabel:`Loaded`})})},bh={command:`users`,describe:`Operations for identity-providers.scim.users`,builder:e=>e.command(yh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xh={command:`scim`,describe:`Operations for identity-providers.scim`,builder:e=>e.command(_h).command(bh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sh(e){return e.usage(`$0 zero-trust identity-providers update <identity-provider-id>
792
+
793
+ Updates a configured 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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ch={command:`update <identity-provider-id>`,describe:`Update an Access identity provider`,builder:Sh,handler:async i=>l({command:`zero-trust identity-providers update`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust identity-providers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${i[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(i[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"identity-provider-id":String(i[`identity-provider-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?void 0:d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Updating`,async()=>l.zeroTrust.identityProviders.update({body:e,account_or_zone:u,account_or_zone_id:f,identity_provider_id:i[`identity-provider-id`]})),{successLabel:`Updated`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},wh={command:`identity-providers`,describe:`Operations for identity-providers`,builder:e=>e.command(ah).command(sh).command(lh).command(dh).command(Ch).command(mh).command(xh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Th(e){return e.usage(`$0 zero-trust organizations create
794
+
795
+ Sets up a Zero Trust organization for your account or zone.`).option(`allow-authenticate-via-warp`,{type:`boolean`,description:`When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.`,default:!1}).option(`auth-domain`,{type:`string`,description:`The unique subdomain assigned to your Zero Trust organization.`}).option(`auto-redirect-to-identity`,{type:`boolean`,description:"When set to `true`, users skip the identity provider selection step during login.",default:!1}).option(`deny-unmatched-requests`,{type:`boolean`,description:"Determines whether to deny all requests to Cloudflare-protected resources that lack an associated Access application. If enabled, you must explicitly configure an Access application and policy to allow traffic to your Cloudflare-protected resources. For domains you want to be public across all subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` array."}).option(`deny-unmatched-requests-exempted-zone-names`,{type:`string`,array:!0,description:"Contains zone names to exempt from the `deny_unmatched_requests` feature. Requests to a subdomain in an exempted zone will block unauthenticated traffic by default if there is a configured Access application and policy that matches the request."}).option(`is-ui-read-only`,{type:`boolean`,description:`Lock all settings as Read-Only in the Dashboard, regardless of user permission. Updates may only be made via the API or Terraform for this account when enabled.`,default:!1}).option(`login-design-background-color`,{type:`string`,description:`The background color on your login page.`}).option(`login-design-footer-text`,{type:`string`,description:`The text at the bottom of your login page.`}).option(`login-design-header-text`,{type:`string`,description:`The text at the top of your login page.`}).option(`login-design-logo-path`,{type:`string`,description:`The URL of the logo on your login page.`}).option(`login-design-text-color`,{type:`string`,description:`The text color on your login page.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:"Lists the MFA methods that users can authenticate with. The `piv_key` and `ssh_fido2_key` values are supported only for infrastructure applications."}).option(`mfa-config-amr-matching-session-duration`,{type:`string`,description:`Allows a user to skip MFA via Authentication Method Reference (AMR) matching when the AMR claim provided by the IdP the user used to authenticate contains "mfa". Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days).`}).option(`mfa-config-required-aaguids`,{type:`string`,description:`Specifies a Cloudflare List of required FIDO2 authenticator device AAGUIDs.`}).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(`mfa-piv-key-requirements-pin-policy`,{type:`string`,description:"Defines when a PIN is required to use the SSH key. Valid values: `never` (no PIN required), `once` (PIN required once per session), `always` (PIN required for each use).",choices:[`never`,`once`,`always`]}).option(`mfa-piv-key-requirements-require-fips-device`,{type:`boolean`,description:`Requires the PIV key to be stored on a FIPS 140-2 Level 1 or higher validated device.`}).option(`mfa-piv-key-requirements-ssh-key-size`,{type:`string`,array:!0,description:`Specifies the allowed SSH key sizes in bits. Valid sizes depend on key type. Ed25519 has a fixed key size and does not accept this parameter.`}).option(`mfa-piv-key-requirements-ssh-key-type`,{type:`string`,array:!0,description:"Specifies the allowed SSH key types. Valid values are `ecdsa`, `ed25519`, and `rsa`."}).option(`mfa-piv-key-requirements-touch-policy`,{type:`string`,description:"Defines when physical touch is required to use the SSH key. Valid values: `never` (no touch required), `always` (touch required for each use), `cached` (touch cached for 15 seconds).",choices:[`never`,`always`,`cached`]}).option(`mfa-required-for-all-apps`,{type:`boolean`,description:`Determines whether global MFA settings apply to applications by default. The organization must have MFA enabled with at least one authentication method and a session duration configured. Note: 'allowed_authenticators' cannot contain only the infrastructure SSH authenticators ('piv_key' and 'ssh_fido2_key') if the organization has any non-infrastructure applications.`,default:!1}).option(`name`,{type:`string`,description:`The name of your Zero Trust organization.`}).option(`service-token-inactivity-action`,{type:`string`,description:`The action applied to an inactive service token.`,choices:[`disable`,`delete`]}).option(`service-token-inactivity-enabled`,{type:`boolean`,description:`Whether automatic enforcement for inactive service tokens is enabled.`}).option(`service-token-inactivity-inactivity-threshold-days`,{type:`number`,description:`The number of days a service token must be inactive before the configured action is applied.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`ui-read-only-toggle-reason`,{type:`string`,description:`A description of the reason why the UI read only field is being toggled.`}).option(`user-seat-expiration-inactive-time`,{type:`string`,description:"The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Minimum value for this setting is 1 month (730h). Must be in the format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`."}).option(`warp-auth-non-browser-401`,{type:`boolean`,description:`When enabled, unsuccessful WARP authentication requests with a non-HTML Accept header return a 401 response instead of redirecting to the login page.`,default:!1}).option(`warp-auth-session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `30m` or `2h45m`. Valid time units are: m, h."}).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([`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0)){let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].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 --service_token_inactivity-* flag is set`)}return!0})}const Eh={command:`create`,describe:`Create your Zero Trust organization`,builder:Th,handler:async i=>l({command:`zero-trust organizations create`,classification:{safeFlags:[`allow-authenticate-via-warp`,`auto-redirect-to-identity`,`deny-unmatched-requests`,`is-ui-read-only`,`mfa-piv-key-requirements-pin-policy`,`mfa-piv-key-requirements-require-fips-device`,`mfa-piv-key-requirements-touch-policy`,`mfa-required-for-all-apps`,`service-token-inactivity-action`,`service-token-inactivity-enabled`,`warp-auth-non-browser-401`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}):d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Creating`,async()=>l.zeroTrust.organizations.create({...e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Created`});return}i[`auth-domain`]===void 0&&(i[`auth-domain`]=await g(`auth-domain`,`The unique subdomain assigned to your Zero Trust organization.`)),i.name===void 0&&(i.name=await g(`name`,`The name of your Zero Trust organization.`));let h=p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)});o(await c(`Creating`,async()=>l.zeroTrust.organizations.create({...h,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Created`})})};function Dh(e){return e.usage(`$0 zero-trust organizations doh get
796
+
797
+ Returns the DoH settings for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oh={command:`get`,describe:`Get your Zero Trust organization DoH settings`,builder:Dh,handler:async n=>l({command:`zero-trust organizations doh get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust organizations doh get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/organizations/doh`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.organizations.doh.get({account_id:l})),{successLabel:`Loaded`})})};function kh(e){return e.usage(`$0 zero-trust organizations doh update
798
+
799
+ Updates the DoH settings for your Zero Trust organization.`).option(`doh-jwt-duration`,{type:`string`,description:"The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. Note that the maximum duration for this setting is the same as the key rotation period on the account. Default expiration is 24h"}).option(`service-token-id`,{type:`string`,description:`The uuid of the service token you want to use for DoH authentication`}).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 Ah={command:`update`,describe:`Update your Zero Trust organization DoH settings`,builder:kh,handler:async n=>l({command:`zero-trust organizations doh update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust organizations doh update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/organizations/doh`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({doh_jwt_duration:m(n[`doh-jwt-duration`],`doh-jwt-duration`,`text`),service_token_id:m(n[`service-token-id`],`service-token-id`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.organizations.doh.update({...e,account_id:l})),{successLabel:`Updated`});return}let u=p({doh_jwt_duration:m(n[`doh-jwt-duration`],`doh-jwt-duration`,`text`),service_token_id:m(n[`service-token-id`],`service-token-id`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.organizations.doh.update({...u,account_id:l})),{successLabel:`Updated`})})},jh={command:`doh`,describe:`Operations for organizations.doh`,builder:e=>e.command(Oh).command(Ah).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mh(e){return e.usage(`$0 zero-trust organizations list
800
+
801
+ Returns the configuration for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nh={command:`list`,describe:`Get your Zero Trust organization`,builder:Mh,handler:async i=>l({command:`zero-trust organizations list`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.zeroTrust.organizations.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function Ph(e){return e.usage(`$0 zero-trust organizations revoke-users
802
+
803
+ 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 Fh={command:`revoke-users`,describe:`Revoke all Access tokens for a user`,builder:Ph,handler:async i=>l({command:`zero-trust organizations revoke-users`,classification:{safeFlags:[`devices`,`warp-session-reauth`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations revoke-users`,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:i.body===void 0?p({devices:i.devices,email:m(i.email,`email`,`text`),user_uid:m(i[`user-uid`],`user-uid`,`text`),warp_session_reauth:i[`warp-session-reauth`]}):d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,!await v({force:!!i.force,message:`This operation revokes all access tokens for a user destructively.`})){process.stderr.write(`Aborted.
804
+ `);return}if(i.body){let e=d(i.body);o(await c(`Deleting`,async()=>l.zeroTrust.organizations.revokeUsers({...e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Deleted`});return}i.email===void 0&&(i.email=await g(`email`,`The email of the user to revoke.`));let h=p({devices:i.devices,email:m(i.email,`email`,`text`),user_uid:m(i[`user-uid`],`user-uid`,`text`),warp_session_reauth:i[`warp-session-reauth`]});o(await c(`Deleting`,async()=>l.zeroTrust.organizations.revokeUsers({...h,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Deleted`})})};function Ih(e){return e.usage(`$0 zero-trust organizations update
805
+
806
+ Updates the configuration for your Zero Trust organization.`).option(`allow-authenticate-via-warp`,{type:`boolean`,description:`When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.`}).option(`auth-domain`,{type:`string`,description:`The unique subdomain assigned to your Zero Trust organization.`}).option(`auto-redirect-to-identity`,{type:`boolean`,description:"When set to `true`, users skip the identity provider selection step during login."}).option(`custom-pages-forbidden`,{type:`string`,description:`The uid of the custom page to use when a user is denied access after failing a non-identity rule.`}).option(`custom-pages-identity-denied`,{type:`string`,description:`The uid of the custom page to use when a user is denied access.`}).option(`deny-unmatched-requests`,{type:`boolean`,description:"Determines whether to deny all requests to Cloudflare-protected resources that lack an associated Access application. If enabled, you must explicitly configure an Access application and policy to allow traffic to your Cloudflare-protected resources. For domains you want to be public across all subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` array."}).option(`deny-unmatched-requests-exempted-zone-names`,{type:`string`,array:!0,description:"Contains zone names to exempt from the `deny_unmatched_requests` feature. Requests to a subdomain in an exempted zone will block unauthenticated traffic by default if there is a configured Access application and policy that matches the request."}).option(`is-ui-read-only`,{type:`boolean`,description:`Lock all settings as Read-Only in the Dashboard, regardless of user permission. Updates may only be made via the API or Terraform for this account when enabled.`}).option(`login-design-background-color`,{type:`string`,description:`The background color on your login page.`}).option(`login-design-footer-text`,{type:`string`,description:`The text at the bottom of your login page.`}).option(`login-design-header-text`,{type:`string`,description:`The text at the top of your login page.`}).option(`login-design-logo-path`,{type:`string`,description:`The URL of the logo on your login page.`}).option(`login-design-text-color`,{type:`string`,description:`The text color on your login page.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:"Lists the MFA methods that users can authenticate with. The `piv_key` and `ssh_fido2_key` values are supported only for infrastructure applications."}).option(`mfa-config-amr-matching-session-duration`,{type:`string`,description:`Allows a user to skip MFA via Authentication Method Reference (AMR) matching when the AMR claim provided by the IdP the user used to authenticate contains "mfa". Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days).`}).option(`mfa-config-required-aaguids`,{type:`string`,description:`Specifies a Cloudflare List of required FIDO2 authenticator device AAGUIDs.`}).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(`mfa-piv-key-requirements-pin-policy`,{type:`string`,description:"Defines when a PIN is required to use the SSH key. Valid values: `never` (no PIN required), `once` (PIN required once per session), `always` (PIN required for each use).",choices:[`never`,`once`,`always`]}).option(`mfa-piv-key-requirements-require-fips-device`,{type:`boolean`,description:`Requires the PIV key to be stored on a FIPS 140-2 Level 1 or higher validated device.`}).option(`mfa-piv-key-requirements-ssh-key-size`,{type:`string`,array:!0,description:`Specifies the allowed SSH key sizes in bits. Valid sizes depend on key type. Ed25519 has a fixed key size and does not accept this parameter.`}).option(`mfa-piv-key-requirements-ssh-key-type`,{type:`string`,array:!0,description:"Specifies the allowed SSH key types. Valid values are `ecdsa`, `ed25519`, and `rsa`."}).option(`mfa-piv-key-requirements-touch-policy`,{type:`string`,description:"Defines when physical touch is required to use the SSH key. Valid values: `never` (no touch required), `always` (touch required for each use), `cached` (touch cached for 15 seconds).",choices:[`never`,`always`,`cached`]}).option(`mfa-required-for-all-apps`,{type:`boolean`,description:`Determines whether global MFA settings apply to applications by default. The organization must have MFA enabled with at least one authentication method and a session duration configured. Note: 'allowed_authenticators' cannot contain only the infrastructure SSH authenticators ('piv_key' and 'ssh_fido2_key') if the organization has any non-infrastructure applications.`}).option(`name`,{type:`string`,description:`The name of your Zero Trust organization.`}).option(`service-token-inactivity-action`,{type:`string`,description:`The action applied to an inactive service token.`,choices:[`disable`,`delete`]}).option(`service-token-inactivity-enabled`,{type:`boolean`,description:`Whether automatic enforcement for inactive service tokens is enabled.`}).option(`service-token-inactivity-inactivity-threshold-days`,{type:`number`,description:`The number of days a service token must be inactive before the configured action is applied.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`ui-read-only-toggle-reason`,{type:`string`,description:`A description of the reason why the UI read only field is being toggled.`}).option(`user-seat-expiration-inactive-time`,{type:`string`,description:"The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Minimum value for this setting is 1 month (730h). Must be in the format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`."}).option(`warp-auth-non-browser-401`,{type:`boolean`,description:`When enabled, unsuccessful WARP authentication requests with a non-HTML Accept header return a 401 response instead of redirecting to the login page.`}).option(`warp-auth-session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `30m` or `2h45m`. Valid time units are: m, h."}).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([`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0)){let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].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 --service_token_inactivity-* flag is set`)}return!0})}const Lh={command:`update`,describe:`Update your Zero Trust organization`,builder:Ih,handler:async i=>l({command:`zero-trust organizations update`,classification:{safeFlags:[`allow-authenticate-via-warp`,`auto-redirect-to-identity`,`deny-unmatched-requests`,`is-ui-read-only`,`mfa-piv-key-requirements-pin-policy`,`mfa-piv-key-requirements-require-fips-device`,`mfa-piv-key-requirements-touch-policy`,`mfa-required-for-all-apps`,`service-token-inactivity-action`,`service-token-inactivity-enabled`,`warp-auth-non-browser-401`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf zero-trust organizations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],custom_pages:{forbidden:m(i[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:m(i[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}):d(i.body)});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,f=u===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=f:i.accountId=f,i.body){let e=d(i.body);o(await c(`Updating`,async()=>l.zeroTrust.organizations.update({...e,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Updated`});return}let h=p({allow_authenticate_via_warp:i[`allow-authenticate-via-warp`],auth_domain:m(i[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:i[`auto-redirect-to-identity`],custom_pages:{forbidden:m(i[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:m(i[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:i[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:i[`deny-unmatched-requests-exempted-zone-names`],is_ui_read_only:i[`is-ui-read-only`],login_design:{background_color:m(i[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:m(i[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:m(i[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:m(i[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:m(i[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:i[`mfa-config-allowed-authenticators`],amr_matching_session_duration:m(i[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:m(i[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:m(i[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:m(i[`mfa-piv-key-requirements-pin-policy`],`mfa-piv-key-requirements-pin-policy`,`text`),require_fips_device:i[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:i[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:i[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:m(i[`mfa-piv-key-requirements-touch-policy`],`mfa-piv-key-requirements-touch-policy`,`text`)},mfa_required_for_all_apps:i[`mfa-required-for-all-apps`],name:m(i.name,`name`,`text`),service_token_inactivity:{action:m(i[`service-token-inactivity-action`],`service-token-inactivity-action`,`text`),enabled:i[`service-token-inactivity-enabled`],inactivity_threshold_days:i[`service-token-inactivity-inactivity-threshold-days`]},session_duration:m(i[`session-duration`],`session-duration`,`text`),ui_read_only_toggle_reason:m(i[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:m(i[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:i[`warp-auth-non-browser-401`],warp_auth_session_duration:m(i[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)});o(await c(`Updating`,async()=>l.zeroTrust.organizations.update({...h,account_or_zone:u,account_or_zone_id:f})),{successLabel:`Updated`})})},Rh={command:`organizations`,describe:`Operations for organizations`,builder:e=>e.command(Eh).command(Nh).command(Fh).command(Lh).command(jh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zh(e){return e.usage(`$0 zero-trust risk-scoring behaviours get
807
+
808
+ Retrieves configured risk score behaviors that define how user actions affect their overall risk score.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bh={command:`get`,describe:`Get all behaviors and associated configuration`,builder:zh,handler:async n=>l({command:`zero-trust risk-scoring behaviours get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring behaviours get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/behaviors`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.behaviours.get({account_id:l})),{successLabel:`Loaded`})})};function Vh(e){return e.usage(`$0 zero-trust risk-scoring behaviours update
809
+
810
+ Updates risk score behavior configurations, defining weights and thresholds for risk calculation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Behaviors.`})}const Hh={command:`update`,describe:`Update configuration for risk behaviors`,builder:Vh,handler:async n=>l({command:`zero-trust risk-scoring behaviours update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring behaviours update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/behaviors`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.riskScoring.behaviours.update({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Uh={command:`behaviours`,describe:`User Risk Scoring - manage behaviors used to calculate user risk scores`,builder:e=>e.command(Bh).command(Hh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wh(e){return e.usage(`$0 zero-trust risk-scoring get <user-id>
811
+
812
+ Retrieves the detailed risk score breakdown for a specific user, including contributing factors.`).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})}const Gh={command:`get <user-id>`,describe:`Get risk event/score information for a specific user`,builder:Wh,handler:async n=>l({command:`zero-trust risk-scoring get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.get({account_id:l,user_id:n[`user-id`]})),{successLabel:`Loaded`})})};function Kh(e){return e.usage(`$0 zero-trust risk-scoring integrations create
813
+
814
+ 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`]}).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).
815
+ 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 qh={command:`create`,describe:`Create new risk score integration.`,builder:Kh,handler:async n=>l({command:`zero-trust risk-scoring integrations create`,classification:{safeFlags:[`integration-type`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({integration_type:m(n[`integration-type`],`integration-type`,`text`),reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.zeroTrust.riskScoring.integrations.create({...e,account_id:l})),{successLabel:`Created`});return}n[`integration-type`]===void 0&&(n[`integration-type`]=await _(`integration-type`,`The integration_type field`,[`Okta`])),n[`tenant-url`]===void 0&&(n[`tenant-url`]=await g(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=p({integration_type:m(n[`integration-type`],`integration-type`,`text`),reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)});o(await c(`Creating`,async()=>i.zeroTrust.riskScoring.integrations.create({...u,account_id:l})),{successLabel:`Created`})})};function Jh(e){return e.usage(`$0 zero-trust risk-scoring integrations delete <integration-id>
816
+
817
+ 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 Yh={command:`delete <integration-id>`,describe:`Delete a risk score integration.`,builder:Jh,handler:async n=>l({command:`zero-trust risk-scoring integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
818
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.riskScoring.integrations.delete({account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Deleted`})})};function Xh(e){return e.usage(`$0 zero-trust risk-scoring integrations get <integration-id>
819
+
820
+ 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 Zh={command:`get <integration-id>`,describe:`Get risk score integration by id.`,builder:Xh,handler:async n=>l({command:`zero-trust risk-scoring integrations get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.integrations.get({account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Loaded`})})};function Qh(e){return e.usage(`$0 zero-trust risk-scoring integrations list
821
+
822
+ Lists all configured Zero Trust risk score integrations for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $h={command:`list`,describe:`List all risk score integrations for the account.`,builder:Qh,handler:async n=>l({command:`zero-trust risk-scoring integrations list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.integrations.list({account_id:l})),{successLabel:`Loaded`})})};function eg(e){return e.usage(`$0 zero-trust risk-scoring integrations references get <reference-id>
823
+
824
+ Retrieves a Zero Trust risk score integration using its external reference ID.`).positional(`reference-id`,{type:`string`,description:`Reference ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tg={command:`get <reference-id>`,describe:`Get risk score integration by reference id.`,builder:eg,handler:async n=>l({command:`zero-trust risk-scoring integrations references get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations references get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/reference_id/${n[`reference-id`]==null?`<reference-id>`:encodeURIComponent(String(n[`reference-id`]))}`,pathParams:{"reference-id":String(n[`reference-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.integrations.references.get({account_id:l,reference_id:n[`reference-id`]})),{successLabel:`Loaded`})})},ng={command:`references`,describe:`User Risk Scoring - retrieve integrations by external reference`,builder:e=>e.command(tg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rg(e){return e.usage(`$0 zero-trust risk-scoring integrations update <integration-id>
825
+
826
+ 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).
827
+ 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 ig={command:`update <integration-id>`,describe:`Update a risk score integration.`,builder:rg,handler:async n=>l({command:`zero-trust risk-scoring integrations update`,classification:{safeFlags:[`active`,`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/integrations/${n[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(n[`integration-id`]))}`,pathParams:{"integration-id":String(n[`integration-id`]??``)},bodyKind:`json`,body:n.body===void 0?p({active:n.active,reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.riskScoring.integrations.update({...e,account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Updated`});return}if(n.active===void 0)throw Error(`--active is required (or pass --body with this field set).`);n[`tenant-url`]===void 0&&(n[`tenant-url`]=await g(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=p({active:n.active,reference_id:m(n[`reference-id`],`reference-id`,`text`),tenant_url:m(n[`tenant-url`],`tenant-url`,`text`)});o(await c(`Updating`,async()=>i.zeroTrust.riskScoring.integrations.update({...u,account_id:l,integration_id:n[`integration-id`]})),{successLabel:`Updated`})})},ag={command:`integrations`,describe:`User Risk Scoring - manage integrations that provide risk score signals`,builder:e=>e.command(qh).command(Yh).command(Zh).command($h).command(ig).command(ng).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function og(e){return e.usage(`$0 zero-trust risk-scoring reset <user-id>
828
+
829
+ 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 sg={command:`reset <user-id>`,describe:`Clear the risk score for a particular user`,builder:og,handler:async n=>l({command:`zero-trust risk-scoring reset`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring reset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/reset`,pathParams:{"user-id":String(n[`user-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force,message:`This operation wipes risk-scoring history.`})){process.stderr.write(`Aborted.
830
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.riskScoring.reset({account_id:l,user_id:n[`user-id`]})),{successLabel:`Deleted`})})};function cg(e){return e.usage(`$0 zero-trust risk-scoring summary get
831
+
832
+ 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 lg={command:`get`,describe:`Get risk score info for all users in the account`,builder:cg,handler:async n=>l({command:`zero-trust risk-scoring summary get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust risk-scoring summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/zt_risk_scoring/summary`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.zeroTrust.riskScoring.summary.get({account_id:l})),{successLabel:`Loaded`})})},ug={command:`summary`,describe:`User Risk Scoring - retrieve account risk score summaries`,builder:e=>e.command(lg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},dg={command:`risk-scoring`,describe:`User Risk Scoring - retrieve and reset user risk scores`,builder:e=>e.command(Gh).command(sg).command(Uh).command(ag).command(ug).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function fg(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 pg={command:`edit`,describe:`Update a user seat`,builder:fg,handler:async n=>l({command:`zero-trust seats edit`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust seats edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/seats`,pathParams:{},bodyKind:`json`,body:n.body===void 0?void 0:d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Updating`,async()=>i.zeroTrust.seats.edit({body:e,account_id:l})),{successLabel:`Updated`});return}if(n.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},mg={command:`seats`,describe:`Operations for seats`,builder:e=>e.command(pg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hg(e){return e.usage(`$0 zero-trust users mfa authenticators delete <authenticator-id>
683
833
 
684
- Deletes a specific MFA device, including a PIV key or FIDO2 key enrollment, for a user. This action is only available if MFA is turned on for the organization. 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 _p={command:`delete <authenticator-id>`,describe:`Delete a user's MFA device`,builder:gp,handler:async n=>l({command:`zero-trust users mfa authenticators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust users mfa authenticators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/mfa_authenticators/${n[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(n[`authenticator-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``),"authenticator-id":String(n[`authenticator-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
685
- `);return}o(await c(`Deleting`,async()=>i.zeroTrust.users.mfa.authenticators.delete({account_id:l,user_id:n[`user-id`],authenticator_id:n[`authenticator-id`]})),{successLabel:`Deleted`})})},vp={command:`authenticators`,describe:`Operations for users.mfa.authenticators`,builder:e=>e.command(_p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yp={command:`mfa`,describe:`Operations for users.mfa`,builder:e=>e.command(vp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bp={command:`users`,describe:`Operations for users`,builder:e=>e.command(yp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xp={command:`zero-trust`,describe:`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,builder:e=>e.command(hr).command(Dr).command(Zr).command(ni).command(Fa).command(rl).command(xl).command(Ld).command(af).command(yf).command(Af).command(rp).command(op).command(hp).command(bp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xp as default};
834
+ Deletes a specific MFA device, including a PIV key or FIDO2 key enrollment, for a user. This action is only available if MFA is turned on for the organization. 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 gg={command:`delete <authenticator-id>`,describe:`Delete a user's MFA device`,builder:hg,handler:async n=>l({command:`zero-trust users mfa authenticators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf zero-trust users mfa authenticators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/users/${n[`user-id`]==null?`<user-id>`:encodeURIComponent(String(n[`user-id`]))}/mfa_authenticators/${n[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(n[`authenticator-id`]))}`,pathParams:{"user-id":String(n[`user-id`]??``),"authenticator-id":String(n[`authenticator-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await v({force:!!n.force})){process.stderr.write(`Aborted.
835
+ `);return}o(await c(`Deleting`,async()=>i.zeroTrust.users.mfa.authenticators.delete({account_id:l,user_id:n[`user-id`],authenticator_id:n[`authenticator-id`]})),{successLabel:`Deleted`})})},_g={command:`authenticators`,describe:`Operations for users.mfa.authenticators`,builder:e=>e.command(gg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vg={command:`mfa`,describe:`Operations for users.mfa`,builder:e=>e.command(_g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yg={command:`users`,describe:`Operations for users`,builder:e=>e.command(vg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bg={command:`zero-trust`,describe:`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,builder:e=>e.command(Nr).command(Gr).command(Ha).command(qa).command(tc).command(Nl).command(Vf).command(rh).command(wh).command(Rh).command(dg).command(mg).command(yg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{bg as default};