cf 1.0.0-beta.26 → 1.0.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/dist/_meta/commands.json +7373 -4926
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +11614 -4465
  4. package/dist/abuse-reports-D9edOyag.mjs +24 -0
  5. package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
  7. package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/ai-search-BxyhS3X7.mjs +74 -0
  14. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/analytics-C6bfqm-W.mjs +17 -0
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
  23. package/dist/auth-B-h0BHg7.mjs +2 -0
  24. package/dist/auth-B6tswVxH.mjs +2 -0
  25. package/dist/{auth-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
  28. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/body-unions-DNs981Ia.mjs +2 -0
  33. package/dist/bot-management-CXHXgrQC.mjs +9 -0
  34. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
  35. package/dist/brand-protection-kv1ba80i.mjs +14 -0
  36. package/dist/browser-run-D-vRoZmf.mjs +40 -0
  37. package/dist/build-BzJGqb2o.mjs +2 -0
  38. package/dist/build-FFxzigo4.mjs +2 -0
  39. package/dist/{builds-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
  44. package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
  49. package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
  70. package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
  76. package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
  77. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/custom-nameservers-CapMDyly.mjs +12 -0
  79. package/dist/custom-pages-BVIniWfq.mjs +38 -0
  80. package/dist/d1-nJCOJZb8.mjs +50 -0
  81. package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
  91. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
  92. package/dist/{docs-CYjyBA8q.mjs → docs-CRc_WOXh.mjs} +1 -1
  93. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
  94. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/email-domains-uL22-zRY.mjs +14 -0
  97. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
  98. package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
  100. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  101. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  102. package/dist/{errors-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
  105. package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/global-options-DiKj2cQy.mjs +2 -0
  109. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  110. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  111. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  112. package/dist/iam-LlGEzRCq.mjs +62 -0
  113. package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
  114. package/dist/index.mjs +1 -1
  115. package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
  116. package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
  117. package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
  118. package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
  119. package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
  120. package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
  121. package/dist/kv-Ipa7dnvF.mjs +12 -0
  122. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  124. package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
  125. package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
  126. package/dist/local-D5Vq6ooZ.mjs +2 -0
  127. package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
  128. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  129. package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
  130. package/dist/login-DRJugxya.mjs +2 -0
  131. package/dist/logpush-C5Gw7F_9.mjs +68 -0
  132. package/dist/logs-y3REfHbb.mjs +51 -0
  133. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  134. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  135. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  136. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  137. package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
  138. package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  139. package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
  140. package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
  141. package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
  142. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  143. package/dist/o11y-ySxrnP1Z.mjs +88 -0
  144. package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  145. package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
  146. package/dist/observability-C-KNh__y.mjs +4 -0
  147. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  148. package/dist/organizations-DbeeWUL4.mjs +71 -0
  149. package/dist/output-BZQEl3mK.mjs +2 -0
  150. package/dist/package-B7RgwuFR.mjs +2 -0
  151. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
  152. package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
  153. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  154. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
  155. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  156. package/dist/precursor-Dx8lN4UJ.mjs +4 -0
  157. package/dist/previews-DEVNSip2.mjs +6 -0
  158. package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
  159. package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  160. package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
  161. package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
  162. package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
  163. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  164. package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
  165. package/dist/realtime-DMKHLYF4.mjs +170 -0
  166. package/dist/registrar-D23gfKBi.mjs +43 -0
  167. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  168. package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  169. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  170. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  171. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  172. package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
  173. package/dist/rulesets-DmqwixUC.mjs +42 -0
  174. package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
  175. package/dist/{run-BZ6Fj3jQ.mjs → run-BOKI1uWa.mjs} +1 -1
  176. package/dist/run-DBqOjD1P.mjs +2 -0
  177. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  178. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  179. package/dist/schema-flags-CXm9iIv6.mjs +4 -0
  180. package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
  181. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  182. package/dist/security-insights-DMm0qg_m.mjs +62 -0
  183. package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
  184. package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
  185. package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
  186. package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
  187. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  188. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
  189. package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
  190. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
  191. package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
  192. package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
  193. package/dist/src-BoSDeQ9m.mjs +133 -0
  194. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  195. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  196. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  197. package/dist/state-DW3QZtfh.mjs +2 -0
  198. package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
  199. package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
  200. package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
  201. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  202. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  203. package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
  204. package/dist/tenants-DD-GMq0K.mjs +13 -0
  205. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  206. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
  207. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  208. package/dist/ui-xjCox-gU.mjs +2 -0
  209. package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
  210. package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
  211. package/dist/update-check-worker.mjs +1 -1
  212. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  213. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  214. package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
  215. package/dist/{vectorize-D5qiggZU.mjs → vectorize-BTBerJME.mjs} +11 -11
  216. package/dist/verify-B9ILCohg.mjs +2 -0
  217. package/dist/verify-BCuWaO-L.mjs +2 -0
  218. package/dist/version-6Bpy6Bgt.mjs +2 -0
  219. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
  220. package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  221. package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
  222. package/dist/workers-BnLiOjZf.mjs +39 -0
  223. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  224. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  225. package/dist/workers-vpc-D8lefWDo.mjs +12 -0
  226. package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  227. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
  228. package/dist/zaraz-BBKki5WS.mjs +22 -0
  229. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
  230. package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
  231. package/package.json +16 -16
  232. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  233. package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
  234. package/dist/ai-search-QOenIzDL.mjs +0 -74
  235. package/dist/analytics-CQ-Yt1mm.mjs +0 -17
  236. package/dist/analytics-engine-CdrY5-95.mjs +0 -4
  237. package/dist/api-X3wKppsT.mjs +0 -3
  238. package/dist/argo-BiefH8wc.mjs +0 -14
  239. package/dist/auth-Czzy5Rs_.mjs +0 -2
  240. package/dist/auth-D5Yj9eYU.mjs +0 -2
  241. package/dist/billing-BrLJqlOf.mjs +0 -22
  242. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  243. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  244. package/dist/brand-protection-Byoa1hvj.mjs +0 -26
  245. package/dist/browser-run-BSVANGzU.mjs +0 -40
  246. package/dist/build-CPKxZ3kL.mjs +0 -2
  247. package/dist/build-Dwd1_7o0.mjs +0 -2
  248. package/dist/cache-0xCdyNg9.mjs +0 -36
  249. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  250. package/dist/create-BtmuVqVL.mjs +0 -2
  251. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  252. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  253. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  254. package/dist/d1-BsWI546w.mjs +0 -89
  255. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  256. package/dist/error-sanitization-B025CygB.mjs +0 -2
  257. package/dist/get-Be821dio.mjs +0 -2
  258. package/dist/iam-DuZenYtc.mjs +0 -48
  259. package/dist/kv-CTyuvcAz.mjs +0 -12
  260. package/dist/load-balancers-DMTsh-9q.mjs +0 -72
  261. package/dist/local-CWTti4ot.mjs +0 -2
  262. package/dist/login-Djz5mvHJ.mjs +0 -2
  263. package/dist/logpush-OMhp7VgE.mjs +0 -44
  264. package/dist/logs-BSyyNwso.mjs +0 -35
  265. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  266. package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
  267. package/dist/o11y-DeNxXxcp.mjs +0 -86
  268. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  269. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  270. package/dist/organization-IsxVyWol.mjs +0 -73
  271. package/dist/organizations-p8Mgo8A7.mjs +0 -4
  272. package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
  273. package/dist/output-BJEgbI0G.mjs +0 -2
  274. package/dist/package-BOE_De2L.mjs +0 -2
  275. package/dist/precursor-B35P8h6h.mjs +0 -4
  276. package/dist/previews-B1mqjXaJ.mjs +0 -6
  277. package/dist/realtime-DWjdrDzv.mjs +0 -168
  278. package/dist/registrar-uYOU1U27.mjs +0 -43
  279. package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
  280. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  281. package/dist/run-D4-K_cbQ.mjs +0 -2
  282. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  283. package/dist/security-insights-ZKtey62s.mjs +0 -40
  284. package/dist/src-jyCTFHcS.mjs +0 -131
  285. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  286. package/dist/state-C7lNNN31.mjs +0 -2
  287. package/dist/telemetry-BZdRnr26.mjs +0 -2
  288. package/dist/tenant-CqYoylyU.mjs +0 -10
  289. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  290. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  291. package/dist/version-DNcdABcr.mjs +0 -2
  292. package/dist/workers-TS0oQ-XH.mjs +0 -39
  293. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
  294. package/dist/zaraz-C8__FhOh.mjs +0 -22
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export{t as createCloudflareClientWithToken,n as createCommandClient}from"./auth-D5Yj9eYU.mjs";import"./context-BvLXzoMs.mjs";import"./oauth-Dnog5v-Q.mjs";import"./auth-token-DvNoIhRL.mjs";
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{K as e}from"./dist-DehXZozc.mjs";import{n as t,t as n}from"./api-X3wKppsT.mjs";import{a as r,n as i}from"./context-BvLXzoMs.mjs";import{l as a}from"./oauth-Dnog5v-Q.mjs";import{t as o}from"./auth-token-DvNoIhRL.mjs";import{n as s}from"./request-headers-DHzBX7dQ.mjs";const c=6e4;function l(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var u={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},d={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function f(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function p(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function m(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function h(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)h(e,t,r);else e.append(t,String(n))}}function g(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))h(t,n,r);return t.toString()}function _(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=g(n??{});return a&&(i.search=a),i.toString()}const v=/* @__PURE__ */ new WeakMap,y=/* @__PURE__ */ new WeakMap;async function b(e,n,r,i={}){let a=e.baseUrl,o=_(r,a,i.query),s={...i.headers},c;i.body!==void 0&&(f(i.body)||typeof i.body==`string`&&p(s)?c=i.body:(s[`Content-Type`]??=`application/json`,c=JSON.stringify(i.body)));let u=i.timeout===void 0&&l(c)?y.get(e):void 0,d=i.timeout??v.get(e)??6e4,h;try{h=await(u??e).fetch(o,{method:n,headers:s,body:c,signal:i.signal},{timeoutInSeconds:i.timeout===void 0?void 0:i.timeout/1e3,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e===`timeout`||e instanceof Error&&e.name===`AbortError`?Error(u?`Request timed out`:`Request timed out after ${d}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!h.ok)throw new t({statusCode:h.status,body:await m(h),rawResponse:{status:h.status,statusText:h.statusText,url:h.url||o,headers:h.headers,redirected:h.redirected,type:h.type}});if(h.status===204)return null;let g=h.headers.get(`content-type`)??``;if(!g.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await h.arrayBuffer());let b=await h.text();if(b===``)return null;if(!g.includes(`application/json`))return b;let x=JSON.parse(b);if(x.success===!1){let e=x.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new t({message:`API error: ${e}`,statusCode:h.status,body:x})}return`result`in x?x.result:x}function x(e){let t={baseUrl:e.baseURL??`https://api.cloudflare.com/client/v4`,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??6e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch},r=new n(t);return v.set(r,e.timeout??6e4),e.timeout===void 0&&y.set(r,new n({...t,timeoutInSeconds:void 0})),r}async function S(t){if(a())return;let n=await r();if(n)return n;try{let n=await o(),r=e({compliance_region:await i()}),a=t-Date.now();if(a<=0)return;let c=x({apiToken:n,baseURL:r,defaultHeaders:s()}),l={timeoutInSeconds:a/1e3,maxRetries:0},[f,p]=await Promise.allSettled([c.send(u,{per_page:50},l),c.send(d,{per_page:50},l)]);if(f.status===`rejected`)return;let m=f.value;if((m.result_info?.total_count??m.result.length)>m.result.length)return;let h=m.result;if(p.status===`fulfilled`){let e=p.value.result??[];if((p.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));h=h.filter(e=>t.has(e.id))}return h.length===1?h[0]?.id:void 0}catch{return}}async function C(t){if(t.dryRun&&a())throw Error(`This command's dry run cannot be used with --temporary-account. Remove --dry-run to run the command for real.`);let n=e({compliance_region:await i()});if(t.local){let{createLocalFetch:e}=await import(`./local-CWTti4ot.mjs`);return x({apiToken:`cf-local-mode-no-auth`,baseURL:n,defaultHeaders:s(),fetch:e({persistTo:t.persistTo,apiBaseUrl:n})})}return x({apiToken:await o(),baseURL:n,defaultHeaders:s()})}export{S as a,l as c,b as i,c as l,C as n,d as o,g as r,u as s,x as t};
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-DJF_Rs5S.mjs";var m={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function h(e){return e.usage(`$0 billing addresses validate
3
-
4
- Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`validate`,describe:`Validate Billing Address`,builder:h,handler:async e=>c({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),city:f(e.city,`city`,`text`),country:f(e.country,`country`,`text`),state:f(e.state,`state`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}):u(e.body)});return}let t=await n(e);if(e.body){let n=u(e.body),r=await s(`Validating`,async()=>t.send(m,{body:n}));a(r,{successLabel:`Validated`});return}let r=d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),city:f(e.city,`city`,`text`),country:f(e.country,`country`,`text`),state:f(e.state,`state`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}),i=await s(`Validating`,async()=>t.send(m,{body:r}));a(i,{successLabel:`Validated`})})},_={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile/payment-method`};function y(e){return e.usage(`$0 billing profiles create-payment-intent
5
-
6
- Creates a Stripe payment intent for adding or updating a payment method on the account's billing profile. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`create-payment-intent`,describe:`Create Payment Intent for Billing Profile`,builder:y,handler:async e=>c({command:`billing profiles create-payment-intent`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf billing profiles create-payment-intent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile/payment-method`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(v,{account_id:l}));a(u,{successLabel:`Created`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function S(e){return e.usage(`$0 billing profiles create
7
-
8
- Creates a billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const C={command:`create`,describe:`Create Billing Profile`,builder:S,handler:async e=>c({command:`billing profiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf billing profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),billing_email:f(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:f(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:f(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:f(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:f(e.city,`city`,`text`),company:f(e.company,`company`,`text`),country:f(e.country,`country`,`text`),first_name:f(e[`first-name`],`first-name`,`text`),h_captcha_response:f(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:f(e[`last-name`],`last-name`,`text`),preferred_locale:f(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:f(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:f(e.state,`state`,`text`),tax_id_type:f(e[`tax-id-type`],`tax-id-type`,`text`),telephone:f(e.telephone,`telephone`,`text`),vat:f(e.vat,`vat`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(x,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}let p=d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),billing_email:f(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:f(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:f(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:f(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:f(e.city,`city`,`text`),company:f(e.company,`company`,`text`),country:f(e.country,`country`,`text`),first_name:f(e[`first-name`],`first-name`,`text`),h_captcha_response:f(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:f(e[`last-name`],`last-name`,`text`),preferred_locale:f(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:f(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:f(e.state,`state`,`text`),tax_id_type:f(e[`tax-id-type`],`tax-id-type`,`text`),telephone:f(e.telephone,`telephone`,`text`),vat:f(e.vat,`vat`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}),m=await s(`Creating`,async()=>c.send(x,{body:p,account_id:l}));a(m,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/billing/profile`,response:!1};function T(e){return e.usage(`$0 billing profiles delete
9
-
10
- Deletes the billing profile for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete`,describe:`Delete Billing Profile`,builder:T,handler:async e=>c({command:`billing profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf billing profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(w,{account_id:l}));a(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/profile`};function O(e){return e.usage(`$0 billing profiles get
11
-
12
- Gets the current billing profile for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get Billing Profile`,builder:O,handler:async e=>c({command:`billing profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf billing profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l}));a(u,{successLabel:`Loaded`})})};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function j(e){return e.usage(`$0 billing profiles update-email
13
-
14
- Updates the billing email addresses and preferred locale for an account.`).option(`billing-email`,{type:`string`,description:`The billing_email field`}).option(`preferred-locale`,{type:`string`,description:`The preferred_locale field`}).option(`secondary-billing-email`,{type:`string`,description:`The secondary_billing_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update-email`,describe:`Update Billing Email`,builder:j,handler:async e=>c({command:`billing profiles update-email`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf billing profiles update-email`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({billing_email:f(e[`billing-email`],`billing-email`,`text`),preferred_locale:f(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:f(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:l}));a(n,{successLabel:`Updated`});return}let p=d({billing_email:f(e[`billing-email`],`billing-email`,`text`),preferred_locale:f(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:f(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}),m=await s(`Updating`,async()=>c.send(A,{body:p,account_id:l}));a(m,{successLabel:`Updated`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function P(e){return e.usage(`$0 billing profiles update
15
-
16
- Updates the billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const F={command:`update`,describe:`Update Billing Profile`,builder:P,handler:async e=>c({command:`billing profiles update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf billing profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),billing_email:f(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:f(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:f(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:f(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:f(e.city,`city`,`text`),company:f(e.company,`company`,`text`),country:f(e.country,`country`,`text`),first_name:f(e[`first-name`],`first-name`,`text`),h_captcha_response:f(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:f(e[`last-name`],`last-name`,`text`),preferred_locale:f(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:f(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:f(e.state,`state`,`text`),tax_id_type:f(e[`tax-id-type`],`tax-id-type`,`text`),telephone:f(e.telephone,`telephone`,`text`),vat:f(e.vat,`vat`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:l}));a(n,{successLabel:`Updated`});return}let p=d({address:f(e.address,`address`,`text`),address2:f(e.address2,`address2`,`text`),billing_email:f(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:f(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:f(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:f(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:f(e.city,`city`,`text`),company:f(e.company,`company`,`text`),country:f(e.country,`country`,`text`),first_name:f(e[`first-name`],`first-name`,`text`),h_captcha_response:f(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:f(e[`last-name`],`last-name`,`text`),preferred_locale:f(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:f(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:f(e.state,`state`,`text`),tax_id_type:f(e[`tax-id-type`],`tax-id-type`,`text`),telephone:f(e.telephone,`telephone`,`text`),vat:f(e.vat,`vat`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}),m=await s(`Updating`,async()=>c.send(N,{body:p,account_id:l}));a(m,{successLabel:`Updated`})})},I={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(C).command(b).command(E).command(k).command(F).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ee={method:`GET`,path:t=>e`/billing/rate_plans/${t.public_key}`};function L(e){return e.usage(`$0 billing rate-plans get <public-key>
17
-
18
- Gets a rate plan's details by its public key (e.g., 'teams_free', 'cf_pro_20_20'). This is a public catalog endpoint, so authentication is not enforced and credentials are accepted but not required.`).positional(`public-key`,{type:`string`,description:`The public key identifier for the rate plan.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:L,handler:async e=>c({command:`billing rate-plans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf billing rate-plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/billing/rate_plans/${e[`public-key`]==null?`<public-key>`:encodeURIComponent(String(e[`public-key`]))}`,pathParams:{"public-key":String(e[`public-key`]??``)},bodyKind:`none`});return}let t=await n(e),r=await s(`Loading`,async()=>t.send(ee,{public_key:e[`public-key`]}));a(r,{successLabel:`Loaded`})})},z={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage/billable-metrics`,query:[`from`,`to`]};function V(e){return e.usage("$0 billing usage get-account-billable-metrics\n\nLists billable metrics available to the account through contracts and subscriptions that overlap the requested period. Results are deduplicated and ordered. If no qualifying contract exists, the result is an empty array. When `from` and `to` are omitted, the period defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get-account-billable-metrics`,describe:`List Account Billable Metrics (Version 2, Alpha, Restricted)`,builder:V,handler:async e=>c({command:`billing usage get-account-billable-metrics`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={from:e.from,to:e.to};if(e.dryRun){let e=await r();o({command:`cf billing usage get-account-billable-metrics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage/billable-metrics`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(B,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage`,query:[`from`,`to`]};function W(e){return e.usage("$0 billing usage get-account-usage-v2\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. To retrieve rated costs, use `POST` on the same path with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get-account-usage-v2`,describe:`Get Account Usage (Version 2, Alpha, Restricted)`,builder:W,handler:async e=>c({command:`billing usage get-account-usage-v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={from:e.from,to:e.to};if(e.dryRun){let e=await r();o({command:`cf billing usage get-account-usage-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(U,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage/info`};function q(e){return e.usage(`$0 billing usage get-info-v1
19
-
20
- Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get-info-v1`,describe:`Get Account Billable Usage Info (Version 1, Alpha)`,builder:q,handler:async e=>c({command:`billing usage get-info-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf billing usage get-info-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage/info`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(K,{account_id:l}));a(u,{successLabel:`Loaded`})})};var Y={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage`,query:[`from`,`to`]};function X(e){return e.usage(`$0 billing usage get-v1
21
-
22
- Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get-v1`,describe:`Get Account Billable Usage (Version 1, Alpha)`,builder:X,handler:async e=>c({command:`billing usage get-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={from:e.from,to:e.to};if(e.dryRun){let e=await r();o({command:`cf billing usage get-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Y,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/billable/usage`,body:`json`};function $(e){return e.usage("$0 billing usage query\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. This is the filterable counterpart to `GET` on the same path. It is a read-only operation and requires only the `#billing:read` permission; `POST` is used so that filter criteria can be supplied in a request body rather than in the query string. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** Cost and pricing fields are populated only when `Metric` is `cost`; otherwise they are absent from responses. The request body is optional. When it is omitted, or when `TimePeriod` is omitted, the range defaults to the start of the current month through today. The maximum date range is 31 days. Filters of different kinds are combined with AND. Values within one tag filter are combined with OR. Filter values that do not match usage produce an empty result set. Results can be grouped by up to two groups, in any combination of dimension keys and resource-tag keys. Tag groups are returned in the `Tags` field. Usage without a requested tag remains in an untagged group, with that key omitted from `Tags`. Requests that use tag filtering or tag grouping return HTTP 400 when the underlying usage data source does not support tags. Requests that use dimension grouping return HTTP 400 when the underlying usage data source does not support dimensions.").option(`filter-by-billable-metric-ids`,{type:`string`,array:!0,description:"Restrict results to rows whose `x_BillableMetricId` matches one of these billable metric ids (e.g. `workers_standard_requests`). Values must be unique."}).option(`filter-by-product-family-ids`,{type:`string`,array:!0,description:`Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs.`}).option(`filter-by-tags`,{type:`string`,description:`Restrict results by resource tags. Filters for different keys are combined with AND, while values within one filter are combined with OR. Keys must be unique and are case-sensitive. Provide as a JSON array of objects or @path/to/file.json.`}).option(`group-by`,{type:`string`,description:`Grouping definitions used to split result rows. At most two unique keys may be supplied. Provide as a JSON array of objects or @path/to/file.json.`}).option(`metric`,{type:`string`,description:"Type of cost/usage records to retrieve. `usage` returns unrated usage quantities. `cost` returns rated usage with cost and pricing fields; it is available only on `POST` account usage and only when the underlying usage data source is ClickHouse (other sources return an empty result set). Requests that combine `cost` with `GroupBy` or `FilterBy.Tags` return HTTP 400. Unrelated to `FilterBy.BillableMetricIds`. Defaults to `usage` when omitted.",choices:[`usage`,`cost`],default:`usage`}).coerce(`metric`,e=>f(e,`metric`,`text`)).option(`time-period-from`,{type:`string`,description:"Start of the range (ISO 8601). Required if `To` is set."}).option(`time-period-to`,{type:`string`,description:"End of the range (ISO 8601). Required if `From` is set. Must be after `From` and no more than 31 days after it."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter criteria for a usage query. Every field is optional; an empty object is equivalent to omitting the body entirely. Unknown fields are rejected.`})}const te={command:`query`,describe:`Query Account Usage (Version 2, Alpha, Restricted)`,builder:$,handler:async e=>c({command:`billing usage query`,classification:{safeFlags:[`metric`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf billing usage query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billable/usage`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:l(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:l(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:f(e[`time-period-from`],`time-period-from`,`text`),To:f(e[`time-period-to`],`time-period-to`,`text`)}}):u(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Loading`,async()=>c.send(Q,{body:t,account_id:p}));a(n,{successLabel:`Loaded`});return}let m=d({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:l(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:l(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:f(e[`time-period-from`],`time-period-from`,`text`),To:f(e[`time-period-to`],`time-period-to`,`text`)}}),h=await s(`Loading`,async()=>c.send(Q,{body:m,account_id:p}));a(h,{successLabel:`Loaded`})})},ne={command:`usage`,describe:`Metered usage data for billed services — requests, bandwidth, and feature consumption`,builder:e=>e.command(H).command(G).command(J).command(Z).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},re={command:`billing`,describe:`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,builder:e=>e.command(_).command(I).command(z).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{re as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{readFileSync as e}from"node:fs";import{resolve as t}from"node:path";function n(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e]??``;r[n]&&typeof r[n]==`object`||(r[n]={}),r=r[n]}let i=t[t.length-1]??``;r[i]=n}function r(e,t=[]){let n=(e,r)=>{if(Array.isArray(e)||typeof e!=`object`||!e)return e;let i=Object.entries(e).flatMap(([e,i])=>{let a=[...r,e],o=t.some(e=>e.length===a.length&&e.every((e,t)=>e===a[t])),s=o?i:n(i,a);return s===void 0||!o&&typeof s==`object`&&s&&!Array.isArray(s)&&Object.keys(s).length===0?[]:[[e,s]]});return Object.fromEntries(i)};return n(e,[])}function i(n,r){let i=r.startsWith(`--`)?r:`--${r}`,a=n;if(n.startsWith(`@`)){let r=n.slice(1);if(r.length===0)throw Error(`${i} '@' must be followed by a file path (got empty path)`);let o=t(r);try{a=e(o,`utf-8`)}catch(e){let t=e instanceof Error?e.message:`unknown read error`;throw Error(`${i}: cannot read file at '${r}': ${t}`)}}try{return JSON.parse(a)}catch{throw Error(`Invalid JSON in ${i}. Expected valid JSON.`)}}function a(e,t=[]){let n=i(e,`body`);for(let{path:e,flag:r}of t){let t=n;for(let n of e)t=o(t)&&Object.hasOwn(t,n)?t[n]:void 0;if(!o(t))throw Error(`--body must include a JSON object at ${e.join(`.`)} (for --${r}).`)}return n}function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(n,r){if(n===void 0)return;let i=r.startsWith(`--`)?r:`--${r}`;if(typeof n!=`string`)throw Error(`${i} must be provided once as a scalar value.`);let a=n;if(n.startsWith(`@`)){let r=n.slice(1);if(r.length===0)throw Error(`${i} '@' must be followed by a file path (got empty path)`);try{a=e(t(r),`utf-8`)}catch(e){let t=e instanceof Error?e.message:`unknown read error`;throw Error(`${i}: cannot read file at '${r}': ${t}`)}}let o;try{o=JSON.parse(a)}catch{return a}if(typeof o!=`string`&&typeof o!=`number`&&typeof o!=`boolean`)throw Error(`${i} must be a JSON scalar or plain string.`);return o}function c(e,t,n=!1){let r=t.startsWith(`--`)?t:`--${t}`;if(e===void 0){if(n)throw Error(`${r} is required (or pass --body with this field set).`);return}if(typeof e!=`string`)throw Error(`${r} must be provided once as a JSON object.`);let a=i(e,t);if(!o(a))throw Error(`${r} must be a JSON object.`);return a}function l(e,t){return d(e,t,`objects`)}function u(e,t){return d(e,t,`arrays`)}function d(e,t,n){if(e===void 0)return;let r=t.startsWith(`--`)?t:`--${t}`;if(typeof e!=`string`)throw Error(`${r} must be provided once as a JSON array of ${n}.`);let a=i(e,t);if(!Array.isArray(a)||a.some(e=>n===`arrays`?!Array.isArray(e):!o(e)))throw Error(`${r} must be a JSON array of ${n}.`);return a}export{l as a,u as i,a as n,s as o,c as r,n as s,r as t};
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-D5Yj9eYU.mjs";import{i as n}from"./context-BvLXzoMs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-B-CVX0kn.mjs";import{t as o}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f}from"./prompt-DJF_Rs5S.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`,body:`json`,response:!1};function m(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`requests-by-attribute`,{type:`string`,description:`Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. Provide as a JSON object or @path/to/file.json.`}).option(`requests-by-score`,{type:`string`,description:"Map of bot scores (1-99) to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`requests-by-score-src`,{type:`string`,description:"Map of score source to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Submit a feedback report`,builder:m,handler:async e=>o({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]):s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}])});return}let o=await t(e),m=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=m,e.body){let t=s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}]),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:m}));r(n,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await d(`description`,`The description field`)),e.expression===void 0&&(e.expression=await d(`expression`,`Wirefilter expression describing the traffic being reported.`)),e[`first-request-seen-at`]===void 0&&(e[`first-request-seen-at`]=await d(`first-request-seen-at`,`The first_request_seen_at field`)),e[`last-request-seen-at`]===void 0&&(e[`last-request-seen-at`]=await d(`last-request-seen-at`,`The last_request_seen_at field`)),e.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);if(e[`requests-by-attribute`]===void 0)throw Error(`--requests-by-attribute is required (or pass --body with this field set).`);if(e[`requests-by-score`]===void 0)throw Error(`--requests-by-score is required (or pass --body with this field set).`);if(e[`requests-by-score-src`]===void 0)throw Error(`--requests-by-score-src is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await f(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let h=l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]),g=await a(`Creating`,async()=>o.send(p,{body:h,zone_id:m}));r(g,{successLabel:`Created`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`};function _(e){return e.usage(`$0 bot-management feedback list
3
-
4
- Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List zone feedback reports`,builder:_,handler:async e=>o({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(g,{zone_id:s}));r(c,{successLabel:`Loaded`})})},y={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(h).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management`};function x(e){return e.usage(`$0 bot-management get
5
-
6
- Retrieve a zone's Bot Management Config`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get Zone Bot Management Config`,builder:x,handler:async e=>o({command:`bot-management get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(b,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var C={method:`PUT`,path:t=>e`/zones/${t.zone_id}/bot_management`,body:`json`};function w(e){return e.usage('$0 bot-management update\n\nUpdates the Bot Management configuration for a zone. This API is used to update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise** See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \\ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan. #### Clean up configuration for Bot Fight Mode plan ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "suppress_session_score": false } ``` #### Clean up configuration for SBFM Pro plan ```json { "sbfm_likely_automated": "allow", "fight_mode": false } ``` #### Clean up configuration for SBFM Biz plan ```json { "fight_mode": false } ``` #### Clean up configuration for BM Enterprise Subscription plan It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks. ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "fight_mode": false } ```').option(`ai-bots-migration-opt-out`,{type:`boolean`,description:`Temporary migration flag tracking zones opted out of AI bots managed-rule updates.`}).option(`ai-bots-protection`,{type:`string`,description:`Enable rule to block AI Scrapers and Crawlers.`,choices:[`block`,`disabled`,`only_on_ad_pages`]}).coerce(`ai-bots-protection`,e=>u(e,`ai-bots-protection`,`text`)).option(`ai-search`,{type:`string`,description:`Configure robots.txt policy for AI search bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-search`,e=>u(e,`ai-search`,`text`)).option(`ai-training`,{type:`string`,description:`Configure robots.txt policy for AI model training bots.`,choices:[`disabled`,`disallow`,`block`,`only_on_ad_pages`]}).coerce(`ai-training`,e=>u(e,`ai-training`,`text`)).option(`ai-user`,{type:`string`,description:`Configure robots.txt policy for AI assistant and agent bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-user`,e=>u(e,`ai-user`,`text`)).option(`bot-preference-sync-enabled`,{type:`boolean`,description:`Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone's AI Search, AI User, and AI Training preferences.`}).option(`cf-robots-variant`,{type:`string`,description:`Specifies the Robots Access Control License variant to use.`,choices:[`off`,`policy_only`]}).coerce(`cf-robots-variant`,e=>u(e,`cf-robots-variant`,`text`)).option(`content-bots-protection`,{type:`string`,description:`Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.`,choices:[`block`,`disabled`]}).coerce(`content-bots-protection`,e=>u(e,`content-bots-protection`,`text`)).option(`crawler-protection`,{type:`string`,description:`Enable rule to punish AI Scrapers and Crawlers via a link maze.`,choices:[`enabled`,`disabled`]}).coerce(`crawler-protection`,e=>u(e,`crawler-protection`,`text`)).option(`enable-js`,{type:`boolean`,description:`Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).`}).option(`is-robots-txt-managed`,{type:`boolean`,description:`Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.`}).option(`jsd-api-results-enabled`,{type:`boolean`,description:`Whether to use JavaScript Detection results submitted through the API for this zone.`}).option(`fight-mode`,{type:`boolean`,description:`Whether to enable Bot Fight Mode.`}).option(`stale-zone-configuration-optimize-wordpress`,{type:`boolean`,description:`Indicates that the zone's wordpress optimization for SBFM is turned on.`}).option(`stale-zone-configuration-sbfm-definitely-automated`,{type:`string`,description:`Indicates that the zone's definitely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-likely-automated`,{type:`string`,description:`Indicates that the zone's likely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-static-resource-protection`,{type:`string`,description:`Indicates that the zone's static resource protection is turned on.`}).option(`stale-zone-configuration-sbfm-verified-bots`,{type:`string`,description:`Indicates that the zone's verified bot requests are being blocked.`}).option(`stale-zone-configuration-suppress-session-score`,{type:`boolean`,description:`Indicates that the zone's session score tracking is disabled.`}).option(`stale-zone-configuration-fight-mode`,{type:`boolean`,description:`Indicates that the zone's Bot Fight Mode is turned on.`}).option(`optimize-wordpress`,{type:`boolean`,description:`Whether to optimize Super Bot Fight Mode protections for Wordpress.`}).option(`sbfm-definitely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on definitely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).coerce(`sbfm-definitely-automated`,e=>u(e,`sbfm-definitely-automated`,`text`)).option(`sbfm-static-resource-protection`,{type:`boolean`,description:`Super Bot Fight Mode (SBFM) to enable static resource protection.
7
- Enable if static resources on your application need bot protection.
8
- Note: Static resource protection can also result in legitimate traffic being blocked.
9
- `}).option(`sbfm-verified-bots`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on verified bots requests.`,choices:[`allow`,`block`]}).coerce(`sbfm-verified-bots`,e=>u(e,`sbfm-verified-bots`,`text`)).option(`sbfm-likely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on likely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).coerce(`sbfm-likely-automated`,e=>u(e,`sbfm-likely-automated`,`text`)).option(`auto-update-model`,{type:`boolean`,description:`Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)`}).option(`bm-cookie-enabled`,{type:`boolean`,description:`Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true`}).option(`suppress-session-score`,{type:`boolean`,description:`Whether to disable tracking the highest bot score for a session in the Bot Management cookie.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`update`,describe:`Update Zone Bot Management Config`,builder:w,handler:async e=>o({command:`bot-management update`,classification:{safeFlags:[`ai-bots-migration-opt-out`,`ai-bots-protection`,`ai-search`,`ai-training`,`ai-user`,`bot-preference-sync-enabled`,`cf-robots-variant`,`content-bots-protection`,`crawler-protection`,`enable-js`,`is-robots-txt-managed`,`jsd-api-results-enabled`,`fight-mode`,`stale-zone-configuration-optimize-wordpress`,`stale-zone-configuration-suppress-session-score`,`stale-zone-configuration-fight-mode`,`optimize-wordpress`,`sbfm-definitely-automated`,`sbfm-static-resource-protection`,`sbfm-verified-bots`,`sbfm-likely-automated`,`auto-update-model`,`bm-cookie-enabled`,`suppress-session-score`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({ai_bots_migration_opt_out:e[`ai-bots-migration-opt-out`],ai_bots_protection:e[`ai-bots-protection`],ai_search:e[`ai-search`],ai_training:e[`ai-training`],ai_user:e[`ai-user`],bot_preference_sync_enabled:e[`bot-preference-sync-enabled`],cf_robots_variant:e[`cf-robots-variant`],content_bots_protection:e[`content-bots-protection`],crawler_protection:e[`crawler-protection`],enable_js:e[`enable-js`],is_robots_txt_managed:e[`is-robots-txt-managed`],jsd_api_results_enabled:e[`jsd-api-results-enabled`],fight_mode:e[`fight-mode`],stale_zone_configuration:{optimize_wordpress:e[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:u(e[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:u(e[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:u(e[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:u(e[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:e[`stale-zone-configuration-suppress-session-score`],fight_mode:e[`stale-zone-configuration-fight-mode`]},optimize_wordpress:e[`optimize-wordpress`],sbfm_definitely_automated:e[`sbfm-definitely-automated`],sbfm_static_resource_protection:e[`sbfm-static-resource-protection`],sbfm_verified_bots:e[`sbfm-verified-bots`],sbfm_likely_automated:e[`sbfm-likely-automated`],auto_update_model:e[`auto-update-model`],bm_cookie_enabled:e[`bm-cookie-enabled`],suppress_session_score:e[`suppress-session-score`]}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(C,{body:t,zone_id:c}));r(n,{successLabel:`Updated`});return}let d=l({ai_bots_migration_opt_out:e[`ai-bots-migration-opt-out`],ai_bots_protection:e[`ai-bots-protection`],ai_search:e[`ai-search`],ai_training:e[`ai-training`],ai_user:e[`ai-user`],bot_preference_sync_enabled:e[`bot-preference-sync-enabled`],cf_robots_variant:e[`cf-robots-variant`],content_bots_protection:e[`content-bots-protection`],crawler_protection:e[`crawler-protection`],enable_js:e[`enable-js`],is_robots_txt_managed:e[`is-robots-txt-managed`],jsd_api_results_enabled:e[`jsd-api-results-enabled`],fight_mode:e[`fight-mode`],stale_zone_configuration:{optimize_wordpress:e[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:u(e[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:u(e[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:u(e[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:u(e[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:e[`stale-zone-configuration-suppress-session-score`],fight_mode:e[`stale-zone-configuration-fight-mode`]},optimize_wordpress:e[`optimize-wordpress`],sbfm_definitely_automated:e[`sbfm-definitely-automated`],sbfm_static_resource_protection:e[`sbfm-static-resource-protection`],sbfm_verified_bots:e[`sbfm-verified-bots`],sbfm_likely_automated:e[`sbfm-likely-automated`],auto_update_model:e[`auto-update-model`],bm_cookie_enabled:e[`bm-cookie-enabled`],suppress_session_score:e[`suppress-session-score`]}),f=await a(`Updating`,async()=>o.send(C,{body:d,zone_id:c}));r(f,{successLabel:`Updated`})})},E={command:`bot-management`,describe:`bot-management`,builder:e=>e.command(S).command(T).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{E as default};
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-DJF_Rs5S.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/matches`,query:[`offset`,`limit`,`query_id`,`download`,`orderBy`,`order`]};function _(e){return e.usage(`$0 brand-protection logo-matches get
3
-
4
- Get paginated list of logo matches for a specific brand protection logo query`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`download`,{type:`string`,description:`Download`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'`,choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`List logo matches`,builder:_,handler:async e=>c({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],download:e.download,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},y={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries`,body:`json`};function x(e){return e.usage(`$0 brand-protection logos create
5
-
6
- Create a new saved brand protection logo query for visual similarity matching`).option(`image-data`,{type:`string`,description:`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`}).option(`search-lookback`,{type:`boolean`,description:`If true, search historic scanned images for matches above the similarity threshold`,default:!0}).option(`similarity-threshold`,{type:`number`,description:`Minimum similarity score (0-1) required for visual matches`}).option(`tag`,{type:`string`,description:`Unique identifier for the logo query`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`create`,describe:`Insert logo query`,builder:x,handler:async e=>c({command:`brand-protection logos create`,classification:{safeFlags:[`search-lookback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({image_data:f(e[`image-data`],`image-data`,`text`),search_lookback:e[`search-lookback`],similarity_threshold:e[`similarity-threshold`],tag:f(e.tag,`tag`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(b,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`image-data`]===void 0&&(e[`image-data`]=await p(`image-data`,`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`)),e[`similarity-threshold`]===void 0)throw Error(`--similarity-threshold is required (or pass --body with this field set).`);e.tag===void 0&&(e.tag=await p(`tag`,`Unique identifier for the logo query`));let m=d({image_data:f(e[`image-data`],`image-data`,`text`),search_lookback:e[`search-lookback`],similarity_threshold:e[`similarity-threshold`],tag:f(e.tag,`tag`,`text`)}),h=await s(`Creating`,async()=>c.send(b,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries/${t.query_id}`};function w(e){return e.usage(`$0 brand-protection logos delete <query-id>
7
-
8
- Delete a saved brand protection logo query. Returns 404 if the query ID doesn't exist.`).positional(`query-id`,{type:`string`,description:`Query 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 T={command:`delete <query-id>`,describe:`Delete logo query`,builder:w,handler:async e=>c({command:`brand-protection logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(C,{account_id:l,query_id:e[`query-id`]}));a(u,{successLabel:`Deleted`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries`,query:[`id`,`download`]};function D(e){return e.usage(`$0 brand-protection logos get
9
-
10
- Get all saved brand protection logo queries for an account. Optionally specify id to get a single query. Set download=true to include base64-encoded image data.`).option(`id`,{type:`string`,description:`Optional query ID to retrieve a specific logo query`}).option(`download`,{type:`string`,description:`If true, include base64-encoded image data in the response`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get logo queries`,builder:D,handler:async e=>c({command:`brand-protection logos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,download:e.download};if(e.dryRun){let e=await r();o({command:`cf brand-protection logos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(E,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},k={command:`logos`,describe:`Operations for logos`,builder:e=>e.command(S).command(T).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`,body:`json`};function j(e){return e.usage(`$0 brand-protection matches bulk-dismiss
11
-
12
- Dismiss or undismiss multiple matches in a single request. Accepts either the new format (matches: [{query_id, domain_id}]) for per-query control, or the legacy format (match_ids: [number]) which dismisses for all queries sharing each match's hash. Returns per-item success/error results.`).option(`action`,{type:`string`,description:`The action field`,choices:[`dismiss`,`undismiss`]}).coerce(`action`,e=>f(e,`action`,`text`)).option(`match-ids`,{type:`string`,array:!0,description:`The match_ids field`}).option(`matches`,{type:`string`,description:`The matches 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 M={command:`bulk-dismiss`,describe:`Bulk dismiss or undismiss matches`,builder:j,handler:async e=>c({command:`brand-protection matches bulk-dismiss`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection matches bulk-dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({action:e.action,match_ids:e[`match-ids`],matches:l(e.matches,`matches`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(A,{body:t,account_id:f}));a(n,{successLabel:`Created`});return}e.action===void 0&&(e.action=await m(`action`,`The action field`,[`dismiss`,`undismiss`]));let p=d({action:e.action,match_ids:e[`match-ids`],matches:l(e.matches,`matches`)}),h=await s(`Creating`,async()=>c.send(A,{body:p,account_id:f}));a(h,{successLabel:`Created`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/matches`,query:[`offset`,`limit`,`query_id`,`include_domain_id`,`include_dismissed`,`domain_search`,`orderBy`,`order`]};function P(e){return e.usage(`$0 brand-protection matches get
13
-
14
- Get paginated list of domain matches for one or more brand protection queries. When multiple query_ids are provided (comma-separated), matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and individual dismissed state.`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,array:!0,description:`Query ID or comma-separated list of Query IDs. When multiple IDs are provided, matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and dismissed state.`,demandOption:!0}).option(`include-domain-id`,{type:`string`,description:`Include domain ID`}).option(`include-dismissed`,{type:`string`,description:`Include dismissed`}).option(`domain-search`,{type:`string`,description:`Filter matches by domain name (substring match)`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'domain', 'first_seen', or 'registrar'`,choices:[`domain`,`first_seen`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get`,describe:`List saved query matches`,builder:P,handler:async e=>c({command:`brand-protection matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],include_domain_id:e[`include-domain-id`],include_dismissed:e[`include-dismissed`],domain_search:e[`domain-search`],orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(N,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},I={command:`matches`,describe:`Operations for matches`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/queries/${t.query_id}/matches/${t.domain_id}/dismiss`};function ee(e){return e.usage(`$0 brand-protection queries dismiss <domain-id>
15
-
16
- Mark a specific domain as dismissed for a given query. Dismissals are per-query — dismissing a domain in one query does not affect other queries.`).positional(`domain-id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`dismiss <domain-id>`,describe:`Dismiss a match`,builder:ee,handler:async e=>c({command:`brand-protection queries dismiss`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection queries dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}/matches/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}/dismiss`,pathParams:{"query-id":String(e[`query-id`]??``),"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(L,{account_id:l,query_id:e[`query-id`],domain_id:e[`domain-id`]}));a(u,{successLabel:`Created`})})};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/queries`,query:[`id`,`page`,`per_page`]};function B(e){return e.usage(`$0 brand-protection queries get
17
-
18
- Get all saved brand protection queries for an account`).option(`id`,{type:`string`,description:`ID`}).option(`page`,{type:`number`,description:`Optional page number for paginated list requests. Defaults to 1 when only per_page is supplied. Omit page and per_page to preserve the legacy full-list response.`}).option(`per-page`,{type:`number`,description:`Optional number of queries per page for paginated list requests. Defaults to 100 when only page is supplied. Maximum 100. Omit page and per_page to preserve the legacy full-list response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get`,describe:`Get queries`,builder:B,handler:async e=>c({command:`brand-protection queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf brand-protection queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/queries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(z,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/queries/${t.query_id}/matches/${t.domain_id}/undismiss`};function U(e){return e.usage(`$0 brand-protection queries undismiss <domain-id>
19
-
20
- Remove the dismissed status from a specific domain for a given query. Undismissals are per-query — undismissing a domain in one query does not affect other queries.`).positional(`domain-id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`undismiss <domain-id>`,describe:`Undismiss a match`,builder:U,handler:async e=>c({command:`brand-protection queries undismiss`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection queries undismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}/matches/${e[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(e[`domain-id`]))}/undismiss`,pathParams:{"query-id":String(e[`query-id`]??``),"domain-id":String(e[`domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(H,{account_id:l,query_id:e[`query-id`],domain_id:e[`domain-id`]}));a(u,{successLabel:`Created`})})},G={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(R).command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/search`,query:[`showHistoric`,`download`],body:`json`};function q(e){return e.usage(`$0 brand-protection submit
21
-
22
- Submit an image and find the n closest matches from the scanned images index without creating any match records. Returns similarity scores and metadata for each match.`).option(`show-historic`,{type:`string`,description:`Include scanned images without domain metadata (historic data). Default: false (only show images with domain)`}).option(`download`,{type:`string`,description:`If true, include base64-encoded image data in the response`}).option(`image-data`,{type:`string`,description:`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`}).option(`score-threshold`,{type:`number`,description:`Minimum similarity score threshold for matches (0-1, default: 0)`,default:0}).option(`top-k`,{type:`number`,description:`Number of closest matches to return (1-100, default: 10)`,default:10}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`submit`,describe:`Search scanned images`,builder:q,handler:async e=>c({command:`brand-protection submit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={showHistoric:e[`show-historic`],download:e.download};if(e.dryRun){let t=await r();o({command:`cf brand-protection submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/search`,pathParams:{},query:c,bodyKind:`json`,body:e.body===void 0?d({image_data:f(e[`image-data`],`image-data`,`text`),score_threshold:e[`score-threshold`],top_k:e[`top-k`]}):u(e.body)});return}let l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>l.send(K,{body:t,account_id:m,...c}));a(n,{successLabel:`Created`});return}e[`image-data`]===void 0&&(e[`image-data`]=await p(`image-data`,`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`));let h=d({image_data:f(e[`image-data`],`image-data`,`text`),score_threshold:e[`score-threshold`],top_k:e[`top-k`]});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await s(`Creating`,async()=>l.send(K,{body:h,account_id:m,...c}));a(g,{successLabel:`Created`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/domain/trial`,body:`json`,errors:{403:`ForbiddenError`,502:`BadGatewayError`,503:`ServiceUnavailableError`}};function X(e){return e.usage(`$0 brand-protection trial create
23
-
24
- Uses AI to scan all domains in the lookback table and identify potential phishing or impersonation attempts against the given brand string.`).option(`brand`,{type:`string`,description:`The brand field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Analyze domains for brand impersonation`,builder:X,handler:async e=>c({command:`brand-protection trial create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf brand-protection trial create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/trial`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({brand:f(e.brand,`brand`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Y,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.brand===void 0&&(e.brand=await p(`brand`,`The brand field`));let m=d({brand:f(e.brand,`brand`,`text`)}),h=await s(`Creating`,async()=>c.send(Y,{body:m,account_id:l}));a(h,{successLabel:`Created`})})},Q={command:`trial`,describe:`Operations for trial`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/total-queries`};function te(e){return e.usage(`$0 brand-protection url-info
25
-
26
- Get the total number of saved brand protection queries (domain + logo) for an account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`url-info`,describe:`Get total queries`,builder:te,handler:async e=>c({command:`brand-protection url-info`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf brand-protection url-info`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/total-queries`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send($,{account_id:l}));a(u,{successLabel:`Loaded`})})},re={command:`brand-protection`,describe:`brand-protection`,builder:e=>e.command(J).command(ne).command(y).command(k).command(I).command(G).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{re as default};