cf 1.0.0-beta.27 → 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 (267) hide show
  1. package/dist/_meta/commands.json +5787 -1914
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +796 -557
  4. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
  5. package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
  7. package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
  14. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-LoBB1OO_.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-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
  28. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
  33. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
  34. package/dist/{botnet-feed-DCYB5kYZ.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-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
  44. package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
  49. package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/containers-B06OGOEB.mjs +380 -0
  70. package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
  76. package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
  77. package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
  79. package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
  80. package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
  91. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
  92. package/dist/{docs-BA7qslb2.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-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
  97. package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
  98. package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
  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-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
  105. package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  109. package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  110. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  111. package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
  112. package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
  115. package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
  116. package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
  117. package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
  118. package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
  119. package/dist/k2-CZT2Pd5J.mjs +10 -0
  120. package/dist/kv-Ipa7dnvF.mjs +12 -0
  121. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  122. package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  123. package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
  124. package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
  125. package/dist/local-D5Vq6ooZ.mjs +2 -0
  126. package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
  127. package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  128. package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
  129. package/dist/login-DRJugxya.mjs +2 -0
  130. package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
  131. package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
  132. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  133. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  134. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  135. package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  136. package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
  137. package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  138. package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
  139. package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
  140. package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
  141. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  142. package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
  143. package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  144. package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
  145. package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
  146. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  147. package/dist/organizations-DbeeWUL4.mjs +71 -0
  148. package/dist/output-BZQEl3mK.mjs +2 -0
  149. package/dist/package-B7RgwuFR.mjs +2 -0
  150. package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
  151. package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
  152. package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  153. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
  154. package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  155. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
  156. package/dist/previews-DEVNSip2.mjs +6 -0
  157. package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
  158. package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  159. package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
  160. package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
  161. package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
  162. package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  163. package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
  164. package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
  165. package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
  166. package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  167. package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  168. package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  169. package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  170. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  171. package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
  172. package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
  173. package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
  174. package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
  175. package/dist/run-DBqOjD1P.mjs +2 -0
  176. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  177. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  178. package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
  179. package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
  180. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  181. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
  182. package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
  183. package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
  184. package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
  185. package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
  186. package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  187. package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
  188. package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
  189. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
  190. package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
  191. package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
  192. package/dist/src-BoSDeQ9m.mjs +133 -0
  193. package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  194. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  195. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  196. package/dist/state-DW3QZtfh.mjs +2 -0
  197. package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
  198. package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
  199. package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
  200. package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  201. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  202. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
  203. package/dist/tenants-DD-GMq0K.mjs +13 -0
  204. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  205. package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
  206. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  207. package/dist/ui-xjCox-gU.mjs +2 -0
  208. package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
  209. package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
  210. package/dist/update-check-worker.mjs +1 -1
  211. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  212. package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  213. package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
  214. package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
  215. package/dist/verify-B9ILCohg.mjs +2 -0
  216. package/dist/verify-BCuWaO-L.mjs +2 -0
  217. package/dist/version-6Bpy6Bgt.mjs +2 -0
  218. package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
  219. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  220. package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
  221. package/dist/workers-BnLiOjZf.mjs +39 -0
  222. package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  223. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  224. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
  225. package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  226. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
  227. package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
  228. package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
  229. package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
  230. package/package.json +14 -14
  231. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  232. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  233. package/dist/api-X3wKppsT.mjs +0 -3
  234. package/dist/argo-D1VONzu-.mjs +0 -14
  235. package/dist/auth-CspwoBlp.mjs +0 -2
  236. package/dist/auth-FK2eLQ02.mjs +0 -2
  237. package/dist/billing-DRNww0iC.mjs +0 -24
  238. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  239. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  240. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  241. package/dist/build-CRm2TQq8.mjs +0 -2
  242. package/dist/build-DO_GNhRl.mjs +0 -2
  243. package/dist/cache-jlLJLSu7.mjs +0 -36
  244. package/dist/containers-DINLx5_i.mjs +0 -380
  245. package/dist/create-BtmuVqVL.mjs +0 -2
  246. package/dist/error-sanitization-B025CygB.mjs +0 -2
  247. package/dist/get-Be821dio.mjs +0 -2
  248. package/dist/k2-wsanPL3y.mjs +0 -10
  249. package/dist/kv-BLSPcEnH.mjs +0 -12
  250. package/dist/local-CFsO9Tkg.mjs +0 -2
  251. package/dist/login-BfuOf-Yi.mjs +0 -2
  252. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  253. package/dist/organization-CEnlXwrl.mjs +0 -70
  254. package/dist/organizations-Dt86ToxE.mjs +0 -4
  255. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  256. package/dist/output-BJEgbI0G.mjs +0 -2
  257. package/dist/package-CiRJBRHO.mjs +0 -2
  258. package/dist/previews-DzJ85fsr.mjs +0 -6
  259. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  260. package/dist/run-DD45EQTm.mjs +0 -2
  261. package/dist/src-DPnUfK4c.mjs +0 -131
  262. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  263. package/dist/state-Uwfrmw5I.mjs +0 -2
  264. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  265. package/dist/ui-FYultowZ.mjs +0 -2
  266. package/dist/version-Zr2oF8mY.mjs +0 -2
  267. package/dist/workers-B3uJqJKc.mjs +0 -39
@@ -1,14 +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-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{i as p}from"./prompt-D0dXwuME.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/argo/count_zones_enabled`};function h(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-account
3
-
4
- Returns the number of zones that have Argo Smart Routing enabled for the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`count-zones-enabled-for-account`,describe:`Get count of zones with Argo Smart Routing enabled for account`,builder:h,handler:async e=>l({command:`argo smart-routing count-zones-enabled-for-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf argo smart-routing count-zones-enabled-for-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/argo/count_zones_enabled`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(m,{account_id:l}));o(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:()=>`/user/argo/count_zones_enabled`};function v(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-user
5
-
6
- Returns the number of zones that have Argo Smart Routing enabled for the authenticated user.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`count-zones-enabled-for-user`,describe:`Get count of zones with Argo Smart Routing enabled for user`,builder:v,handler:async e=>l({command:`argo smart-routing count-zones-enabled-for-user`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf argo smart-routing count-zones-enabled-for-user`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/argo/count_zones_enabled`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=await c(`Loading`,async()=>t.send(_));o(r,{successLabel:`Loaded`})})};var b={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/argo/smart_routing`,body:`json`};function x(e){return e.usage(`$0 argo smart-routing edit
7
-
8
- Configures the value of the Argo Smart Routing enablement setting.`).option(`value`,{type:`string`,description:`Specifies the enablement value of Argo Smart Routing.`,choices:[`on`,`off`]}).coerce(`value`,e=>f(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configures the enablement of Argo Smart Routing.`})}const S={command:`edit`,describe:`Patch Argo Smart Routing setting`,builder:x,handler:async e=>l({command:`argo smart-routing edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf argo smart-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({value:e.value}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.send(b,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await p(`value`,`Specifies the enablement value of Argo Smart Routing.`,[`on`,`off`]));let a=d({value:e.value}),l=await c(`Updating`,async()=>t.send(b,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/zones/${t.zone_id}/argo/smart_routing`};function w(e){return e.usage(`$0 argo smart-routing get
9
-
10
- Retrieves the value of Argo Smart Routing enablement setting.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get`,describe:`Get Argo Smart Routing setting`,builder:w,handler:async e=>l({command:`argo smart-routing get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf argo smart-routing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(C,{zone_id:r}));o(a,{successLabel:`Loaded`})})},E={command:`smart-routing`,describe:`Route traffic through the fastest network paths to your origin using real-time latency data`,builder:e=>e.command(g).command(y).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/argo/tiered_caching`,body:`json`};function O(e){return e.usage(`$0 argo tiered-caching edit
11
-
12
- Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of lower-tiers and upper-tiers. If content is not cached in lower-tier data centers (generally the ones closest to a visitor), the lower-tier must ask an upper-tier to see if it has the content. If the upper-tier does not have the content, only the upper-tier can ask the origin for content. This practice improves bandwidth efficiency by limiting the number of data centers that can ask the origin for content, which reduces origin load and makes websites more cost-effective to operate. Additionally, Tiered Cache concentrates connections to origin servers so they come from a small number of data centers rather than the full set of network locations. This results in fewer open connections using server resources.`).option(`value`,{type:`string`,description:`Enables Tiered Caching.`,choices:[`on`,`off`]}).coerce(`value`,e=>f(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Tiered Caching.`})}const k={command:`edit`,describe:`Patch Tiered Caching setting`,builder:O,handler:async e=>l({command:`argo tiered-caching edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf argo tiered-caching edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/tiered_caching`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({value:e.value}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.send(D,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await p(`value`,`Enables Tiered Caching.`,[`on`,`off`]));let a=d({value:e.value}),l=await c(`Updating`,async()=>t.send(D,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})};var A={method:`GET`,path:t=>e`/zones/${t.zone_id}/argo/tiered_caching`};function j(e){return e.usage(`$0 argo tiered-caching get
13
-
14
- Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of lower-tiers and upper-tiers. If content is not cached in lower-tier data centers (generally the ones closest to a visitor), the lower-tier must ask an upper-tier to see if it has the content. If the upper-tier does not have the content, only the upper-tier can ask the origin for content. This practice improves bandwidth efficiency by limiting the number of data centers that can ask the origin for content, which reduces origin load and makes websites more cost-effective to operate. Additionally, Tiered Cache concentrates connections to origin servers so they come from a small number of data centers rather than the full set of network locations. This results in fewer open connections using server resources.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get`,describe:`Get Tiered Caching setting`,builder:j,handler:async e=>l({command:`argo tiered-caching get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf argo tiered-caching get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/tiered_caching`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(A,{zone_id:r}));o(a,{successLabel:`Loaded`})})},N={command:`tiered-caching`,describe:`Reduce origin load by having upper-tier data centers serve cache misses before reaching your origin`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`argo`,describe:`Network optimization features that speed up and improve reliability of traffic to your origins`,builder:e=>e.command(E).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export{t as createCloudflareClientWithToken,n as createCommandClient}from"./auth-FK2eLQ02.mjs";import"./context-Dp4CXG22.mjs";import"./oauth-BmSFLp_s.mjs";import"./auth-token-BwpERbnG.mjs";
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{K as e}from"./dist-D5qkmHhC.mjs";import{n as t,t as n}from"./api-X3wKppsT.mjs";import{a as r,n as i}from"./context-Dp4CXG22.mjs";import{l as a}from"./oauth-BmSFLp_s.mjs";import{t as o}from"./auth-token-BwpERbnG.mjs";import{n as s}from"./request-headers-CoxHUNcB.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-CFsO9Tkg.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,24 +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-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D0dXwuME.mjs";var v={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function y(e){return e.usage(`$0 billing addresses validate
3
-
4
- Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`validate`,describe:`Validate Billing Address`,builder:y,handler:async e=>l({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),city:m(e.city,`city`,`text`),country:m(e.country,`country`,`text`),state:m(e.state,`state`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let t=await r(e);if(e.body){let n=d(e.body),r=await c(`Validating`,async()=>t.send(v,{body:n}));o(r,{successLabel:`Validated`});return}let n=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),city:m(e.city,`city`,`text`),country:m(e.country,`country`,`text`),state:m(e.state,`state`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),i=await c(`Validating`,async()=>t.send(v,{body:n}));o(i,{successLabel:`Validated`})})},b={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile/payment-method`};function S(e){return e.usage(`$0 billing profiles create-payment-intent
5
-
6
- Creates a Stripe payment intent for adding or updating a payment method on the account's billing profile. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`create-payment-intent`,describe:`Create Payment Intent for Billing Profile`,builder:S,handler:async e=>l({command:`billing profiles create-payment-intent`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles create-payment-intent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile/payment-method`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(x,{account_id:l}));o(u,{successLabel:`Created`})})};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function w(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 T={command:`create`,describe:`Create Billing Profile`,builder:w,handler:async e=>l({command:`billing profiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(C,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),f=await c(`Creating`,async()=>n.send(C,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/billing/profile`,response:!1};function D(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 O={command:`delete`,describe:`Delete Billing Profile`,builder:D,handler:async e=>l({command:`billing profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(E,{account_id:l}));o(u,{successLabel:`Deleted`})})};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/profile`};function A(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 j={command:`get`,describe:`Get Billing Profile`,builder:A,handler:async e=>l({command:`billing profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(k,{account_id:l}));o(u,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function N(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 P={command:`update-email`,describe:`Update Billing Email`,builder:N,handler:async e=>l({command:`billing profiles update-email`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles update-email`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({billing_email:m(e[`billing-email`],`billing-email`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(M,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=p({billing_email:m(e[`billing-email`],`billing-email`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}),f=await c(`Updating`,async()=>n.send(M,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})};var F={method:`PUT`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function I(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 L={command:`update`,describe:`Update Billing Profile`,builder:I,handler:async e=>l({command:`billing profiles update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(F,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),f=await c(`Updating`,async()=>n.send(F,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})},R={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(T).command(te).command(O).command(j).command(L).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`GET`,path:t=>e`/billing/rate_plans/${t.public_key}`};function B(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 V={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:B,handler:async e=>l({command:`billing rate-plans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf billing rate-plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/billing/rate_plans/${e[`public-key`]==null?`<public-key>`:encodeURIComponent(String(e[`public-key`]))}`,pathParams:{"public-key":String(e[`public-key`]??``)},bodyKind:`none`});return}let t=await r(e),n=await c(`Loading`,async()=>t.send(z,{public_key:e[`public-key`]}));o(n,{successLabel:`Loaded`})})},H={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/activity`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function W(e){return e.usage(`$0 billing spend-policies activity list
19
-
20
- Returns configuration history from immutable policy revisions for the account, including deleted policies. Entries contain before/after values and verified actor attribution. Pages use descending revision IDs, not event or commit order; refresh the first page for new entries. This cursor is not an incremental consumer checkpoint.`).option(`limit`,{type:`number`,description:`Maximum number of audit entries to return. Defaults to 50. Values above 100 are capped at 100 rather than rejected.`}).option(`cursor`,{type:`string`,description:`Opaque token from the preceding response's result_info.cursor. Pass it unchanged to retrieve older entries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List Spend Policy Activity`,builder:W,handler:async e=>l({command:`billing spend-policies activity list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf billing spend-policies activity list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies/activity`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(U,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},K={command:`activity`,describe:`Operations for spend-policies.activity`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}/audit`,query:[`limit`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function J(e){return e.usage("$0 billing spend-policies audit list\n\nReturns the policy's evaluation history, newest first. At most one entry is recorded per trigger (`approaching_limit` or `limit_reached`), policy version and billing period, so a policy update can record a new entry without any change in balance. Disabled policies still return their history; deleted policies return `404`. There is no pagination: use `limit` to set how many entries come back.").option(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of audit entries to return. Defaults to 50. Values above 100 are capped at 100 rather than rejected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List Spend Policy Audit Entries`,builder:J,handler:async e=>l({command:`billing spend-policies audit list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit};if(e.dryRun){let t=await i();s({command:`cf billing spend-policies audit list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/audit`,pathParams:{"policy-id":String(e[`policy-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(q,{account_id:u,policy_id:e[`policy-id`],...n}));o(d,{successLabel:`Loaded`})})},X={command:`audit`,describe:`Operations for spend-policies.audit`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function ne(e){return e.usage("$0 billing spend-policies create\n\nCreates a spend policy. Each account can have only one enabled `usage_block` policy per product. A second one returns `409`. There is no limit on `notification` policies.").option(`action`,{type:`string`,description:"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",choices:[`notification`,`usage_block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`enabled`,{type:`boolean`,description:`Whether the policy is evaluated.`}).option(`name`,{type:`string`,description:`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`}).option(`notification-email`,{type:`string`,description:"Email address that receives notifications. Required when `action` is `notification`. When set, it must be a bare address (`user@example.com`); display-name forms such as `Name <user@example.com>` are rejected."}).option(`product-id`,{type:`string`,description:"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",choices:[`workers`,`durable_objects`]}).coerce(`product-id`,e=>m(e,`product-id`,`text`)).option(`threshold-cents`,{type:`number`,description:`The spend threshold for the current billing period, in US cents. Must be greater than zero.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A spend policy as sent on create and on full replacement. Unknown fields and trailing JSON are rejected. Only the first 1 MiB of the body is read.`})}const re={command:`create`,describe:`Create Spend Policy`,builder:ne,handler:async e=>l({command:`billing spend-policies create`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing spend-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`action`,"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",[`notification`,`usage_block`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`)),e[`product-id`]===void 0&&(e[`product-id`]=await g(`product-id`,"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",[`workers`,`durable_objects`])),e[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let u=p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}),f=await c(`Creating`,async()=>n.send(Z,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function ie(e){return e.usage("$0 billing spend-policies delete <policy-id>\n\nSoft-deletes the spend policy. The policy is disabled and no longer appears in list, get or audit responses. The `If-Match` header must equal the policy's current `version`.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`if-match`,{type:`string`,description:'The policy `version` the change is based on, as returned in `ETag`. Quoted (`"3"`) and bare (`3`) values are both accepted. Weak ETags (`W/"3"`) and `*` are not.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ae={command:`delete <policy-id>`,describe:`Delete Spend Policy`,builder:ie,handler:async e=>l({command:`billing spend-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`if-match`]!==void 0&&(l[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=await i();s({command:`cf billing spend-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await _({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function se(e){return e.usage("$0 billing spend-policies get <policy-id>\n\nReturns one spend policy. The `ETag` response header holds the current `version`; send it as `If-Match` on a later update or delete.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <policy-id>`,describe:`Get Spend Policy`,builder:se,handler:async e=>l({command:`billing spend-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing spend-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(oe,{account_id:l,policy_id:e[`policy-id`]}));o(u,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function ue(e){return e.usage("$0 billing spend-policies list\n\nReturns every spend policy on the account that has not been deleted, including disabled ones. Results are sorted by `name`, then `id`. There is no pagination.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List Spend Policies`,builder:ue,handler:async e=>l({command:`billing spend-policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing spend-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(le,{account_id:l}));o(u,{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 billing spend-policies update <policy-id>\n\nReplaces the whole spend policy. Every field is required, as on create; there are no partial updates and `PATCH` is not supported. The `If-Match` header must equal the policy's current `version`. On success, `version` goes up by one and the new value is returned in `ETag`.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`if-match`,{type:`string`,description:'The policy `version` the change is based on, as returned in `ETag`. Quoted (`"3"`) and bare (`3`) values are both accepted. Weak ETags (`W/"3"`) and `*` are not.',demandOption:!0}).option(`action`,{type:`string`,description:"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",choices:[`notification`,`usage_block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`enabled`,{type:`boolean`,description:`Whether the policy is evaluated.`}).option(`name`,{type:`string`,description:`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`}).option(`notification-email`,{type:`string`,description:"Email address that receives notifications. Required when `action` is `notification`. When set, it must be a bare address (`user@example.com`); display-name forms such as `Name <user@example.com>` are rejected."}).option(`product-id`,{type:`string`,description:"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",choices:[`workers`,`durable_objects`]}).coerce(`product-id`,e=>m(e,`product-id`,`text`)).option(`threshold-cents`,{type:`number`,description:`The spend threshold for the current billing period, in US cents. Must be greater than zero.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A spend policy as sent on create and on full replacement. Unknown fields and trailing JSON are rejected. Only the first 1 MiB of the body is read.`})}const pe={command:`update <policy-id>`,describe:`Update Spend Policy`,builder:fe,handler:async e=>l({command:`billing spend-policies update`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{let l={};if(e[`if-match`]!==void 0&&(l[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=await i();s({command:`cf billing spend-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):d(e.body)});return}let u=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${_}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.action===void 0&&(e.action=await g(`action`,"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",[`notification`,`usage_block`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`)),e[`product-id`]===void 0&&(e[`product-id`]=await g(`product-id`,"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",[`workers`,`durable_objects`])),e[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let v={};e.action!==void 0&&f(v,[`action`],e.action),e.enabled!==void 0&&f(v,[`enabled`],e.enabled),e.name!==void 0&&f(v,[`name`],m(e.name,`name`,`text`)),e[`notification-email`]!==void 0&&f(v,[`notification_email`],m(e[`notification-email`],`notification-email`,`text`)),e[`product-id`]!==void 0&&f(v,[`product_id`],e[`product-id`]),e[`threshold-cents`]!==void 0&&f(v,[`threshold_cents`],e[`threshold-cents`]);let y=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${_}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},me={command:`spend-policies`,describe:`Operations for spend-policies`,builder:e=>e.command(re).command(ae).command(ce).command(de).command(pe).command(K).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage/billable-metrics`,query:[`from`,`to`]};function ge(e){return e.usage("$0 billing usage get-account-billable-metrics\n\nLists billable metrics available to the account through contracts and subscriptions that overlap the requested period. Results are deduplicated and ordered. If no qualifying contract exists, the result is an empty array. When `from` and `to` are omitted, the period defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get-account-billable-metrics`,describe:`List Account Billable Metrics (Version 2, Alpha, Restricted)`,builder:ge,handler:async e=>l({command:`billing usage get-account-billable-metrics`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-account-billable-metrics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage/billable-metrics`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(he,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage`,query:[`from`,`to`]};function ye(e){return e.usage("$0 billing usage get-account-usage-v2\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. To retrieve rated costs, use `POST` on the same path with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get-account-usage-v2`,describe:`Get Account Usage (Version 2, Alpha, Restricted)`,builder:ye,handler:async e=>l({command:`billing usage get-account-usage-v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-account-usage-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ve,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage/info`};function Q(e){return e.usage(`$0 billing usage get-info-v1
21
-
22
- Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-info-v1`,describe:`Get Account Billable Usage Info (Version 1, Alpha)`,builder:Q,handler:async e=>l({command:`billing usage get-info-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing usage get-info-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage/info`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(xe,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage`,query:[`from`,`to`]};function we(e){return e.usage(`$0 billing usage get-v1
23
-
24
- Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-v1`,describe:`Get Account Billable Usage (Version 1, Alpha)`,builder:we,handler:async e=>l({command:`billing usage get-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ce,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/billable/usage`,body:`json`};function Ee(e){return e.usage("$0 billing usage query\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. This is the filterable counterpart to `GET` on the same path. It is a read-only operation and requires only the `#billing:read` permission; `POST` is used so that filter criteria can be supplied in a request body rather than in the query string. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** Cost and pricing fields are populated only when `Metric` is `cost`; otherwise they are absent from responses. The request body is optional. When it is omitted, or when `TimePeriod` is omitted, the range defaults to the start of the current month through today. The maximum date range is 31 days. Filters of different kinds are combined with AND. Values within one tag filter are combined with OR. Filter values that do not match usage produce an empty result set. Results can be grouped by up to two groups, in any combination of dimension keys and resource-tag keys. Tag groups are returned in the `Tags` field. Usage without a requested tag remains in an untagged group, with that key omitted from `Tags`. Requests that use tag filtering or tag grouping return HTTP 400 when the underlying usage data source does not support tags. Requests that use dimension grouping return HTTP 400 when the underlying usage data source does not support dimensions.").option(`filter-by-billable-metric-ids`,{type:`string`,array:!0,description:"Restrict results to rows whose `x_BillableMetricId` matches one of these billable metric ids (e.g. `workers_standard_requests`). Values must be unique."}).option(`filter-by-product-family-ids`,{type:`string`,array:!0,description:`Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs.`}).option(`filter-by-tags`,{type:`string`,description:`Restrict results by resource tags. Filters for different keys are combined with AND, while values within one filter are combined with OR. Keys must be unique and are case-sensitive. Provide as a JSON array of objects or @path/to/file.json.`}).option(`group-by`,{type:`string`,description:`Grouping definitions used to split result rows. At most two unique keys may be supplied. Provide as a JSON array of objects or @path/to/file.json.`}).option(`metric`,{type:`string`,description:"Type of cost/usage records to retrieve. `usage` returns unrated usage quantities. `cost` returns rated usage with cost and pricing fields; it is available only on `POST` account usage and only when the underlying usage data source is ClickHouse (other sources return an empty result set). Requests that combine `cost` with `GroupBy` or `FilterBy.Tags` return HTTP 400. Unrelated to `FilterBy.BillableMetricIds`. Defaults to `usage` when omitted.",choices:[`usage`,`cost`],default:`usage`}).coerce(`metric`,e=>m(e,`metric`,`text`)).option(`time-period-from`,{type:`string`,description:"Start of the range (ISO 8601). Required if `To` is set."}).option(`time-period-to`,{type:`string`,description:"End of the range (ISO 8601). Required if `From` is set. Must be after `From` and no more than 31 days after it."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter criteria for a usage query. Every field is optional; an empty object is equivalent to omitting the body entirely. Unknown fields are rejected.`})}const De={command:`query`,describe:`Query Account Usage (Version 2, Alpha, Restricted)`,builder:Ee,handler:async e=>l({command:`billing usage query`,classification:{safeFlags:[`metric`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing usage query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billable/usage`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:u(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:u(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:m(e[`time-period-from`],`time-period-from`,`text`),To:m(e[`time-period-to`],`time-period-to`,`text`)}}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Loading`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Loaded`});return}let f=p({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:u(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:u(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:m(e[`time-period-from`],`time-period-from`,`text`),To:m(e[`time-period-to`],`time-period-to`,`text`)}}),h=await c(`Loading`,async()=>n.send($,{body:f,account_id:l}));o(h,{successLabel:`Loaded`})})},Oe={command:`usage`,describe:`Metered usage data for billed services — requests, bandwidth, and feature consumption`,builder:e=>e.command(_e).command(be).command(Se).command(Te).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ke={command:`billing`,describe:`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,builder:e=>e.command(b).command(R).command(H).command(me).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ke 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,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-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.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-D0dXwuME.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};