cf 1.0.0-beta.28 → 1.0.0-beta.29

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 (328) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +2240 -3181
  3. package/dist/_meta/hand-written-commands.json +38 -8
  4. package/dist/_meta/schemas.json +1683 -2505
  5. package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
  12. package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
  19. package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
  20. package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
  21. package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  22. package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  23. package/dist/auth-Czr8ChBB.mjs +2 -0
  24. package/dist/auth-DA1PHaHi.mjs +2 -0
  25. package/dist/auth-Dwfa4S3h.mjs +7 -0
  26. package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  27. package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
  28. package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  29. package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
  30. package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
  31. package/dist/body-parser-HN91kAf0.mjs +2 -0
  32. package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  33. package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  34. package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  35. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  36. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  37. package/dist/build-CCwo_ydV.mjs +2 -0
  38. package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
  39. package/dist/builds-tMa3sbQU.mjs +62 -0
  40. package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
  41. package/dist/cf-DmvZ2L51.mjs +18 -0
  42. package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  43. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  44. package/dist/cli-Cc7ujzAy.mjs +4 -0
  45. package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  46. package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  47. package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  48. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  49. package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
  50. package/dist/command-BVct0Dvr.mjs +2 -0
  51. package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
  52. package/dist/command-CJ3ldWrA.mjs +2 -0
  53. package/dist/command-CyOdBNur.mjs +2 -0
  54. package/dist/command-D2XkyO1e.mjs +2 -0
  55. package/dist/command-DHODgfFZ.mjs +2 -0
  56. package/dist/command-DIIaZx_f.mjs +2 -0
  57. package/dist/command-DONwHpqZ.mjs +2 -0
  58. package/dist/command-DdYnSf-8.mjs +2 -0
  59. package/dist/command-DqOU7Ql2.mjs +2 -0
  60. package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
  61. package/dist/command-NqM0lo4a.mjs +2 -0
  62. package/dist/command-bwVDyMv4.mjs +2 -0
  63. package/dist/command-yzqs4m83.mjs +2 -0
  64. package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
  65. package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
  66. package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  67. package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  68. package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  69. package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
  70. package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
  71. package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
  72. package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
  73. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  74. package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
  75. package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
  76. package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
  77. package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
  78. package/dist/d1-N81q-FAr.mjs +50 -0
  79. package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/deploy-Ok4ncy06.mjs +2 -0
  82. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  83. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  84. package/dist/dev-DxbkJkzc.mjs +4 -0
  85. package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  86. package/dist/dialog-CD94-Kzw.mjs +2 -0
  87. package/dist/discover-D9FNaCDK.mjs +2 -0
  88. package/dist/discover-DGsMj9ZN.mjs +2 -0
  89. package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
  90. package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
  91. package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
  92. package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  93. package/dist/docs-BFVK88kB.mjs +3 -0
  94. package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  95. package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  96. package/dist/email-auth--2KCzZNA.mjs +6 -0
  97. package/dist/email-routing-DzaExfVf.mjs +44 -0
  98. package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
  99. package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  100. package/dist/errors-C_bGcR0X.mjs +11 -0
  101. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  102. package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
  103. package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
  104. package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
  105. package/dist/generate-BzOnRBij.mjs +2 -0
  106. package/dist/generate-DfxZtpn9.mjs +2 -0
  107. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  108. package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  109. package/dist/gt-BV-jij5q.mjs +4 -0
  110. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  111. package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  112. package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
  113. package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
  114. package/dist/index.mjs +1 -1
  115. package/dist/init-BgCF9K8h.mjs +43 -0
  116. package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
  117. package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
  118. package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
  119. package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
  120. package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
  121. package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
  122. package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  123. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  124. package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
  125. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  126. package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
  127. package/dist/local-DRxctCh9.mjs +2 -0
  128. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  129. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  130. package/dist/log-DBAHla_W.mjs +2 -0
  131. package/dist/login-CK3nn9a5.mjs +2 -0
  132. package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
  133. package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
  134. package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
  135. package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
  136. package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  137. package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  138. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  139. package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
  140. package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
  141. package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  142. package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
  143. package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  144. package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
  145. package/dist/o11y-eYYs59X9.mjs +88 -0
  146. package/dist/oauth-BgDZMd72.mjs +5 -0
  147. package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
  148. package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
  149. package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
  150. package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
  151. package/dist/output-hFMAotFl.mjs +2 -0
  152. package/dist/package-oNVeacC9.mjs +2 -0
  153. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  154. package/dist/pages-5spcBpX1.mjs +48 -0
  155. package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
  156. package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  157. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  158. package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  159. package/dist/previews-Bv1HMMtO.mjs +6 -0
  160. package/dist/progress-DE_G09u2.mjs +2 -0
  161. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  162. package/dist/prompt-D274Im1O.mjs +4 -0
  163. package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
  164. package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
  165. package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
  166. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  167. package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
  168. package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
  169. package/dist/registrar-Cl1snz8z.mjs +43 -0
  170. package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
  171. package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  172. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  173. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  174. package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
  175. package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
  176. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  177. package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
  178. package/dist/run-C5yPsiO2.mjs +2 -0
  179. package/dist/run-CXWkMU3x.mjs +2 -0
  180. package/dist/schema-CfZOW8Zw.mjs +2 -0
  181. package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  182. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  183. package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
  184. package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  185. package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  186. package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  187. package/dist/session-COdP8BXD.mjs +2 -0
  188. package/dist/shared-D_2KLpP3.mjs +2 -0
  189. package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  190. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  191. package/dist/snippets-DrrdpLnS.mjs +18 -0
  192. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  193. package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  194. package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
  195. package/dist/sql-BCuLxGSf.mjs +4 -0
  196. package/dist/src-ByCoEqOw.mjs +133 -0
  197. package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
  198. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  199. package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  200. package/dist/state-B6r-b_-d.mjs +2 -0
  201. package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
  202. package/dist/static-assets-DGDoaJf1.mjs +386 -0
  203. package/dist/stream-CzlqY8hq.mjs +89 -0
  204. package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
  205. package/dist/telemetry-COlodX5Z.mjs +2 -0
  206. package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  207. package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  208. package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
  209. package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
  210. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  211. package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  212. package/dist/ui-dWsVmFCG.mjs +2 -0
  213. package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
  214. package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
  215. package/dist/update-check-worker.mjs +1 -1
  216. package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  217. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  218. package/dist/user-Bk1BIqZ5.mjs +103 -0
  219. package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
  220. package/dist/version-CcuBNjqg.mjs +2 -0
  221. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  222. package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
  223. package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
  224. package/dist/workers-BZMvamn0.mjs +39 -0
  225. package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  226. package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  227. package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
  228. package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
  229. package/dist/zaraz-BFK0p28R.mjs +22 -0
  230. package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
  231. package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
  232. package/package.json +19 -19
  233. package/dist/ai-gateway-Lj4On37s.mjs +0 -74
  234. package/dist/ai-search-BxyhS3X7.mjs +0 -74
  235. package/dist/alerting-r0G2X9y9.mjs +0 -52
  236. package/dist/analytics-C6bfqm-W.mjs +0 -17
  237. package/dist/auth-B-h0BHg7.mjs +0 -2
  238. package/dist/auth-B6tswVxH.mjs +0 -2
  239. package/dist/auth-clmqFEWU.mjs +0 -7
  240. package/dist/body-parser-DoewLePl.mjs +0 -2
  241. package/dist/brand-protection-kv1ba80i.mjs +0 -14
  242. package/dist/browser-run-D-vRoZmf.mjs +0 -40
  243. package/dist/build-BzJGqb2o.mjs +0 -2
  244. package/dist/builds-BbxINHRP.mjs +0 -64
  245. package/dist/cf-BQ_LRiut.mjs +0 -18
  246. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
  247. package/dist/cli-B7vslRfu.mjs +0 -4
  248. package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
  249. package/dist/command-AVwd7XjE.mjs +0 -2
  250. package/dist/command-B87T_f2f.mjs +0 -2
  251. package/dist/command-CEHhi3t0.mjs +0 -2
  252. package/dist/command-CYmQE79n.mjs +0 -2
  253. package/dist/command-Ce8CVLth.mjs +0 -2
  254. package/dist/command-CqDudQZs.mjs +0 -2
  255. package/dist/command-D4YcwpVp.mjs +0 -2
  256. package/dist/command-D9Qyi1B0.mjs +0 -2
  257. package/dist/command-Dl9ICrRK.mjs +0 -2
  258. package/dist/command-DtCSe8Hy.mjs +0 -2
  259. package/dist/command-DwzVtmb3.mjs +0 -2
  260. package/dist/command-wtBubtZ4.mjs +0 -2
  261. package/dist/containers-B06OGOEB.mjs +0 -380
  262. package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
  263. package/dist/d1-nJCOJZb8.mjs +0 -50
  264. package/dist/deploy-DJMnWFNk.mjs +0 -2
  265. package/dist/deploy-context-YCW3eqP1.mjs +0 -56
  266. package/dist/deploy-input-CQLBXFEB.mjs +0 -2
  267. package/dist/dev-GsYHvMah.mjs +0 -4
  268. package/dist/dialog-D5lus4M4.mjs +0 -2
  269. package/dist/discover-6kAmVMPp.mjs +0 -2
  270. package/dist/discover-C06Syc2B.mjs +0 -2
  271. package/dist/docs-CRc_WOXh.mjs +0 -3
  272. package/dist/email-auth-ptdqNSTZ.mjs +0 -6
  273. package/dist/email-domains-uL22-zRY.mjs +0 -14
  274. package/dist/email-routing-CV43rMJC.mjs +0 -44
  275. package/dist/errors-VG1mgwJl.mjs +0 -11
  276. package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
  277. package/dist/generate-CeeWW3eX.mjs +0 -3
  278. package/dist/generate-D6V4Q58z.mjs +0 -2
  279. package/dist/gt-BQkaDQDq.mjs +0 -3
  280. package/dist/healthchecks-BA1fmzTm.mjs +0 -20
  281. package/dist/init-EVsjBrOz.mjs +0 -43
  282. package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
  283. package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
  284. package/dist/local-D5Vq6ooZ.mjs +0 -2
  285. package/dist/local-runtime-BZjgkacr.mjs +0 -2
  286. package/dist/log-DZfik9Jk.mjs +0 -2
  287. package/dist/login-DRJugxya.mjs +0 -2
  288. package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
  289. package/dist/o11y-ySxrnP1Z.mjs +0 -88
  290. package/dist/oauth-CFVUl-Wv.mjs +0 -4
  291. package/dist/output-BZQEl3mK.mjs +0 -2
  292. package/dist/package-B7RgwuFR.mjs +0 -2
  293. package/dist/page-rules-DRw763O1.mjs +0 -38
  294. package/dist/pages-DfQnxiTk.mjs +0 -48
  295. package/dist/pipelines-DbyrI6F4.mjs +0 -40
  296. package/dist/previews-DEVNSip2.mjs +0 -6
  297. package/dist/progress-yvPscjYg.mjs +0 -2
  298. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  299. package/dist/prompt-CEpZ-lQZ.mjs +0 -4
  300. package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
  301. package/dist/registrar-D23gfKBi.mjs +0 -43
  302. package/dist/request-headers-C0FpeBhz.mjs +0 -2
  303. package/dist/request-tracers-qd7XOAka.mjs +0 -4
  304. package/dist/rulesets-DmqwixUC.mjs +0 -42
  305. package/dist/run-BOKI1uWa.mjs +0 -2
  306. package/dist/run-DBqOjD1P.mjs +0 -2
  307. package/dist/schema-Dj9STsWI.mjs +0 -2
  308. package/dist/schema-flags-CXm9iIv6.mjs +0 -4
  309. package/dist/session-vzNfUhPl.mjs +0 -2
  310. package/dist/shared-MK-_lkbn.mjs +0 -2
  311. package/dist/smart-shield-Boy_qbqd.mjs +0 -22
  312. package/dist/snippets-DdoDYXW-.mjs +0 -18
  313. package/dist/spawn-B5F4OIHG.mjs +0 -5
  314. package/dist/sql-Bb56llsb.mjs +0 -4
  315. package/dist/src-BoSDeQ9m.mjs +0 -133
  316. package/dist/startup-profile-DQVkZZpb.mjs +0 -2
  317. package/dist/state-DW3QZtfh.mjs +0 -2
  318. package/dist/stream-BuZYDbNR.mjs +0 -89
  319. package/dist/telemetry-DkDUr4KK.mjs +0 -2
  320. package/dist/tunnels-D90ztENM.mjs +0 -27
  321. package/dist/ui-xjCox-gU.mjs +0 -2
  322. package/dist/url-scanner-BRdWwka4.mjs +0 -16
  323. package/dist/user-Cmb1_Wu5.mjs +0 -103
  324. package/dist/version-6Bpy6Bgt.mjs +0 -2
  325. package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
  326. package/dist/workers-BnLiOjZf.mjs +0 -39
  327. package/dist/workers-builds-sKpITeRk.mjs +0 -14
  328. package/dist/zaraz-BBKki5WS.mjs +0 -22
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,n as p}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
3
3
 
4
- Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>c({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({token:d(e.token,`token`,`text`)}):l(e.body),sensitiveBodyPaths:[[`token`]]});return}let c=e.body===void 0?void 0:l(e.body),p=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>p.send(m,{body:t,account_id:h,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}e.token===void 0&&(e.token=await f(`token`,`Provides the Cloudflare API token for accessing R2.`,{kind:`secret`}));let g=u({token:d(e.token,`token`,`text`)}),_=await s(`Creating`,async()=>p.send(m,{body:g,account_id:h,bucket_name:e[`bucket-name`]}));a(_,{successLabel:`Created`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential/status`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
4
+ Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>l({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?r({token:s(e.token,`token`,`text`)}):n(e.body),sensitiveBodyPaths:[[`token`]]});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),h=e.local?c:await a();if(e.accountId=h,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>p.send(m,{body:t,account_id:h,bucket_name:e[`bucket-name`]}));u(n,{successLabel:`Created`});return}e.token===void 0&&(e.token=await f(`token`,`Provides the Cloudflare API token for accessing R2.`,{kind:`secret`}));let g=r({token:s(e.token,`token`,`text`)}),_=await d(`Creating`,async()=>p.send(m,{body:g,account_id:h,bucket_name:e[`bucket-name`]}));u(_,{successLabel:`Created`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential/status`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
5
5
 
6
- Check whether the configured catalog credentials are valid, invalid, or absent by probing authentication against the catalog.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`status <bucket-name>`,describe:`Get Basin Catalog credential status`,builder:v,handler:async e=>c({command:`basin-catalog credentials status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential/status`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})},ee={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/delete`,query:[`force`],response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 basin-catalog delete <bucket-name>
6
+ Check whether the configured catalog credentials are valid, invalid, or absent by probing authentication against the catalog.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`status <bucket-name>`,describe:`Get Basin Catalog credential status`,builder:v,handler:async e=>l({command:`basin-catalog credentials status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog credentials status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential/status`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(_,{account_id:r,bucket_name:e[`bucket-name`]}));u(s,{successLabel:`Loaded`})})},ee={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/delete`,query:[`force`],response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 basin-catalog delete <bucket-name>
7
7
 
8
- Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).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 b={command:`delete <bucket-name>`,describe:`Delete Basin Catalog metadata`,builder:ne,handler:async e=>c({command:`basin-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={force:e.cascade};if(e.dryRun){let t=await r();o({command:`cf basin-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force,message:`This removes catalog metadata. R2 bucket objects are retained.`}))return;let d=await s(`Processing`,async()=>l.send(te,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Done`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/disable`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 basin-catalog disable <bucket-name>
8
+ Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).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 b={command:`delete <bucket-name>`,describe:`Delete Basin Catalog metadata`,builder:ne,handler:async e=>l({command:`basin-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={force:e.cascade};if(e.dryRun){let t=await i();o({command:`cf basin-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();if(e.accountId=s,!await p({force:!!e.force,message:`This removes catalog metadata. R2 bucket objects are retained.`}))return;let l=await d(`Processing`,async()=>r.send(te,{account_id:s,bucket_name:e[`bucket-name`],...n}));u(l,{successLabel:`Done`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/disable`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 basin-catalog disable <bucket-name>
9
9
 
10
- Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>c({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let u=await s(`Processing`,async()=>c.send(x,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Done`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/enable`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 basin-catalog enable <bucket-name>
10
+ Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>l({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let s=await d(`Processing`,async()=>n.send(x,{account_id:r,bucket_name:e[`bucket-name`]}));u(s,{successLabel:`Done`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/enable`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 basin-catalog enable <bucket-name>
11
11
 
12
- Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "})}const E={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:T,handler:async e=>c({command:`basin-catalog enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`credential`,`token`]]});return}let c=e.body===void 0?void 0:l(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>f.send(w,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let m=u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}),h=await s(`Creating`,async()=>f.send(w,{body:m,account_id:p,bucket_name:e[`bucket-name`]}));a(h,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 basin-catalog get <bucket-name>
12
+ Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "})}const E={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:T,handler:async e=>l({command:`basin-catalog enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?r({credential:{token:s(e[`credential-token`],`credential-token`,`text`)}}):n(e.body),sensitiveBodyPaths:[[`credential`,`token`]]});return}let l=e.body===void 0?void 0:n(e.body),f=await t(e),p=e.local?c:await a();if(e.accountId=p,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>f.send(w,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));u(n,{successLabel:`Created`});return}let m=r({credential:{token:s(e[`credential-token`],`credential-token`,`text`)}}),h=await d(`Creating`,async()=>f.send(w,{body:m,account_id:p,bucket_name:e[`bucket-name`]}));u(h,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 basin-catalog get <bucket-name>
13
13
 
14
- Retrieve detailed information about a specific Basin Catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <bucket-name>`,describe:`Get Basin Catalog details`,builder:O,handler:async e=>c({command:`basin-catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 basin-catalog list
14
+ Retrieve detailed information about a specific Basin Catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <bucket-name>`,describe:`Get Basin Catalog details`,builder:O,handler:async e=>l({command:`basin-catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(D,{account_id:r,bucket_name:e[`bucket-name`]}));u(s,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 basin-catalog list
15
15
 
16
- Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs for the specified account. Each catalog represents an R2 bucket configured to store Iceberg metadata and data files.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List Basin Catalogs`,builder:j,handler:async e=>c({command:`basin-catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf basin-catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/basin-catalog`,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(A,{account_id:l}));a(u,{successLabel:`Loaded`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/maintenance-configs`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function P(e){return e.usage(`$0 basin-catalog maintenance-configs get <bucket-name>
16
+ Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs for the specified account. Each catalog represents an R2 bucket configured to store Iceberg metadata and data files.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List Basin Catalogs`,builder:j,handler:async e=>l({command:`basin-catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();o({command:`cf basin-catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/basin-catalog`,pathParams:{},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(A,{account_id:r}));u(s,{successLabel:`Loaded`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/maintenance-configs`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function P(e){return e.usage(`$0 basin-catalog maintenance-configs get <bucket-name>
17
17
 
18
- Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <bucket-name>`,describe:`Get catalog maintenance configuration`,builder:P,handler:async e=>c({command:`basin-catalog maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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(N,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function L(e){return e.usage(`$0 basin-catalog maintenance-configs update <bucket-name>
18
+ Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <bucket-name>`,describe:`Get catalog maintenance configuration`,builder:P,handler:async e=>l({command:`basin-catalog maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(N,{account_id:r,bucket_name:e[`bucket-name`]}));u(s,{successLabel:`Loaded`})})};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function L(e){return e.usage(`$0 basin-catalog maintenance-configs update <bucket-name>
19
19
 
20
- Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const R={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:L,handler:async e=>c({command:`basin-catalog maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>f.send(I,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let m=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),h=await s(`Creating`,async()=>f.send(I,{body:m,account_id:p,bucket_name:e[`bucket-name`]}));a(h,{successLabel:`Created`})})},z={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces`,query:[`page_token`,`page_size`,`parent`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function B(e){return e.usage(`$0 basin-catalog namespaces list
20
+ Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>s(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>s(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>s(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const R={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:L,handler:async e=>l({command:`basin-catalog maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?r({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:s(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),f=await t(e),p=e.local?c:await a();if(e.accountId=p,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>f.send(I,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));u(n,{successLabel:`Created`});return}let m=r({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:s(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),h=await d(`Creating`,async()=>f.send(I,{body:m,account_id:p,bucket_name:e[`bucket-name`]}));u(h,{successLabel:`Created`})})},z={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces`,query:[`page_token`,`page_size`,`parent`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function B(e){return e.usage(`$0 basin-catalog namespaces list
21
21
 
22
22
  Returns a list of namespaces in the specified Basin Catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
23
23
  Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of namespaces to return per page.
@@ -25,20 +25,20 @@ Defaults to 100, maximum 1000.`}).option(`parent`,{type:`string`,description:`Pa
25
25
  For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").
26
26
  Omit this parameter to list top-level namespaces.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include namespace UUIDs in the response.
27
27
  Set to true to receive the namespace_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps).
28
- When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List namespaces in catalog`,builder:B,handler:async e=>c({command:`basin-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let c={page_token:e[`page-token`],page_size:e[`page-size`],parent:e.parent,return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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(re,{account_id:u,bucket_name:e[`bucket-name`],...c}));a(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function U(e){return e.usage("$0 basin-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
29
- For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <table-name>`,describe:`Get table details`,builder:U,handler:async e=>c({command:`basin-catalog namespaces tables get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(H,{account_id:l,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(u,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables`,query:[`page_token`,`page_size`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function K(e){return e.usage(`$0 basin-catalog namespaces tables list
28
+ When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List namespaces in catalog`,builder:B,handler:async e=>l({command:`basin-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let n={page_token:e[`page-token`],page_size:e[`page-size`],parent:e.parent,return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(re,{account_id:s,bucket_name:e[`bucket-name`],...n}));u(l,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function U(e){return e.usage("$0 basin-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
29
+ For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <table-name>`,describe:`Get table details`,builder:U,handler:async e=>l({command:`basin-catalog namespaces tables get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces tables get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(H,{account_id:r,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));u(s,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables`,query:[`page_token`,`page_size`,`return_uuids`,`return_details`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function K(e){return e.usage(`$0 basin-catalog namespaces tables list
30
30
 
31
31
  Returns a list of tables in the specified namespace within a Basin Catalog. Supports pagination for efficient traversal of large table collections.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
32
32
  For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
33
33
  Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of tables to return per page.
34
34
  Defaults to 100, maximum 1000.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include table UUIDs in the response.
35
35
  Set to true to receive the table_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps, locations).
36
- When true, response includes created_at, updated_at, metadata_locations, and locations arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`List tables in namespace`,builder:K,handler:async e=>c({command:`basin-catalog namespaces tables list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let c={page_token:e[`page-token`],page_size:e[`page-size`],return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``)},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,bucket_name:e[`bucket-name`],namespace:e.namespace,...c}));a(d,{successLabel:`Loaded`})})};var J={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Y(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs get <table-name>
36
+ When true, response includes created_at, updated_at, metadata_locations, and locations arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`List tables in namespace`,builder:K,handler:async e=>l({command:`basin-catalog namespaces tables list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},e,async()=>{let n={page_token:e[`page-token`],page_size:e[`page-size`],return_uuids:e[`return-uuids`],return_details:e[`return-details`]};if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces tables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(G,{account_id:s,bucket_name:e[`bucket-name`],namespace:e.namespace,...n}));u(l,{successLabel:`Loaded`})})};var J={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Y(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs get <table-name>
37
37
 
38
- Retrieve the maintenance configuration for a specific table, including compaction settings.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <table-name>`,describe:`Get table maintenance configuration`,builder:Y,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(J,{account_id:l,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs/${t.configuration_type}/queue`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`}};function ie(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs queue <configuration-type>
38
+ Retrieve the maintenance configuration for a specific table, including compaction settings.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <table-name>`,describe:`Get table maintenance configuration`,builder:Y,handler:async e=>l({command:`basin-catalog namespaces tables maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces tables maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(J,{account_id:r,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));u(s,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs/${t.configuration_type}/queue`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`}};function ie(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs queue <configuration-type>
39
39
 
40
- Queue maintenance for normal polling. This request does not start a run.`).positional(`configuration-type`,{type:`string`,description:`Configuration type`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`request-id`,{type:`string`,description:`The request_id 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 ae={command:`queue <configuration-type>`,describe:`Queue table maintenance`,builder:ie,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs queue`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs queue`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs/${e[`configuration-type`]==null?`<configuration-type>`:encodeURIComponent(String(e[`configuration-type`]))}/queue`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``),"configuration-type":String(e[`configuration-type`]??``)},bodyKind:`json`,body:e.body===void 0?u({request_id:d(e[`request-id`],`request-id`,`text`)}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>f.send(Z,{body:t,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],configuration_type:e[`configuration-type`]}));a(n,{successLabel:`Created`});return}let m=u({request_id:d(e[`request-id`],`request-id`,`text`)}),h=await s(`Creating`,async()=>f.send(Z,{body:m,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],configuration_type:e[`configuration-type`]}));a(h,{successLabel:`Created`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function oe(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs update <table-name>
40
+ Queue maintenance for normal polling. This request does not start a run.`).positional(`configuration-type`,{type:`string`,description:`Configuration type`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`request-id`,{type:`string`,description:`The request_id 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 ae={command:`queue <configuration-type>`,describe:`Queue table maintenance`,builder:ie,handler:async e=>l({command:`basin-catalog namespaces tables maintenance-configs queue`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces tables maintenance-configs queue`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs/${e[`configuration-type`]==null?`<configuration-type>`:encodeURIComponent(String(e[`configuration-type`]))}/queue`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``),"configuration-type":String(e[`configuration-type`]??``)},bodyKind:`json`,body:e.body===void 0?r({request_id:s(e[`request-id`],`request-id`,`text`)}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),f=await t(e),p=e.local?c:await a();if(e.accountId=p,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>f.send(Z,{body:t,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],configuration_type:e[`configuration-type`]}));u(n,{successLabel:`Created`});return}let m=r({request_id:s(e[`request-id`],`request-id`,`text`)}),h=await d(`Creating`,async()=>f.send(Z,{body:m,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],configuration_type:e[`configuration-type`]}));u(h,{successLabel:`Created`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-configs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function oe(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-configs update <table-name>
41
41
 
42
- Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>d(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>d(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>d(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const $={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:oe,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>f.send(Q,{body:t,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(n,{successLabel:`Created`});return}let m=u({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:d(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),h=await s(`Creating`,async()=>f.send(Q,{body:m,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));a(h,{successLabel:`Created`})})},se={command:`maintenance-configs`,describe:`Table-level maintenance configurations and operations`,builder:e=>e.command(X).command(ae).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-runs`,query:[`page_size`,`page_token`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function le(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-runs list
42
+ Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`compaction-state`,e=>s(e,`compaction-state`,`text`)).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).coerce(`compaction-target-size-mb`,e=>s(e,`compaction-target-size-mb`,`text`)).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`snapshot-expiration-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).coerce(`snapshot-expiration-state`,e=>s(e,`snapshot-expiration-state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const $={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:oe,handler:async e=>l({command:`basin-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`snapshot-expiration-state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},bodyKind:`json`,body:e.body===void 0?r({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:s(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),f=await t(e),p=e.local?c:await a();if(e.accountId=p,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>f.send(Q,{body:t,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));u(n,{successLabel:`Created`});return}let m=r({compaction:{state:e[`compaction-state`],target_size_mb:e[`compaction-target-size-mb`]},snapshot_expiration:{max_snapshot_age:s(e[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:e[`snapshot-expiration-min-snapshots-to-keep`],state:e[`snapshot-expiration-state`]}}),h=await d(`Creating`,async()=>f.send(Q,{body:m,account_id:p,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`]}));u(h,{successLabel:`Created`})})},se={command:`maintenance-configs`,describe:`Table-level maintenance configurations and operations`,builder:e=>e.command(X).command(ae).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/namespaces/${t.namespace}/tables/${t.table_name}/maintenance-runs`,query:[`page_size`,`page_token`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`}};function le(e){return e.usage(`$0 basin-catalog namespaces tables maintenance-runs list
43
43
 
44
- Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List table maintenance runs`,builder:le,handler:async e=>c({command:`basin-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page_size:e[`page-size`],page_token:e[`page-token`]};if(e.dryRun){let t=await r();o({command:`cf basin-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},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(ce,{account_id:u,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],...c}));a(d,{successLabel:`Loaded`})})},de={command:`maintenance-runs`,describe:`History of maintenance runs performed on tables`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`tables`,describe:`Tables within catalog namespaces`,builder:e=>e.command(W).command(q).command(se).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(V).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`basin-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(ee).command(z).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{me as default};
44
+ Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List table maintenance runs`,builder:le,handler:async e=>l({command:`basin-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page_size:e[`page-size`],page_token:e[`page-token`]};if(e.dryRun){let t=await i();o({command:`cf basin-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tables/${e[`table-name`]==null?`<table-name>`:encodeURIComponent(String(e[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(e[`bucket-name`]??``),namespace:String(e.namespace??``),"table-name":String(e[`table-name`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(ce,{account_id:s,bucket_name:e[`bucket-name`],namespace:e.namespace,table_name:e[`table-name`],...n}));u(l,{successLabel:`Loaded`})})},de={command:`maintenance-runs`,describe:`History of maintenance runs performed on tables`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`tables`,describe:`Tables within catalog namespaces`,builder:e=>e.command(W).command(q).command(se).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(V).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`basin-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(ee).command(z).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{me as default};
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-CEpZ-lQZ.mjs";var v={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function y(e){return e.usage(`$0 billing addresses validate
2
+ import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{c as r,o as i,r as a,t as o}from"./body-parser-HN91kAf0.mjs";import{t as s}from"./dry-run-qsnRlRk6.mjs";import{a as c,t as l}from"./context-BGm5_wTT.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./output-hFMAotFl.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import{t as p}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import"./api-Dnt6lRJG.mjs";import{t as m}from"./local-B3zt9PXR.mjs";import{a as h,i as g,n as _}from"./prompt-D274Im1O.mjs";var v={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function y(e){return e.usage(`$0 billing addresses validate
3
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 b={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=e.body===void 0?void 0:d(e.body),n=await r(e);if(e.body!==void 0){let e=t,r=await c(`Validating`,async()=>n.send(v,{body:e}));o(r,{successLabel:`Validated`});return}let i=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`)}),a=await c(`Validating`,async()=>n.send(v,{body:i}));o(a,{successLabel:`Validated`})})},ee={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(b).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
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 b={command:`validate`,describe:`Validate Billing Address`,builder:y,handler:async e=>p({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?o({address:u(e.address,`address`,`text`),address2:u(e.address2,`address2`,`text`),city:u(e.city,`city`,`text`),country:u(e.country,`country`,`text`),state:u(e.state,`state`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}):a(e.body)});return}let n=e.body===void 0?void 0:a(e.body),r=await t(e);if(e.body!==void 0){let e=n,t=await f(`Validating`,async()=>r.send(v,{body:e}));d(t,{successLabel:`Validated`});return}let i=o({address:u(e.address,`address`,`text`),address2:u(e.address2,`address2`,`text`),city:u(e.city,`city`,`text`),country:u(e.country,`country`,`text`),state:u(e.state,`state`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}),c=await f(`Validating`,async()=>r.send(v,{body:i}));d(c,{successLabel:`Validated`})})},ee={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:e=>n`/accounts/${e.account_id}/billing/profile/payment-method`};function S(e){return e.usage(`$0 billing profiles create-payment-intent
5
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 C={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 w={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function te(e){return e.usage(`$0 billing profiles create
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 C={command:`create-payment-intent`,describe:`Create Payment Intent for Billing Profile`,builder:S,handler:async e=>p({command:`billing profiles create-payment-intent`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await c();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 t(e),r=e.local?m:await l();e.accountId=r;let i=await f(`Creating`,async()=>n.send(x,{account_id:r}));d(i,{successLabel:`Created`})})};var w={method:`POST`,path:e=>n`/accounts/${e.account_id}/billing/profile`,body:`json`};function te(e){return e.usage(`$0 billing profiles create
7
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 ne={command:`create`,describe:`Create Billing Profile`,builder:te,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=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(w,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}let f=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`)}),h=await c(`Creating`,async()=>l.send(w,{body:f,account_id:u}));o(h,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/billing/profile`,response:!1};function E(e){return e.usage(`$0 billing profiles delete
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 ne={command:`create`,describe:`Create Billing Profile`,builder:te,handler:async e=>p({command:`billing profiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();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?o({address:u(e.address,`address`,`text`),address2:u(e.address2,`address2`,`text`),billing_email:u(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:u(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:u(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:u(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:u(e.city,`city`,`text`),company:u(e.company,`company`,`text`),country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),h_captcha_response:u(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),preferred_locale:u(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:u(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:u(e.state,`state`,`text`),tax_id_type:u(e[`tax-id-type`],`tax-id-type`,`text`),telephone:u(e.telephone,`telephone`,`text`),vat:u(e.vat,`vat`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}):a(e.body)});return}let n=e.body===void 0?void 0:a(e.body),r=await t(e),i=e.local?m:await l();if(e.accountId=i,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>r.send(w,{body:e,account_id:i}));d(t,{successLabel:`Created`});return}let p=o({address:u(e.address,`address`,`text`),address2:u(e.address2,`address2`,`text`),billing_email:u(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:u(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:u(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:u(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:u(e.city,`city`,`text`),company:u(e.company,`company`,`text`),country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),h_captcha_response:u(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),preferred_locale:u(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:u(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:u(e.state,`state`,`text`),tax_id_type:u(e[`tax-id-type`],`tax-id-type`,`text`),telephone:u(e.telephone,`telephone`,`text`),vat:u(e.vat,`vat`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}),h=await f(`Creating`,async()=>r.send(w,{body:p,account_id:i}));d(h,{successLabel:`Created`})})};var T={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/billing/profile`,response:!1};function E(e){return e.usage(`$0 billing profiles delete
9
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 D={command:`delete`,describe:`Delete Billing Profile`,builder:E,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(T,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/profile`};function k(e){return e.usage(`$0 billing profiles get
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 D={command:`delete`,describe:`Delete Billing Profile`,builder:E,handler:async e=>p({command:`billing profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await c();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 t(e),r=e.local?m:await l();if(e.accountId=r,!await _({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(T,{account_id:r}));d(i,{successLabel:`Deleted`})})};var O={method:`GET`,path:e=>n`/accounts/${e.account_id}/billing/profile`};function k(e){return e.usage(`$0 billing profiles get
11
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 A={command:`get`,describe:`Get Billing Profile`,builder:k,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(O,{account_id:l}));o(u,{successLabel:`Loaded`})})};var j={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function M(e){return e.usage(`$0 billing profiles update-email
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 A={command:`get`,describe:`Get Billing Profile`,builder:k,handler:async e=>p({command:`billing profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await c();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 t(e),r=e.local?m:await l();e.accountId=r;let i=await f(`Loading`,async()=>n.send(O,{account_id:r}));d(i,{successLabel:`Loaded`})})};var j={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/billing/profile`,body:`json`};function M(e){return e.usage(`$0 billing profiles update-email
13
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 N={command:`update-email`,describe:`Update Billing Email`,builder:M,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=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(j,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}let f=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`)}),h=await c(`Updating`,async()=>l.send(j,{body:f,account_id:u}));o(h,{successLabel:`Updated`})})};var P={method:`PUT`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function F(e){return e.usage(`$0 billing profiles update
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 N={command:`update-email`,describe:`Update Billing Email`,builder:M,handler:async e=>p({command:`billing profiles update-email`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();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?o({billing_email:u(e[`billing-email`],`billing-email`,`text`),preferred_locale:u(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:u(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}):a(e.body)});return}let n=e.body===void 0?void 0:a(e.body),r=await t(e),i=e.local?m:await l();if(e.accountId=i,e.body!==void 0){let e=n,t=await f(`Updating`,async()=>r.send(j,{body:e,account_id:i}));d(t,{successLabel:`Updated`});return}let p=o({billing_email:u(e[`billing-email`],`billing-email`,`text`),preferred_locale:u(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:u(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}),h=await f(`Updating`,async()=>r.send(j,{body:p,account_id:i}));d(h,{successLabel:`Updated`})})};var P={method:`PUT`,path:e=>n`/accounts/${e.account_id}/billing/profile`,body:`json`};function F(e){return e.usage(`$0 billing profiles update
15
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 I={command:`update`,describe:`Update Billing Profile`,builder:F,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=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(P,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}let f=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`)}),h=await c(`Updating`,async()=>l.send(P,{body:f,account_id:u}));o(h,{successLabel:`Updated`})})},L={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(ne).command(C).command(D).command(A).command(I).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`GET`,path:t=>e`/billing/rate_plans/${t.public_key}`};function z(e){return e.usage(`$0 billing rate-plans get <public-key>
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 I={command:`update`,describe:`Update Billing Profile`,builder:F,handler:async e=>p({command:`billing profiles update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();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?o({address:u(e.address,`address`,`text`),address2:u(e.address2,`address2`,`text`),billing_email:u(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:u(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:u(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:u(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:u(e.city,`city`,`text`),company:u(e.company,`company`,`text`),country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),h_captcha_response:u(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),preferred_locale:u(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:u(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:u(e.state,`state`,`text`),tax_id_type:u(e[`tax-id-type`],`tax-id-type`,`text`),telephone:u(e.telephone,`telephone`,`text`),vat:u(e.vat,`vat`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}):a(e.body)});return}let n=e.body===void 0?void 0:a(e.body),r=await t(e),i=e.local?m:await l();if(e.accountId=i,e.body!==void 0){let e=n,t=await f(`Updating`,async()=>r.send(P,{body:e,account_id:i}));d(t,{successLabel:`Updated`});return}let p=o({address:u(e.address,`address`,`text`),address2:u(e.address2,`address2`,`text`),billing_email:u(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:u(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:u(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:u(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:u(e.city,`city`,`text`),company:u(e.company,`company`,`text`),country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),h_captcha_response:u(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),preferred_locale:u(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:u(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:u(e.state,`state`,`text`),tax_id_type:u(e[`tax-id-type`],`tax-id-type`,`text`),telephone:u(e.telephone,`telephone`,`text`),vat:u(e.vat,`vat`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}),h=await f(`Updating`,async()=>r.send(P,{body:p,account_id:i}));d(h,{successLabel:`Updated`})})},L={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(ne).command(C).command(D).command(A).command(I).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`GET`,path:e=>n`/billing/rate_plans/${e.public_key}`};function z(e){return e.usage(`$0 billing rate-plans get <public-key>
17
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 B={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:z,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(R,{public_key:e[`public-key`]}));o(n,{successLabel:`Loaded`})})},V={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/activity`,query:[`limit`,`period`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function U(e){return e.usage("$0 billing spend-policies activity list\n\nReturns 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. Defaults to `period=current_billing_cycle`: each revision's timestamp must be within its product's current subscription cycle (inclusive start, exclusive end). Each product's cycle is resolved independently from canonical aggregates, including for disabled or deleted policies. Set `period=all` for history across cycles. Filtering happens before pagination. No current cycles returns an empty page; unavailable or disabled cycle resolution returns `503` with code `1013`. Cursors pin resolved cycle bounds across pages and must be used with the same period selection. Cursors obtained before this filter was introduced must be refreshed.").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(`period`,{type:`string`,description:`Select current subscription billing-cycle history or history across all cycles.`,choices:[`current_billing_cycle`,`all`]}).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 W={command:`list`,describe:`List Spend Policy Activity`,builder:U,handler:async e=>l({command:`billing spend-policies activity list`,classification:{safeFlags:[`period`,`dry-run`]}},e,async()=>{let n={limit:e.limit,period:e.period,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(H,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},G={command:`activity`,describe:`Operations for spend-policies.activity`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}/audit`,query:[`limit`,`period`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function q(e){return e.usage("$0 billing spend-policies audit list\n\nReturns the policy's evaluation history, newest first. At most one threshold-crossing entry (`limit_reached`) is recorded per 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. Defaults to `period=current_billing_cycle`, resolved from the product's canonical aggregates, not calendar months. Crossings match their recorded billing-period bounds, even if recorded late. Set `period=all` for history across cycles. Filtering happens before LIMIT. No current cycle returns an empty array; unavailable or disabled cycle resolution returns `503` with code `1013`, never an empty success.").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(`period`,{type:`string`,description:`Select current subscription billing-cycle history or history across all cycles.`,choices:[`current_billing_cycle`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List Spend Policy Audit Entries`,builder:q,handler:async e=>l({command:`billing spend-policies audit list`,classification:{safeFlags:[`period`,`dry-run`]}},e,async()=>{let n={limit:e.limit,period:e.period};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(K,{account_id:u,policy_id:e[`policy-id`],...n}));o(d,{successLabel:`Loaded`})})},Y={command:`audit`,describe:`Operations for spend-policies.audit`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={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 Z(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:Z,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=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(X,{body:e,account_id:u}));o(t,{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 f=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`]}),_=await c(`Creating`,async()=>l.send(X,{body:f,account_id:u}));o(_,{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=e.body===void 0?void 0:d(e.body),_=await r(e),v=e.local?t:await a();if(e.accountId=v,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(_,`PUT`,`/accounts/${v}/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 y={};e.action!==void 0&&f(y,[`action`],e.action),e.enabled!==void 0&&f(y,[`enabled`],e.enabled),e.name!==void 0&&f(y,[`name`],m(e.name,`name`,`text`)),e[`notification-email`]!==void 0&&f(y,[`notification_email`],m(e[`notification-email`],`notification-email`,`text`)),e[`product-id`]!==void 0&&f(y,[`product_id`],e[`product-id`]),e[`threshold-cents`]!==void 0&&f(y,[`threshold_cents`],e[`threshold-cents`]);let b=await c(`Updating`,async()=>n(_,`PUT`,`/accounts/${v}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:y,headers:Object.keys(l).length>0?l:void 0}));o(b,{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(G).command(Y).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
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 B={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:z,handler:async e=>p({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 n=await t(e),r=await f(`Loading`,async()=>n.send(R,{public_key:e[`public-key`]}));d(r,{successLabel:`Loaded`})})},V={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`GET`,path:e=>n`/accounts/${e.account_id}/billing/spend-policies/activity`,query:[`limit`,`period`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function U(e){return e.usage("$0 billing spend-policies activity list\n\nReturns 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. Defaults to `period=current_billing_cycle`: each revision's timestamp must be within its product's current subscription cycle (inclusive start, exclusive end). Each product's cycle is resolved independently from canonical aggregates, including for disabled or deleted policies. Set `period=all` for history across cycles. Filtering happens before pagination. No current cycles returns an empty page; unavailable or disabled cycle resolution returns `503` with code `1013`. Cursors pin resolved cycle bounds across pages and must be used with the same period selection. Cursors obtained before this filter was introduced must be refreshed.").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(`period`,{type:`string`,description:`Select current subscription billing-cycle history or history across all cycles.`,choices:[`current_billing_cycle`,`all`]}).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 W={command:`list`,describe:`List Spend Policy Activity`,builder:U,handler:async e=>p({command:`billing spend-policies activity list`,classification:{safeFlags:[`period`,`dry-run`]}},e,async()=>{let n={limit:e.limit,period:e.period,cursor:e.cursor};if(e.dryRun){let e=await c();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 r=await t(e),i=e.local?m:await l();e.accountId=i;let a=await f(`Loading`,async()=>r.send(H,{account_id:i,...n}));d(a,{successLabel:`Loaded`})})},G={command:`activity`,describe:`Operations for spend-policies.activity`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`GET`,path:e=>n`/accounts/${e.account_id}/billing/spend-policies/${e.policy_id}/audit`,query:[`limit`,`period`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function q(e){return e.usage("$0 billing spend-policies audit list\n\nReturns the policy's evaluation history, newest first. At most one threshold-crossing entry (`limit_reached`) is recorded per 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. Defaults to `period=current_billing_cycle`, resolved from the product's canonical aggregates, not calendar months. Crossings match their recorded billing-period bounds, even if recorded late. Set `period=all` for history across cycles. Filtering happens before LIMIT. No current cycle returns an empty array; unavailable or disabled cycle resolution returns `503` with code `1013`, never an empty success.").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(`period`,{type:`string`,description:`Select current subscription billing-cycle history or history across all cycles.`,choices:[`current_billing_cycle`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List Spend Policy Audit Entries`,builder:q,handler:async e=>p({command:`billing spend-policies audit list`,classification:{safeFlags:[`period`,`dry-run`]}},e,async()=>{let n={limit:e.limit,period:e.period};if(e.dryRun){let t=await c();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 r=await t(e),i=e.local?m:await l();e.accountId=i;let a=await f(`Loading`,async()=>r.send(K,{account_id:i,policy_id:e[`policy-id`],...n}));d(a,{successLabel:`Loaded`})})},Y={command:`audit`,describe:`Operations for spend-policies.audit`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:e=>n`/accounts/${e.account_id}/billing/spend-policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function Z(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=>u(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=>u(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:Z,handler:async e=>p({command:`billing spend-policies create`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();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?o({action:e.action,enabled:e.enabled,name:u(e.name,`name`,`text`),notification_email:u(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):a(e.body)});return}let n=e.body===void 0?void 0:a(e.body),r=await t(e),i=e.local?m:await l();if(e.accountId=i,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>r.send(X,{body:e,account_id:i}));d(t,{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 p=o({action:e.action,enabled:e.enabled,name:u(e.name,`name`,`text`),notification_email:u(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}),_=await f(`Creating`,async()=>r.send(X,{body:p,account_id:i}));d(_,{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 n=>p({command:`billing spend-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{let r={};if(n[`if-match`]!==void 0&&(r[`If-Match`]=String(n[`if-match`])),n.dryRun){let e=await c();s({command:`cf billing spend-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`none`});return}let i=await t(n),a=n.local?m:await l();if(n.accountId=a,!await _({force:!!n.force}))return;let o=await f(`Deleting`,async()=>e(i,`DELETE`,`/accounts/${a}/billing/spend-policies/${encodeURIComponent(String(n[`policy-id`]))}`,{headers:Object.keys(r).length>0?r:void 0}));d(o,{successLabel:`Deleted`})})};var oe={method:`GET`,path:e=>n`/accounts/${e.account_id}/billing/spend-policies/${e.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=>p({command:`billing spend-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();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 t(e),r=e.local?m:await l();e.accountId=r;let i=await f(`Loading`,async()=>n.send(oe,{account_id:r,policy_id:e[`policy-id`]}));d(i,{successLabel:`Loaded`})})};var le={method:`GET`,path:e=>n`/accounts/${e.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=>p({command:`billing spend-policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await c();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 t(e),r=e.local?m:await l();e.accountId=r;let i=await f(`Loading`,async()=>n.send(le,{account_id:r}));d(i,{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=>u(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=>u(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 n=>p({command:`billing spend-policies update`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},n,async()=>{let i={};if(n[`if-match`]!==void 0&&(i[`If-Match`]=String(n[`if-match`])),n.dryRun){let e=await c();s({command:`cf billing spend-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies/${n[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(n[`policy-id`]))}`,pathParams:{"policy-id":String(n[`policy-id`]??``)},bodyKind:`json`,body:n.body===void 0?o({action:n.action,enabled:n.enabled,name:u(n.name,`name`,`text`),notification_email:u(n[`notification-email`],`notification-email`,`text`),product_id:n[`product-id`],threshold_cents:n[`threshold-cents`]}):a(n.body)});return}let p=n.body===void 0?void 0:a(n.body),_=await t(n),v=n.local?m:await l();if(n.accountId=v,n.body!==void 0){let t=p,r=await f(`Updating`,async()=>e(_,`PUT`,`/accounts/${v}/billing/spend-policies/${encodeURIComponent(String(n[`policy-id`]))}`,{body:t,headers:Object.keys(i).length>0?i:void 0}));d(r,{successLabel:`Updated`});return}if(n.action===void 0&&(n.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`])),n.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(n.name===void 0&&(n.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.`)),n[`product-id`]===void 0&&(n[`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`])),n[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let y={};n.action!==void 0&&r(y,[`action`],n.action),n.enabled!==void 0&&r(y,[`enabled`],n.enabled),n.name!==void 0&&r(y,[`name`],u(n.name,`name`,`text`)),n[`notification-email`]!==void 0&&r(y,[`notification_email`],u(n[`notification-email`],`notification-email`,`text`)),n[`product-id`]!==void 0&&r(y,[`product_id`],n[`product-id`]),n[`threshold-cents`]!==void 0&&r(y,[`threshold_cents`],n[`threshold-cents`]);let b=await f(`Updating`,async()=>e(_,`PUT`,`/accounts/${v}/billing/spend-policies/${encodeURIComponent(String(n[`policy-id`]))}`,{body:y,headers:Object.keys(i).length>0?i:void 0}));d(b,{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(G).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:e=>n`/accounts/${e.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=>p({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 c();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 r=await t(e),i=e.local?m:await l();e.accountId=i;let a=await f(`Loading`,async()=>r.send(he,{account_id:i,...n}));d(a,{successLabel:`Loaded`})})};var ve={method:`GET`,path:e=>n`/accounts/${e.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=>p({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 c();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 r=await t(e),i=e.local?m:await l();e.accountId=i;let a=await f(`Loading`,async()=>r.send(ve,{account_id:i,...n}));d(a,{successLabel:`Loaded`})})};var xe={method:`GET`,path:e=>n`/accounts/${e.account_id}/billable-usage/info`};function Q(e){return e.usage(`$0 billing usage get-info-v1
19
19
 
20
- Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const 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
20
+ Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-info-v1`,describe:`Get Account Billable Usage Info (Version 1, Alpha)`,builder:Q,handler:async e=>p({command:`billing usage get-info-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await c();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 t(e),r=e.local?m:await l();e.accountId=r;let i=await f(`Loading`,async()=>n.send(xe,{account_id:r}));d(i,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:e=>n`/accounts/${e.account_id}/billable-usage`,query:[`from`,`to`]};function we(e){return e.usage(`$0 billing usage get-v1
21
21
 
22
- Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const 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=e.body===void 0?void 0:d(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let e=n,t=await c(`Loading`,async()=>l.send($,{body:e,account_id:f}));o(t,{successLabel:`Loaded`});return}let h=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`)}}),g=await c(`Loading`,async()=>l.send($,{body:h,account_id:f}));o(g,{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(ee).command(L).command(V).command(me).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ke as default};
22
+ Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-v1`,describe:`Get Account Billable Usage (Version 1, Alpha)`,builder:we,handler:async e=>p({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 c();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 r=await t(e),i=e.local?m:await l();e.accountId=i;let a=await f(`Loading`,async()=>r.send(Ce,{account_id:i,...n}));d(a,{successLabel:`Loaded`})})};var $={method:`POST`,path:e=>n`/accounts/${e.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. Shape: [{"Key": string, "Values": [string]}].`}).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. Shape: [{"Key": string, "Type": "TAG" | "DIMENSION"}].`}).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=>u(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=>p({command:`billing usage query`,classification:{safeFlags:[`metric`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();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?o({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:i(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:i(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:u(e[`time-period-from`],`time-period-from`,`text`),To:u(e[`time-period-to`],`time-period-to`,`text`)}}):a(e.body)});return}let n=e.body===void 0?void 0:a(e.body),r=await t(e),p=e.local?m:await l();if(e.accountId=p,e.body!==void 0){let e=n,t=await f(`Loading`,async()=>r.send($,{body:e,account_id:p}));d(t,{successLabel:`Loaded`});return}let h=o({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:i(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:i(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:u(e[`time-period-from`],`time-period-from`,`text`),To:u(e[`time-period-to`],`time-period-to`,`text`)}}),g=await f(`Loading`,async()=>r.send($,{body:h,account_id:p}));d(g,{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(ee).command(L).command(V).command(me).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ke as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-CcL6RoGw.mjs";import{stripVTControlCharacters as n}from"node:util";function r(n){return`${t.success(e.success)} ${n}`}function i(n){return`${t.warning(e.warning)} ${n}`}function a(n){return`${t.muted(e.arrow)} ${t.muted(n)}`}function o(e,r){let a=process.env.CF_DELEGATION?` ${t.muted(`·`)} ${t.muted(`local version`)}`:``,o=r?` ${t.muted(`·`)} ${t.warning(`update available: v${r.latestVersion}`)}`:``,s=`🍊☁️ ${t.brand(t.bold(`cf`))} ${t.muted(`·`)} ${t.muted(`v${e}`)}${a}${o}`,c=n(s).length,l=`─`.repeat(c);return`${s}\n${t.brand(l)}${r?.isMajor?`\n${i(`A new major version of cf is available. Updating is recommended.`)}`:``}`}const s={bar:`│`,top:`┌`,bottom:`└`};function c(e,n,r){let i=r?.title??`Error`,a=t.error(s.bar),o=t.error(s.top),c=t.error(s.bottom),u=Math.max(20,(process.stderr.columns||80)-2),d=[];if(d.push(``),d.push(`${o} ${t.error(t.bold(i))}`),r?.rawMessage)for(let t of e.split(`
2
+ import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-livNdiwK.mjs";import{stripVTControlCharacters as n}from"node:util";function r(n){return`${t.success(e.success)} ${n}`}function i(n){return`${t.warning(e.warning)} ${n}`}function a(n){return`${t.muted(e.arrow)} ${t.muted(n)}`}function o(e,r){let a=process.env.CF_DELEGATION?` ${t.muted(`·`)} ${t.muted(`local version`)}`:``,o=r?` ${t.muted(`·`)} ${t.warning(`update available: v${r.latestVersion}`)}`:``,s=`🍊☁️ ${t.brand(t.bold(`cf`))} ${t.muted(`·`)} ${t.muted(`v${e}`)}${a}${o}`,c=n(s).length,l=`─`.repeat(c);return`${s}\n${t.brand(l)}${r?.isMajor?`\n${i(`A new major version of cf is available. Updating is recommended.`)}`:``}`}const s={bar:`│`,top:`┌`,bottom:`└`};function c(e,n,r){let i=r?.title??`Error`,a=t.error(s.bar),o=t.error(s.top),c=t.error(s.bottom),u=Math.max(20,(process.stderr.columns||80)-2),d=[];if(d.push(``),d.push(`${o} ${t.error(t.bold(i))}`),r?.rawMessage)for(let t of e.split(`
3
3
  `))d.push(t.length>0?`${a} ${t}`:a);else for(let n of l(e,u))d.push(n.length>0?`${a} ${t.error(t.bold(n))}`:a);if(n){d.push(a);for(let e of l(n,u))d.push(e.length>0?`${a} ${t.muted(e)}`:a)}return d.push(c),d.join(`
4
4
  `)}function l(e,t){let n=[];for(let r of e.split(`
5
5
  `)){if(r.length<=t){n.push(r);continue}let e=r.split(/\s+/),i=``;for(let r of e)i?i.length+1+r.length<=t?i+=` `+r:(n.push(i),i=r):i=r;i&&n.push(i)}return n}export{r as a,a as i,l as n,i as o,o as r,c as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{readFileSync as e}from"node:fs";import{resolve as t}from"node:path";import{isDeepStrictEqual as n}from"node:util";function r(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 i(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 a(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 o(e,t=[],n){let r=a(e,`body`);if(n!==void 0&&Array.isArray(r)&&r.length>n)throw Error(`--body must contain at most ${n} items (received ${r.length}).`);for(let{path:e,flag:n}of t){let t=r;for(let n of e)t=s(t)&&Object.hasOwn(t,n)?t[n]:void 0;if(!s(t))throw Error(`--body must include a JSON object at ${e.join(`.`)} (for --${n}).`)}return r}function s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function c(e,t){let r=t.filter(({value:e})=>e!==void 0&&!(Array.isArray(e)&&e.length===0));if(r.length===0)return e;if(!s(e))throw Error(`--body must be a JSON object when combined with body positional arguments.`);for(let{name:t,field:i,value:a}of r)if(Object.hasOwn(e,i)&&!n(e[i],a))throw Error(`The <${t}> positional conflicts with "${i}" in --body.`);return{...e,...Object.fromEntries(r.map(({field:e,value:t})=>[e,t]))}}function l(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 u(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 i=a(e,t);if(!s(i))throw Error(`${r} must be a JSON object.`);return i}function d(e,t){return p(e,t,`objects`)}function f(e,t){return p(e,t,`arrays`)}function p(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 i=a(e,t);if(!Array.isArray(i)||i.some(e=>n===`arrays`?!Array.isArray(e):!s(e)))throw Error(`${r} must be a JSON array of ${n}.`);return i}export{f as a,r as c,u as i,c as n,d as o,o as r,l as s,i as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{d as e}from"./schema-flags-CXm9iIv6.mjs";function t(t,n){for(let r of n){let n=t;for(let e of r.path)n=typeof n==`object`&&n&&Object.hasOwn(n,e)?n[e]:void 0;if(n===void 0)continue;let i;if(`schema`in r)i=r.schema;else{let e=typeof n==`object`&&n?n[r.selector]:void 0;i=r.variants.find(t=>t.values.some(t=>t===e))?.schema??{oneOf:r.variants.map(e=>e.schema)}}let a=e(i,n);if(a.length>0)throw Error(`Invalid ${r.path.join(`.`)||`request body`}: ${a.join(`; `)}. Pass --body with a complete request body if it cannot be supplied as flags.`)}return t}export{t};
2
+ import{f as e}from"./schema-flags-DO3kLYBu.mjs";function t(t,n){for(let r of n){let n=t;for(let e of r.path)n=typeof n==`object`&&n&&Object.hasOwn(n,e)?n[e]:void 0;if(n===void 0)continue;let i;if(`schema`in r)i=r.schema;else{let e=typeof n==`object`&&n?n[r.selector]:void 0;i=r.variants.find(t=>t.values.some(t=>t===e))?.schema??{oneOf:r.variants.map(e=>e.schema)}}let a=e(i,n);if(a.length>0)throw Error(`Invalid ${r.path.join(`.`)||`request body`}: ${a.join(`; `)}. Pass --body with a complete request body if it cannot be supplied as flags.`)}return t}export{t};