cf 0.1.0 → 0.2.0

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 (248) hide show
  1. package/dist/_meta/agent-context.json +88 -88
  2. package/dist/_meta/commands.json +5268 -5350
  3. package/dist/_meta/schemas.json +33572 -1148
  4. package/dist/abuse-reports-KtfZhi6j.mjs +8 -0
  5. package/dist/accounts-BopMfODC.mjs +21 -0
  6. package/dist/acm-BT4vlnEJ.mjs +3 -0
  7. package/dist/addressing-B3uFxHst.mjs +13 -0
  8. package/dist/ai-DWHqwMap.mjs +2 -0
  9. package/dist/ai-gateway-CbKEO-3o.mjs +8 -0
  10. package/dist/ai-search-VnOQ5n--.mjs +7 -0
  11. package/dist/alerting-BmmgIlIO.mjs +6 -0
  12. package/dist/analytics-isY03taL.mjs +20 -0
  13. package/dist/api-gateway-DXurEbA-.mjs +33 -0
  14. package/dist/argo-B02BL_hp.mjs +2 -0
  15. package/dist/audit-logs-DcgR9xUc.mjs +2 -0
  16. package/dist/auth-CQcAgnOy.mjs +135 -0
  17. package/dist/{auth-DQ8miey6.mjs → auth-DenWm_X0.mjs} +3 -3
  18. package/dist/autorag-CmrwnGVj.mjs +2 -0
  19. package/dist/{billing-lwBHNTXC.mjs → billing-CaW1ZAB1.mjs} +1 -1
  20. package/dist/bot-management-CeBsFx68.mjs +5 -0
  21. package/dist/botnet-feed-B396vQeQ.mjs +3 -0
  22. package/dist/brand-protection-D4V1v5Kl.mjs +3 -0
  23. package/dist/browser-rendering-GF7rNtKI.mjs +4 -0
  24. package/dist/build-5jmmOZhm.mjs +1054 -0
  25. package/dist/cache-DmXizSMi.mjs +5 -0
  26. package/dist/calls-x4KQpTB4.mjs +4 -0
  27. package/dist/certificate-authorities-hC0SG-Ga.mjs +2 -0
  28. package/dist/client-certificates-BGVsDyeJ.mjs +3 -0
  29. package/dist/cloud-connector-BClQpEzI.mjs +2 -0
  30. package/dist/cloudforce-one-BfhFrO6M.mjs +21 -0
  31. package/dist/{config-BIfdEY0E.mjs → config-DYzlVxcB.mjs} +1 -1
  32. package/dist/connectivity-G0NP6LtW.mjs +3 -0
  33. package/dist/content-scanning-DEtPJ7aF.mjs +4 -0
  34. package/dist/context-CC0Rhkhy.mjs +2 -0
  35. package/dist/custom-certificates-rJXFpUWu.mjs +5 -0
  36. package/dist/custom-hostnames-Be5mgLeF.mjs +5 -0
  37. package/dist/custom-nameservers-CoFdy6hD.mjs +3 -0
  38. package/dist/custom-pages-D-oErw57.mjs +4 -0
  39. package/dist/d1-C95ckPKI.mjs +3 -0
  40. package/dist/dcv-delegation-CWSkbGuc.mjs +2 -0
  41. package/dist/delegate.mjs +1 -1
  42. package/dist/deploy-DbkiIzUr.mjs +2 -0
  43. package/dist/{dev-BfKYB-R_.mjs → dev-C6iSuQZm.mjs} +1 -1
  44. package/dist/diagnostics-DEEhPnXj.mjs +3 -0
  45. package/dist/dispatch-namespaces-BzXeV7PH.mjs +7 -0
  46. package/dist/{dist-C_bu5HwZ.mjs → dist-CnSubA1Z.mjs} +1 -1
  47. package/dist/dist-DNBSHor6.mjs +301 -0
  48. package/dist/dns-firewall-BQXD_NxG.mjs +57 -0
  49. package/dist/dns-qW-3TZOT.mjs +29 -0
  50. package/dist/durable-objects-CgWFYEJJ.mjs +2 -0
  51. package/dist/email-routing-tdNJaCpJ.mjs +10 -0
  52. package/dist/email-security-DTVHNr2h.mjs +60 -0
  53. package/dist/email-sending-DsFTvE31.mjs +3 -0
  54. package/dist/filters-DO1Is_tI.mjs +4 -0
  55. package/dist/firewall-DbUhVTCg.mjs +11 -0
  56. package/dist/fraud-Bzr4njYb.mjs +8 -0
  57. package/dist/google-tag-gateway-BQxkA90M.mjs +2 -0
  58. package/dist/healthchecks-BBAs-lS_.mjs +4 -0
  59. package/dist/hostnames-Dz9PEUKS.mjs +3 -0
  60. package/dist/hyperdrive-B1iUJddG.mjs +18 -0
  61. package/dist/iam-CJM8gHpG.mjs +6 -0
  62. package/dist/images-DEoBmtFS.mjs +5 -0
  63. package/dist/index.mjs +1 -1
  64. package/dist/intel-BM6xkZ0C.mjs +3 -0
  65. package/dist/{ips-B0cK7D0_.mjs → ips-B8fwxKZD.mjs} +1 -1
  66. package/dist/keyless-certificates-DffYnd4b.mjs +3 -0
  67. package/dist/kv-BTceLtWZ.mjs +5 -0
  68. package/dist/leaked-credential-checks-CALfvoCo.mjs +3 -0
  69. package/dist/load-balancers-C1Ho1gCF.mjs +6 -0
  70. package/dist/logpush-CSYhgevA.mjs +4 -0
  71. package/dist/logs-DlIwmMpt.mjs +3 -0
  72. package/dist/magic-cloud-networking-Czu0pZ0a.mjs +5 -0
  73. package/dist/magic-network-monitoring-d7GJE5Yt.mjs +4 -0
  74. package/dist/magic-transit-qQmA-981.mjs +89 -0
  75. package/dist/managed-transforms-Dd6AnbWE.mjs +3 -0
  76. package/dist/mtls-certificates-C0rlCRGs.mjs +3 -0
  77. package/dist/network-interconnects-CxG2deY0.mjs +36 -0
  78. package/dist/organizations-DyEAiGiR.mjs +41 -0
  79. package/dist/origin-ca-certificates-S8RcoMF6.mjs +3 -0
  80. package/dist/origin-post-quantum-encryption-B8ZcpLu5.mjs +2 -0
  81. package/dist/origin-tls-client-auth-BlxMmQrE.mjs +5 -0
  82. package/dist/page-rules-DP-w6TAm.mjs +18 -0
  83. package/dist/page-shield-Bf7kFp8c.mjs +37 -0
  84. package/dist/pages-D0Y_XRqW.mjs +10 -0
  85. package/dist/pipelines-C-SPESAk.mjs +6 -0
  86. package/dist/{progress-DZfTxbrx.mjs → progress-CjcQ6ato.mjs} +1 -1
  87. package/dist/queues-wv6CZsi8.mjs +6 -0
  88. package/dist/r2-DuXjp9n5.mjs +21 -0
  89. package/dist/r2-data-catalog-DQCMrmNO.mjs +14 -0
  90. package/dist/radar-BW_ZHP8X.mjs +2 -0
  91. package/dist/rate-limits-DLTkIvwr.mjs +5 -0
  92. package/dist/raw-fetch-hRv-6P3D.mjs +2 -0
  93. package/dist/realtime-kit-Ch7Vg3vj.mjs +6 -0
  94. package/dist/{registrar-7Qy50zbW.mjs → registrar-DIIv6fWd.mjs} +6 -6
  95. package/dist/request-tracers-DMej0Drs.mjs +2 -0
  96. package/dist/resource-sharing-CYJ7cMWq.mjs +5 -0
  97. package/dist/resource-tagging-Dnz65MgH.mjs +16 -0
  98. package/dist/rules-DLJpOYbC.mjs +4 -0
  99. package/dist/rulesets-D9nqEJT5.mjs +8 -0
  100. package/dist/rum-DBVmdPkp.mjs +4 -0
  101. package/dist/schema-validation-MCd3xdtX.mjs +4 -0
  102. package/dist/scim-DZA3VXog.mjs +3 -0
  103. package/dist/secrets-store-BrvcZSOM.mjs +21 -0
  104. package/dist/security-center-BU6f3Cm1.mjs +2 -0
  105. package/dist/security-txt-BPIbP3dG.mjs +3 -0
  106. package/dist/{session-mW-s8ghP.mjs → session-H7IV2BrM.mjs} +1 -1
  107. package/dist/shared-DEzmTsEC.mjs +2 -0
  108. package/dist/smart-shield-e8XFBkiF.mjs +3 -0
  109. package/dist/snippets-B4M3MMb8.mjs +4 -0
  110. package/dist/{spawn-D_cjG87Z.mjs → spawn-13QQ0IwO.mjs} +1 -1
  111. package/dist/spectrum-B0adfSRI.mjs +59 -0
  112. package/dist/speed-BVcUtkAz.mjs +4 -0
  113. package/dist/{src-C5qivNKH.mjs → src-B9cKsgsg.mjs} +8 -8
  114. package/dist/ssl-BAa91gsc.mjs +15 -0
  115. package/dist/stream-D53sxKb3.mjs +14 -0
  116. package/dist/tenants-bH5pt3dJ.mjs +2 -0
  117. package/dist/token-validation-M61Vx_Tw.mjs +4 -0
  118. package/dist/turnstile-wAU0Gc2Z.mjs +23 -0
  119. package/dist/{ui-mP_arYIg.mjs → ui-BXjU1dX1.mjs} +1 -1
  120. package/dist/url-normalization-DZrWDgB5.mjs +3 -0
  121. package/dist/url-scanner-Zo49edNp.mjs +2 -0
  122. package/dist/user-DbXlVReB.mjs +10 -0
  123. package/dist/vectorize-CUnTM0DT.mjs +4 -0
  124. package/dist/versions-DzyrlUAi.mjs +2 -0
  125. package/dist/waiting-rooms-BZW0X69-.mjs +11 -0
  126. package/dist/web3-DueyOQtx.mjs +4 -0
  127. package/dist/workers-builds-BM_aoeUR.mjs +7 -0
  128. package/dist/workers-nV_vBCfV.mjs +16 -0
  129. package/dist/workflows-CQITmo-s.mjs +4 -0
  130. package/dist/zaraz-DIbpF5Op.mjs +2 -0
  131. package/dist/zero-trust-CKp8j512.mjs +119 -0
  132. package/dist/zones-BZ5tZDbH.mjs +28 -0
  133. package/package.json +4 -4
  134. package/dist/abuse-reports-ChV_yD7f.mjs +0 -8
  135. package/dist/accounts-BCYecXFh.mjs +0 -21
  136. package/dist/acm-DD8zSds2.mjs +0 -3
  137. package/dist/addressing-D4Eqw5Bi.mjs +0 -13
  138. package/dist/ai-DfXMOMx_.mjs +0 -2
  139. package/dist/ai-gateway-DdRFthMo.mjs +0 -8
  140. package/dist/ai-search-C_68CDj1.mjs +0 -7
  141. package/dist/alerting-DbhqhVCp.mjs +0 -6
  142. package/dist/analytics-BSBBc7ep.mjs +0 -20
  143. package/dist/api-gateway-CZ4swbkQ.mjs +0 -33
  144. package/dist/argo-tms9ZwHO.mjs +0 -2
  145. package/dist/audit-logs-24qyW8cl.mjs +0 -2
  146. package/dist/auth-BlSmtIKd.mjs +0 -112
  147. package/dist/autorag-kgNt06GD.mjs +0 -2
  148. package/dist/bot-management-LKf7BqUr.mjs +0 -5
  149. package/dist/botnet-feed-nQ-gErTS.mjs +0 -3
  150. package/dist/brand-protection-DOKv9GRr.mjs +0 -3
  151. package/dist/browser-rendering-CBExtgGt.mjs +0 -4
  152. package/dist/build-C_48VvoK.mjs +0 -1056
  153. package/dist/cache-BBiiNZHP.mjs +0 -5
  154. package/dist/calls-DA5Xzwev.mjs +0 -4
  155. package/dist/certificate-authorities-sXyR_yGp.mjs +0 -2
  156. package/dist/client-certificates-tV0aCLQJ.mjs +0 -3
  157. package/dist/cloud-connector-DZfHcSso.mjs +0 -2
  158. package/dist/cloudforce-one-y1PgQmI9.mjs +0 -21
  159. package/dist/connectivity-8SOqaFDn.mjs +0 -3
  160. package/dist/content-scanning-B9y6K_G5.mjs +0 -4
  161. package/dist/context-DTIbtQn5.mjs +0 -2
  162. package/dist/custom-certificates-sWksR8Ys.mjs +0 -5
  163. package/dist/custom-hostnames-91QZkdqN.mjs +0 -5
  164. package/dist/custom-nameservers-DajZaZvE.mjs +0 -3
  165. package/dist/custom-pages-Cu7gmwzT.mjs +0 -4
  166. package/dist/d1-H_VRsVmF.mjs +0 -3
  167. package/dist/dcv-delegation-C-qhEYEZ.mjs +0 -2
  168. package/dist/deploy--9wYOkHg.mjs +0 -2
  169. package/dist/diagnostics-D2B2LPZZ.mjs +0 -3
  170. package/dist/dispatch-namespaces-CyrXBU_w.mjs +0 -7
  171. package/dist/dist-DvKjT2TT.mjs +0 -303
  172. package/dist/dns-Bn9Uz_Nj.mjs +0 -29
  173. package/dist/dns-firewall-BslP4p-j.mjs +0 -57
  174. package/dist/durable-objects-BN1ZnHhm.mjs +0 -2
  175. package/dist/email-routing-n2TnTaRR.mjs +0 -10
  176. package/dist/email-security-C9SEx0kh.mjs +0 -60
  177. package/dist/email-sending-DayZ7u3I.mjs +0 -3
  178. package/dist/filters-CI_XTgfQ.mjs +0 -4
  179. package/dist/firewall-CcaayGig.mjs +0 -11
  180. package/dist/fraud-Cr7aPCV8.mjs +0 -8
  181. package/dist/google-tag-gateway-B3GpYgQ4.mjs +0 -2
  182. package/dist/healthchecks-CVTsR_OC.mjs +0 -4
  183. package/dist/hostnames-Bd_Wa5l6.mjs +0 -3
  184. package/dist/hyperdrive-BBJhEDZd.mjs +0 -18
  185. package/dist/iam-D_FN0pDF.mjs +0 -6
  186. package/dist/images-CAP2hAlZ.mjs +0 -5
  187. package/dist/intel-CkxfzqmJ.mjs +0 -3
  188. package/dist/keyless-certificates-LcLmHZsX.mjs +0 -3
  189. package/dist/kv-_TkUQ6fs.mjs +0 -5
  190. package/dist/leaked-credential-checks-Dhvaen22.mjs +0 -3
  191. package/dist/load-balancers-Ckr0UIpk.mjs +0 -6
  192. package/dist/logpush-Cj946hxT.mjs +0 -4
  193. package/dist/logs-DgC9hjvJ.mjs +0 -3
  194. package/dist/magic-cloud-networking-WbDvPzuG.mjs +0 -5
  195. package/dist/magic-network-monitoring-BcHShvGQ.mjs +0 -4
  196. package/dist/magic-transit-B8sCOkt_.mjs +0 -89
  197. package/dist/managed-transforms-BpOr-8HY.mjs +0 -3
  198. package/dist/mtls-certificates-fOul8D5g.mjs +0 -3
  199. package/dist/network-interconnects-BSW65xlh.mjs +0 -36
  200. package/dist/organizations-T4vKGFAb.mjs +0 -41
  201. package/dist/origin-ca-certificates-ChM0lZ64.mjs +0 -3
  202. package/dist/origin-post-quantum-encryption-C7o26ARh.mjs +0 -2
  203. package/dist/origin-tls-client-auth-D32dpZk_.mjs +0 -5
  204. package/dist/page-rules-RFoj8CjN.mjs +0 -18
  205. package/dist/page-shield-VTktzKDN.mjs +0 -37
  206. package/dist/pages-L1ITjXDZ.mjs +0 -10
  207. package/dist/pipelines-BPO0Lnil.mjs +0 -6
  208. package/dist/queues-B0C06L9r.mjs +0 -6
  209. package/dist/r2-DP020Tmq.mjs +0 -21
  210. package/dist/r2-data-catalog-Dmipvz5F.mjs +0 -14
  211. package/dist/radar-DR3VMknH.mjs +0 -2
  212. package/dist/rate-limits-DnHPBPgU.mjs +0 -5
  213. package/dist/raw-fetch-DlXYwVA8.mjs +0 -2
  214. package/dist/realtime-kit-C430aq2d.mjs +0 -6
  215. package/dist/request-tracers-sv99NDIl.mjs +0 -2
  216. package/dist/resource-sharing-uEjC7lnQ.mjs +0 -5
  217. package/dist/resource-tagging-CiODdP3N.mjs +0 -16
  218. package/dist/rules-FXAyTrwk.mjs +0 -4
  219. package/dist/rulesets-B6aUsFFB.mjs +0 -8
  220. package/dist/rum-CyyGJhp5.mjs +0 -4
  221. package/dist/schema-validation-ByU49h--.mjs +0 -4
  222. package/dist/scim-DdTS65_C.mjs +0 -3
  223. package/dist/secrets-store-ClOUVhBJ.mjs +0 -18
  224. package/dist/security-center-4iSBqTrf.mjs +0 -2
  225. package/dist/security-txt-kGxdkDY6.mjs +0 -3
  226. package/dist/smart-shield-B-SQd2Qp.mjs +0 -3
  227. package/dist/snippets-Aq58ojqw.mjs +0 -4
  228. package/dist/spectrum-0gFvGI6y.mjs +0 -59
  229. package/dist/speed-DAZU8w3T.mjs +0 -4
  230. package/dist/ssl-BRlXa-5w.mjs +0 -15
  231. package/dist/stream-BAxsVeBX.mjs +0 -14
  232. package/dist/tenants-Df6xDqoA.mjs +0 -2
  233. package/dist/token-validation-pO4dCjCy.mjs +0 -4
  234. package/dist/turnstile-B1dmO8wE.mjs +0 -23
  235. package/dist/url-normalization-sUDVmrUt.mjs +0 -3
  236. package/dist/url-scanner-CwOKRkYo.mjs +0 -2
  237. package/dist/user-D_UrIdNq.mjs +0 -10
  238. package/dist/vectorize-BEbBn9G9.mjs +0 -4
  239. package/dist/waiting-rooms-BQC-urV4.mjs +0 -11
  240. package/dist/web3-CIH2iQeX.mjs +0 -4
  241. package/dist/workers-B9EvrpH3.mjs +0 -16
  242. package/dist/workers-builds-DzWSiRd2.mjs +0 -7
  243. package/dist/workflows-aD81gA4k.mjs +0 -4
  244. package/dist/zaraz-Cg1dsvrZ.mjs +0 -2
  245. package/dist/zero-trust-D-xQXWcy.mjs +0 -119
  246. package/dist/zones-DQzucJDd.mjs +0 -28
  247. /package/dist/{schema-D0_cbcDt.mjs → schema-CHBfkARI.mjs} +0 -0
  248. /package/dist/{tools-CtKbk6VS.mjs → tools-B7QiNu-d.mjs} +0 -0
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import{T as e,h as t,t as n,w as r,x as i}from"./auth-CQcAgnOy.mjs";import{n as a,t as o}from"./body-parser-Br-BoYk-.mjs";import{t as s}from"./output-D7_yAFVR.mjs";import{n as c,t as l}from"./progress-CjcQ6ato.mjs";import{n as u}from"./input-validation-zEO81MWN.mjs";import{t as d}from"./local-VJaJ3BZ1.mjs";function f(e){return e.positional(`report-param`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
3
+ `}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
4
+ `,choices:[`send`,`send-anon`]}).option(`original-work`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
5
+ `}).option(`owner-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
6
+ `,choices:[`send`,`send-anon`,`none`]}).option(`signature`,{type:`string`,description:`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`}).option(`state`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`justification`,{type:`string`,description:`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.
7
+ `}).option(`trademark-number`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-office`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-symbol`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`destination-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ports-protocols`,{type:`string`,description:`A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual port/protocol should not exceed 100 characters. The list should not have more than 30 unique ports and protocols.`}).option(`source-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ncmec-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
8
+ `,choices:[`send`,`send-anon`]}).option(`reg-who-request-reg-who-authorization-statement`,{type:`string`,description:`Optional authorization statement or power of attorney per RDP 10.2.1.3.`}).option(`reg-who-request-reg-who-good-faith-affirmation`,{type:`boolean`,description:`Affirmation that the request is made in good faith per RDP 10.2.4. Must be true.`}).option(`reg-who-request-reg-who-lawful-processing-agreement`,{type:`boolean`,description:`Agreement to process data lawfully per RDP 10.2.5. Must be true.`}).option(`reg-who-request-reg-who-legal-basis`,{type:`string`,description:`Legal rights and rationale for the request per RDP 10.2.3. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-request-type`,{type:`string`,description:`The type of WHOIS data request per RDP procedure.`,choices:[`disclosure`,`invalid_whois`]}).option(`reg-who-request-reg-who-requested-data-elements`,{type:`string`,array:!0,description:`The specific WHOIS data elements being requested per RDP 10.2.2. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-requestor-type`,{type:`string`,description:`The nature of the requestor per RDP 10.2.1.2.`,choices:[`government`,`corporation`,`individual`]}).option(`ncsei-subject-representation`,{type:`boolean`,description:`If the submitter is the target of NCSEI in the URLs of the abuse report.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`address1`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`address1`,[`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agent-name`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agent-name`,[`address1`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agree`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agree`,[`address1`,`agent-name`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`city`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`city`,[`address1`,`agent-name`,`agree`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`country`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`original-work`]).implies(`country`,[`address1`,`agent-name`,`agree`,`city`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`host-notification`,[`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).conflicts(`original-work`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`,`country`]).implies(`original-work`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`signature`,`state`]).conflicts(`signature`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`signature`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`state`]).conflicts(`state`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`state`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`]).conflicts(`justification`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`trademark-number`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-number`,[`host-notification`,`justification`,`trademark-office`,`trademark-symbol`]).conflicts(`trademark-office`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-office`,[`host-notification`,`justification`,`trademark-number`,`trademark-symbol`]).conflicts(`trademark-symbol`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-symbol`,[`host-notification`,`justification`,`trademark-number`,`trademark-office`]).conflicts(`destination-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ports-protocols`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`source-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ncmec-notification`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`ncmec-notification`,[`host-notification`,`justification`]).conflicts(`reg-who-request-reg-who-authorization-statement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-good-faith-affirmation`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-lawful-processing-agreement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-legal-basis`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-request-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requested-data-elements`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requestor-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`ncsei-subject-representation`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).implies(`ncsei-subject-representation`,[`host-notification`]).check(e=>{if([`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`].some(t=>e[t]!==void 0)){let t={"reg-who-request-reg-who-good-faith-affirmation":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-lawful-processing-agreement":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-legal-basis":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-request-type":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-requested-data-elements":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]},n=[`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --reg_who_request-* flag is set`)}return!0})}const p={command:`create <report-param>`,describe:`Submit the Abuse Report of a particular type`,builder:f,handler:async f=>{if(f.dryRun){c({command:`cf abuse-reports create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/abuse-reports/${f[`report-param`]==null?`<report-param>`:encodeURIComponent(String(f[`report-param`]))}`,pathParams:{"report-param":String(f[`report-param`]??``)},bodyKind:`json`,body:{comments:f.comments,company:f.company,email:f.email,email2:f.email2,name:f.name,"reported-country":f[`reported-country`],"reported-user-agent":f[`reported-user-agent`],tele:f.tele,title:f.title,urls:f.urls,address1:f.address1,"agent-name":f[`agent-name`],agree:f.agree,city:f.city,country:f.country,"host-notification":f[`host-notification`],"original-work":f[`original-work`],"owner-notification":f[`owner-notification`],signature:f.signature,state:f.state,justification:f.justification,"trademark-number":f[`trademark-number`],"trademark-office":f[`trademark-office`],"trademark-symbol":f[`trademark-symbol`],"destination-ips":f[`destination-ips`],"ports-protocols":f[`ports-protocols`],"source-ips":f[`source-ips`],"ncmec-notification":f[`ncmec-notification`],"reg-who-request-reg-who-authorization-statement":f[`reg-who-request-reg-who-authorization-statement`],"reg-who-request-reg-who-good-faith-affirmation":f[`reg-who-request-reg-who-good-faith-affirmation`],"reg-who-request-reg-who-lawful-processing-agreement":f[`reg-who-request-reg-who-lawful-processing-agreement`],"reg-who-request-reg-who-legal-basis":f[`reg-who-request-reg-who-legal-basis`],"reg-who-request-reg-who-request-type":f[`reg-who-request-reg-who-request-type`],"reg-who-request-reg-who-requested-data-elements":f[`reg-who-request-reg-who-requested-data-elements`],"reg-who-request-reg-who-requestor-type":f[`reg-who-request-reg-who-requestor-type`],"ncsei-subject-representation":f[`ncsei-subject-representation`],body:f.body}});return}let p=await n(f),m=f.local?d:await t(p);if(f.accountId=m,f.body){let e=o(f.body);s(await l(`Creating`,async()=>p.post(`/accounts/${m}/abuse-reports/${encodeURIComponent(String(f[`report-param`]))}`,{body:e})),{successLabel:`Created`});return}f.email===void 0&&(f.email=await e(`email`,`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),f.email2===void 0&&(f.email2=await e(`email2`,"Should match the value provided in `email`")),f.name===void 0&&(f.name=await e(`name`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),f.urls===void 0&&(f.urls=await e(`urls`,`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),f[`owner-notification`]===void 0&&(f[`owner-notification`]=await r(`owner-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,[`send`,`send-anon`,`none`]));let h={};f.comments!==void 0&&a(h,[`comments`],u(f.comments,`comments`,`text`)),f.company!==void 0&&a(h,[`company`],u(f.company,`company`,`text`)),f.email!==void 0&&a(h,[`email`],u(f.email,`email`,`text`)),f.email2!==void 0&&a(h,[`email2`],u(f.email2,`email2`,`text`)),f.name!==void 0&&a(h,[`name`],u(f.name,`name`,`text`)),f[`reported-country`]!==void 0&&a(h,[`reported_country`],u(f[`reported-country`],`reported-country`,`text`)),f[`reported-user-agent`]!==void 0&&a(h,[`reported_user_agent`],u(f[`reported-user-agent`],`reported-user-agent`,`text`)),f.tele!==void 0&&a(h,[`tele`],u(f.tele,`tele`,`text`)),f.title!==void 0&&a(h,[`title`],u(f.title,`title`,`text`)),f.urls!==void 0&&a(h,[`urls`],u(f.urls,`urls`,`text`)),f.address1!==void 0&&a(h,[`address1`],u(f.address1,`address1`,`text`)),f[`agent-name`]!==void 0&&a(h,[`agent_name`],u(f[`agent-name`],`agent-name`,`text`)),f.agree!==void 0&&a(h,[`agree`],f.agree),f.city!==void 0&&a(h,[`city`],u(f.city,`city`,`text`)),f.country!==void 0&&a(h,[`country`],u(f.country,`country`,`text`)),f[`host-notification`]!==void 0&&a(h,[`host_notification`],u(f[`host-notification`],`host-notification`,`text`)),f[`original-work`]!==void 0&&a(h,[`original_work`],u(f[`original-work`],`original-work`,`text`)),f[`owner-notification`]!==void 0&&a(h,[`owner_notification`],u(f[`owner-notification`],`owner-notification`,`text`)),f.signature!==void 0&&a(h,[`signature`],u(f.signature,`signature`,`text`)),f.state!==void 0&&a(h,[`state`],u(f.state,`state`,`text`)),f.justification!==void 0&&a(h,[`justification`],u(f.justification,`justification`,`text`)),f[`trademark-number`]!==void 0&&a(h,[`trademark_number`],u(f[`trademark-number`],`trademark-number`,`text`)),f[`trademark-office`]!==void 0&&a(h,[`trademark_office`],u(f[`trademark-office`],`trademark-office`,`text`)),f[`trademark-symbol`]!==void 0&&a(h,[`trademark_symbol`],u(f[`trademark-symbol`],`trademark-symbol`,`text`)),f[`destination-ips`]!==void 0&&a(h,[`destination_ips`],u(f[`destination-ips`],`destination-ips`,`text`)),f[`ports-protocols`]!==void 0&&a(h,[`ports_protocols`],u(f[`ports-protocols`],`ports-protocols`,`text`)),f[`source-ips`]!==void 0&&a(h,[`source_ips`],u(f[`source-ips`],`source-ips`,`text`)),f[`ncmec-notification`]!==void 0&&a(h,[`ncmec_notification`],u(f[`ncmec-notification`],`ncmec-notification`,`text`)),f[`reg-who-request-reg-who-authorization-statement`]!==void 0&&a(h,[`reg_who_request`,`reg_who_authorization_statement`],u(f[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`)),f[`reg-who-request-reg-who-good-faith-affirmation`]!==void 0&&a(h,[`reg_who_request`,`reg_who_good_faith_affirmation`],f[`reg-who-request-reg-who-good-faith-affirmation`]),f[`reg-who-request-reg-who-lawful-processing-agreement`]!==void 0&&a(h,[`reg_who_request`,`reg_who_lawful_processing_agreement`],f[`reg-who-request-reg-who-lawful-processing-agreement`]),f[`reg-who-request-reg-who-legal-basis`]!==void 0&&a(h,[`reg_who_request`,`reg_who_legal_basis`],u(f[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`)),f[`reg-who-request-reg-who-request-type`]!==void 0&&a(h,[`reg_who_request`,`reg_who_request_type`],u(f[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`)),f[`reg-who-request-reg-who-requested-data-elements`]!==void 0&&a(h,[`reg_who_request`,`reg_who_requested_data_elements`],f[`reg-who-request-reg-who-requested-data-elements`]),f[`reg-who-request-reg-who-requestor-type`]!==void 0&&a(h,[`reg_who_request`,`reg_who_requestor_type`],u(f[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)),f[`ncsei-subject-representation`]!==void 0&&a(h,[`ncsei_subject_representation`],f[`ncsei-subject-representation`]),s(await l(`Creating`,async()=>p.post(`/accounts/${m}/abuse-reports/${encodeURIComponent(String(f[`report-param`]))}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created`})}};function m(e){return e.option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1)`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`list`,describe:`List emails sent to the customer for an abuse report. Returns all successful customer emails sent for the specified abuse report. Does not include emails sent to hosts or submitters.`,builder:m,handler:async e=>{let r={page:e.page,per_page:e[`per-page`]};if(e.dryRun){c({command:`cf abuse-reports emails list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/abuse-reports/${e[`report-id`]==null?`<report-id>`:encodeURIComponent(String(e[`report-id`]))}/emails`,pathParams:{"report-id":String(e[`report-id`]??``)},query:r,bodyKind:`none`});return}let a=await n(e),o=e.local?d:await t(a);e.accountId=o,s(await l(`Loading`,async()=>a.abuseReports.emails.list(o,e[`report-id`],r)),{successLabel:`Loaded`})}},g={command:`emails`,describe:`Emails operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.positional(`report-param`,{type:`string`,description:`Identifier of the abuse report`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <report-param>`,describe:`Retrieve the details of an abuse report.`,builder:_,handler:async e=>{if(e.dryRun){c({command:`cf abuse-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/abuse-reports/${e[`report-param`]==null?`<report-param>`:encodeURIComponent(String(e[`report-param`]))}`,pathParams:{"report-param":String(e[`report-param`]??``)},bodyKind:`none`});return}let r=await n(e),a=e.local?d:await t(r);e.accountId=a,s(await l(`Loading`,async()=>r.abuseReports.get(a,e[`report-param`])),{successLabel:`Loaded`})}};function y(e){return e.option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order (id, cdate, domain, type, status)`}).option(`domain`,{type:`string`,description:`Filter by domain name related to the abuse report`}).option(`created-before`,{type:`string`,description:`Returns reports created before the specified date`}).option(`created-after`,{type:`string`,description:`Returns reports created after the specified date`}).option(`status`,{type:`string`,description:`Filter by the status of the report.`,choices:[`accepted`,`in_review`]}).option(`type`,{type:`string`,description:`Filter by the type of the report.`,choices:[`PHISH`,`GEN`,`THREAT`,`DMCA`,`EMER`,`TM`,`REG_WHO`,`NCSEI`,`NETWORK`]}).option(`mitigation-status`,{type:`string`,description:`Filter reports that have any mitigations in the given status.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List the abuse reports for a given account`,builder:y,handler:async e=>{let r={page:e.page,per_page:e[`per-page`],sort:e.sort,domain:e.domain,created_before:e[`created-before`],created_after:e[`created-after`],status:e.status,type:e.type,mitigation_status:e[`mitigation-status`]};if(e.dryRun){c({command:`cf abuse-reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/abuse-reports`,pathParams:{},query:r,bodyKind:`none`});return}let a=await n(e),o=e.local?d:await t(a);e.accountId=o,s(await l(`Loading`,async()=>a.abuseReports.list(o,r)),{successLabel:`Loaded`})}};function x(e){return e.option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order`,choices:[`type,asc`,`type,desc`,`effective_date,asc`,`effective_date,desc`,`status,asc`,`status,desc`,`entity_type,asc`,`entity_type,desc`]}).option(`type`,{type:`string`,description:`Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set, e.g. ?type=rate_limit_cache&type=legal_block.`,choices:[`legal_block`,`misleading_interstitial`,`phishing_interstitial`,`network_block`,`rate_limit_cache`,`account_suspend`,`redirect_video_stream`]}).option(`effective-before`,{type:`string`,description:`Returns mitigations that were dispatched before the given date`}).option(`effective-after`,{type:`string`,description:`Returns mitigation that were dispatched after the given date`}).option(`status`,{type:`string`,description:`Filter by the status of the mitigation.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`entity-type`,{type:`string`,description:`Filter by the type of entity the mitigation impacts.`,choices:[`url_pattern`,`account`,`zone`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List mitigations done to remediate the abuse report.`,builder:x,handler:async e=>{let r={page:e.page,per_page:e[`per-page`],sort:e.sort,type:e.type,effective_before:e[`effective-before`],effective_after:e[`effective-after`],status:e.status,entity_type:e[`entity-type`]};if(e.dryRun){c({command:`cf abuse-reports mitigations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/abuse-reports/${e[`report-id`]==null?`<report-id>`:encodeURIComponent(String(e[`report-id`]))}/mitigations`,pathParams:{"report-id":String(e[`report-id`]??``)},query:r,bodyKind:`none`});return}let a=await n(e),o=e.local?d:await t(a);e.accountId=o,s(await l(`Loading`,async()=>a.abuseReports.mitigations.list(o,e[`report-id`],r)),{successLabel:`Loaded`})}};function C(e){return e.positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`review <report-id>`,describe:`Request a review for mitigations on an account.`,builder:C,handler:async e=>{if(e.dryRun){c({command:`cf abuse-reports mitigations review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/abuse-reports/${e[`report-id`]==null?`<report-id>`:encodeURIComponent(String(e[`report-id`]))}/mitigations/appeal`,pathParams:{"report-id":String(e[`report-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let r=await n(e),a=e.local?d:await t(r);if(e.accountId=a,e.body){let t=o(e.body);s(await l(`Creating`,async()=>r.post(`/accounts/${a}/abuse-reports/${encodeURIComponent(String(e[`report-id`]))}/mitigations/appeal`,{body:t})),{successLabel:`Created`});return}s(await l(`Creating`,async()=>r.abuseReports.mitigations.review(a,e[`report-id`])),{successLabel:`Created`})}},T={command:`mitigations`,describe:`Mitigation actions taken in response to abuse reports`,builder:e=>e.command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`abuse-reports`,describe:`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,builder:e=>e.command(p).command(v).command(b).command(g).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{E as default};
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import{C as e,T as t,h as n,t as r,x as i}from"./auth-CQcAgnOy.mjs";import{n as a,t as o}from"./body-parser-Br-BoYk-.mjs";import{t as s}from"./output-D7_yAFVR.mjs";import{n as c,t as l}from"./progress-CjcQ6ato.mjs";import{n as u}from"./input-validation-zEO81MWN.mjs";import{t as d}from"./local-VJaJ3BZ1.mjs";function f(e){return e.option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const p={command:`create`,describe:`Move an account within an organization hierarchy or an account outside an organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:f,handler:async e=>{if(e.dryRun){c({command:`cf accounts account-organizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:{"destination-organization-id":e[`destination-organization-id`],body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Creating`,async()=>f.post(`/accounts/${p}/move`,{body:t})),{successLabel:`Created`});return}e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await t(`destination-organization-id`,`The destination_organization_id field`));let m={};e[`destination-organization-id`]!==void 0&&a(m,[`destination_organization_id`],u(e[`destination-organization-id`],`destination-organization-id`,`text`)),s(await l(`Creating`,async()=>f.post(`/accounts/${p}/move`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}},m={command:`account-organizations`,describe:`Move accounts between organizations`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ee(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get`,describe:`Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`,builder:ee,handler:async e=>{if(e.dryRun){c({command:`cf accounts account-profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.accountProfile.get(a)),{successLabel:`Loaded`})}};function h(e){return e.option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata 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 g={command:`update`,describe:`Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`,builder:h,handler:async e=>{if(e.dryRun){c({command:`cf accounts account-profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:{"business-address":e[`business-address`],"business-email":e[`business-email`],"business-name":e[`business-name`],"business-phone":e[`business-phone`],"external-metadata":e[`external-metadata`],body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Updating`,async()=>f.put(`/accounts/${p}/profile`,{body:t})),{successLabel:`Updated`});return}e[`business-address`]===void 0&&(e[`business-address`]=await t(`business-address`,`The business_address field`)),e[`business-email`]===void 0&&(e[`business-email`]=await t(`business-email`,`The business_email field`)),e[`business-name`]===void 0&&(e[`business-name`]=await t(`business-name`,`The business_name field`)),e[`business-phone`]===void 0&&(e[`business-phone`]=await t(`business-phone`,`The business_phone field`)),e[`external-metadata`]===void 0&&(e[`external-metadata`]=await t(`external-metadata`,`The external_metadata field`));let m={};e[`business-address`]!==void 0&&a(m,[`business_address`],u(e[`business-address`],`business-address`,`text`)),e[`business-email`]!==void 0&&a(m,[`business_email`],u(e[`business-email`],`business-email`,`text`)),e[`business-name`]!==void 0&&a(m,[`business_name`],u(e[`business-name`],`business-name`,`text`)),e[`business-phone`]!==void 0&&a(m,[`business_phone`],u(e[`business-phone`],`business-phone`,`text`)),e[`external-metadata`]!==void 0&&a(m,[`external_metadata`],u(e[`external-metadata`],`external-metadata`,`text`)),s(await l(`Updating`,async()=>f.put(`/accounts/${p}/profile`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}},_={command:`account-profile`,describe:`View and manage the profile for a Cloudflare account`,builder:e=>e.command(te).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`filter`,{type:`string`,description:`Filter applications using key:value format. Supported filter keys:
3
+ - name: Filter by application name (e.g., name:HR)
4
+ - id: Filter by application ID (e.g., id:0b63249c-95bf-4cc0-a7cc-d7faaaf1dac0)
5
+ - human_id: Filter by human-readable ID (e.g., human_id:HR)
6
+ - hostname: Filter by hostname or support domain (e.g., hostname:portal.example.com)
7
+ - source: Filter by application source name (e.g., source:cloudflare)
8
+ - ip_subnet: Filter by IP subnet using CIDR containment — returns applications where any stored subnet contains the search value (e.g., ip_subnet:10.0.1.5/32 matches apps with 10.0.0.0/16)
9
+ - intel_id: Filter by Intel API ID (e.g., intel_id:498).
10
+ .`}).option(`limit`,{type:`number`,description:`Limit of number of results to return (max 250).`}).option(`offset`,{type:`number`,description:`Offset of results to return.`}).option(`order-by`,{type:`string`,description:`Order by result by field name and order (e.g., name:asc).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`applications`,describe:`List applications with different filters.`,builder:v,handler:async e=>{let t={filter:e.filter,limit:e.limit,offset:e.offset,order_by:e[`order-by`]};if(e.dryRun){c({command:`cf accounts applications get applications`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/resource-library/applications`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.applications.get.applications(o,t)),{successLabel:`Loaded`})}};function b(e){return e.positional(`id`,{type:`string`,description:`Application ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`id <id>`,describe:`Get application by ID.`,builder:b,handler:async e=>{if(e.dryRun){c({command:`cf accounts applications get by id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/resource-library/applications/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.applications.get.by.id(a,e.id)),{successLabel:`Loaded`})}},S={command:`by`,describe:`Applications operations`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`get`,describe:`Applications operations`,builder:e=>e.command(y).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`applications`,describe:`Operations for applications`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`id`,{type:`string`,description:`Application category ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`id <id>`,describe:`Get application category by ID.`,builder:T,handler:async e=>{if(e.dryRun){c({command:`cf accounts categories get by id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/resource-library/categories/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.categories.get.by.id(a,e.id)),{successLabel:`Loaded`})}},D={command:`by`,describe:`Categories operations`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.option(`limit`,{type:`number`,description:`Limit of number of results to return.`}).option(`offset`,{type:`number`,description:`Offset of results to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`categories`,describe:`List application categories.`,builder:O,handler:async e=>{let t={limit:e.limit,offset:e.offset};if(e.dryRun){c({command:`cf accounts categories get categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/resource-library/categories`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.categories.get.categories(o,t)),{successLabel:`Loaded`})}},A={command:`get`,describe:`Categories operations`,builder:e=>e.command(k).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`categories`,describe:`Operations for categories`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.option(`name`,{type:`string`,description:`Account name`}).option(`unit-id`,{type:`string`,description:`Tenant unit ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Parameters for account creation`})}const N={command:`create`,describe:`Create an account (only available for tenant admins at this time)`,builder:M,handler:async e=>{if(e.dryRun){c({command:`cf accounts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts`,pathParams:{},bodyKind:`json`,body:{name:e.name,"unit-id":e[`unit-id`],body:e.body}});return}let n=await r(e);if(e.body){let t=o(e.body);s(await l(`Creating`,async()=>n.post(`/accounts`,{body:t})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await t(`name`,`Account name`));let i={};e.name!==void 0&&a(i,[`name`],u(e.name,`name`,`text`)),e[`unit-id`]!==void 0&&a(i,[`unit`,`id`],u(e[`unit-id`],`unit-id`,`text`)),s(await l(`Creating`,async()=>n.post(`/accounts`,{body:Object.keys(i).length>0?i:void 0})),{successLabel:`Created`})}};function P(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete`,describe:`Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account`,builder:P,handler:async t=>{if(t.dryRun){c({command:`cf accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}`,pathParams:{},bodyKind:`none`});return}let a=await r(t),o=t.local?d:await n(a);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
11
+ `);return}s(await l(`Deleting`,async()=>a.accounts.delete(o)),{successLabel:`Deleted`})}};function I(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get`,describe:`Get information about a specific account that you are a member of.`,builder:I,handler:async e=>{if(e.dryRun){c({command:`cf accounts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}`,pathParams:{},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.get(a)),{successLabel:`Loaded`})}};function R(e){return e.option(`name`,{type:`string`,description:`Name of the account.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List all accounts you have ownership or verified access to.`,builder:R,handler:async e=>{let t={name:e.name,page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){c({command:`cf accounts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts`,pathParams:{},query:t,bodyKind:`none`});return}let n=await r(e);s(await l(`Loading`,async()=>n.accounts.list(t)),{successLabel:`Loaded`})}};function B(e){return e.option(`account-name`,{type:`string`,description:`Filters by the account name.`}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:`Filters by the actor context.`}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`audit-log-id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.`}).option(`zone-id`,{type:`string`,description:`Filters by the zone ID.`}).option(`zone-name`,{type:`string`,description:`Filters by the zone name associated with the change.`}).option(`account-name-not`,{type:`string`,description:`Filters out audit logs by the account name.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:`Filters out audit logs by the actor context.`}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor ID. This can be either the Account ID or User ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`audit-log-id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.`}).option(`zone-id-not`,{type:`string`,description:`Filters out audit logs by the zone ID.`}).option(`zone-name-not`,{type:`string`,description:`Filters out audit logs by the zone name associated with the change.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`Gets a list of audit logs for an account.`,builder:B,handler:async e=>{let t={account_name:e[`account-name`],action_result:e[`action-result`],action_type:e[`action-type`],actor_context:e[`actor-context`],actor_email:e[`actor-email`],actor_id:e[`actor-id`],actor_ip_address:e[`actor-ip-address`],actor_token_id:e[`actor-token-id`],actor_token_name:e[`actor-token-name`],actor_type:e[`actor-type`],audit_log_id:e[`audit-log-id`],id:e.id,raw_cf_ray_id:e[`raw-cf-ray-id`],raw_method:e[`raw-method`],raw_status_code:e[`raw-status-code`],raw_uri:e[`raw-uri`],resource_id:e[`resource-id`],resource_product:e[`resource-product`],resource_type:e[`resource-type`],resource_scope:e[`resource-scope`],zone_id:e[`zone-id`],zone_name:e[`zone-name`],"account_name.not":e[`account-name-not`],"action_result.not":e[`action-result-not`],"action_type.not":e[`action-type-not`],"actor_context.not":e[`actor-context-not`],"actor_email.not":e[`actor-email-not`],"actor_id.not":e[`actor-id-not`],"actor_ip_address.not":e[`actor-ip-address-not`],"actor_token_id.not":e[`actor-token-id-not`],"actor_token_name.not":e[`actor-token-name-not`],"actor_type.not":e[`actor-type-not`],"audit_log_id.not":e[`audit-log-id-not`],"id.not":e[`id-not`],"raw_cf_ray_id.not":e[`raw-cf-ray-id-not`],"raw_method.not":e[`raw-method-not`],"raw_status_code.not":e[`raw-status-code-not`],"raw_uri.not":e[`raw-uri-not`],"resource_id.not":e[`resource-id-not`],"resource_product.not":e[`resource-product-not`],"resource_type.not":e[`resource-type-not`],"resource_scope.not":e[`resource-scope-not`],"zone_id.not":e[`zone-id-not`],"zone_name.not":e[`zone-name-not`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){c({command:`cf accounts logs audit list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/logs/audit`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.logs.audit.list(o,t)),{successLabel:`Loaded`})}},H={command:`audit`,describe:`Retrieve audit log entries that record actions taken on the account`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`roles`,{type:`string`,array:!0,description:`Array of roles associated with this member.`}).option(`status`,{type:`string`,description:`Status of the member invitation. If not provided during creation, defaults to 'pending'.
12
+ Changing from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.
13
+ `,choices:[`accepted`,`pending`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`create`,describe:`Add a user to the list of members for this account.`,builder:W,handler:async e=>{if(e.dryRun){c({command:`cf accounts members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/members`,pathParams:{},bodyKind:`json`,body:{email:e.email,roles:e.roles,status:e.status,body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Creating`,async()=>f.post(`/accounts/${p}/members`,{body:t})),{successLabel:`Created`});return}e.email===void 0&&(e.email=await t(`email`,`The contact email address of the user.`));let m={};e.email!==void 0&&a(m,[`email`],u(e.email,`email`,`text`)),e.roles!==void 0&&a(m,[`roles`],e.roles),e.status!==void 0&&a(m,[`status`],u(e.status,`status`,`text`)),s(await l(`Creating`,async()=>f.post(`/accounts/${p}/members`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function K(e){return e.positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const q={command:`delete <member-id>`,describe:`Remove a member from an account.`,builder:K,handler:async t=>{if(t.dryRun){c({command:`cf accounts members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let a=await r(t),u=t.local?d:await n(a);if(t.accountId=u,!await e({force:!!t.force})){process.stderr.write(`Aborted.
14
+ `);return}if(t.body){let e=o(t.body);s(await l(`Deleting`,async()=>a.delete(`/accounts/${u}/members/${encodeURIComponent(String(t[`member-id`]))}`,{body:e})),{successLabel:`Deleted`});return}s(await l(`Deleting`,async()=>a.accounts.members.delete(t[`member-id`],u)),{successLabel:`Deleted`})}};function J(e){return e.positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <member-id>`,describe:`Get information about a specific member of an account.`,builder:J,handler:async e=>{if(e.dryRun){c({command:`cf accounts members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.members.get(e[`member-id`],a)),{successLabel:`Loaded`})}};function X(e){return e.option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`user.first_name`,`user.last_name`,`user.email`,`status`]}).option(`status`,{type:`string`,description:`A member's status in the account.`,choices:[`accepted`,`pending`,`rejected`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List all members of an account.`,builder:X,handler:async e=>{let t={order:e.order,status:e.status,page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){c({command:`cf accounts members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/members`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.members.list(o,t)),{successLabel:`Loaded`})}};function Q(e){return e.positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`update <member-id>`,describe:`Modify an account member.`,builder:Q,handler:async e=>{if(e.dryRun){c({command:`cf accounts members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"member-id":String(e[`member-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),a=e.local?d:await n(t);if(e.accountId=a,e.body){let n=o(e.body);s(await l(`Updating`,async()=>t.put(`/accounts/${a}/members/${encodeURIComponent(String(e[`member-id`]))}`,{body:n})),{successLabel:`Updated`});return}s(await l(`Updating`,async()=>t.accounts.members.update(e[`member-id`],a)),{successLabel:`Updated`})}},re={command:`members`,describe:`Invite, inspect, update, and remove users who have access to this account`,builder:e=>e.command(G).command(q).command(Y).command(Z).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization ID.`}).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:`move`,describe:`Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`,builder:ie,handler:async e=>{if(e.dryRun){c({command:`cf accounts move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:{"account-ids":e[`account-ids`],"destination-organization-id":e[`destination-organization-id`],body:e.body}});return}let n=await r(e);if(e.body){let t=o(e.body);s(await l(`Creating`,async()=>n.post(`/accounts/move`,{body:t})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await t(`destination-organization-id`,`Move accounts to this organization ID.`));let i={};e[`account-ids`]!==void 0&&a(i,[`account_ids`],e[`account-ids`]),e[`destination-organization-id`]!==void 0&&a(i,[`destination_organization_id`],u(e[`destination-organization-id`],`destination-organization-id`,`text`)),s(await l(`Creating`,async()=>n.post(`/accounts/move`,{body:Object.keys(i).length>0?i:void 0})),{successLabel:`Created`})}};function oe(e){return e.positional(`role-id`,{type:`string`,description:`Role identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <role-id>`,describe:`Get information about a specific role for an account.`,builder:oe,handler:async e=>{if(e.dryRun){c({command:`cf accounts roles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/roles/${e[`role-id`]==null?`<role-id>`:encodeURIComponent(String(e[`role-id`]))}`,pathParams:{"role-id":String(e[`role-id`]??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.roles.get(e[`role-id`],a)),{successLabel:`Loaded`})}};function ce(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of roles per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`Get all available roles for an account.`,builder:ce,handler:async e=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){c({command:`cf accounts roles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/roles`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.roles.list(o,t)),{successLabel:`Loaded`})}},ue={command:`roles`,describe:`View the roles available for assigning to account members, each defining a set of permissions`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).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 fe={command:`create`,describe:`Creates an account subscription.`,builder:de,handler:async e=>{if(e.dryRun){c({command:`cf accounts subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/subscriptions`,pathParams:{},bodyKind:`json`,body:{"app-install-id":e[`app-install-id`],frequency:e.frequency,"rate-plan-currency":e[`rate-plan-currency`],"rate-plan-externally-managed":e[`rate-plan-externally-managed`],"rate-plan-id":e[`rate-plan-id`],"rate-plan-is-contract":e[`rate-plan-is-contract`],"rate-plan-public-name":e[`rate-plan-public-name`],"rate-plan-scope":e[`rate-plan-scope`],"rate-plan-sets":e[`rate-plan-sets`],body:e.body}});return}let t=await r(e),f=e.local?d:await n(t);if(e.accountId=f,e.body){let n=o(e.body);s(await l(`Creating`,async()=>t.post(`/accounts/${f}/subscriptions`,{body:n})),{successLabel:`Created`});return}let p={};e[`app-install-id`]!==void 0&&a(p,[`app`,`install_id`],u(e[`app-install-id`],`app-install-id`,`text`)),e.frequency!==void 0&&a(p,[`frequency`],u(e.frequency,`frequency`,`text`)),e[`rate-plan-currency`]!==void 0&&a(p,[`rate_plan`,`currency`],u(e[`rate-plan-currency`],`rate-plan-currency`,`text`)),e[`rate-plan-externally-managed`]!==void 0&&a(p,[`rate_plan`,`externally_managed`],e[`rate-plan-externally-managed`]),e[`rate-plan-id`]!==void 0&&a(p,[`rate_plan`,`id`],u(e[`rate-plan-id`],`rate-plan-id`,`text`)),e[`rate-plan-is-contract`]!==void 0&&a(p,[`rate_plan`,`is_contract`],e[`rate-plan-is-contract`]),e[`rate-plan-public-name`]!==void 0&&a(p,[`rate_plan`,`public_name`],u(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`)),e[`rate-plan-scope`]!==void 0&&a(p,[`rate_plan`,`scope`],u(e[`rate-plan-scope`],`rate-plan-scope`,`text`)),e[`rate-plan-sets`]!==void 0&&a(p,[`rate_plan`,`sets`],e[`rate-plan-sets`]),s(await l(`Creating`,async()=>t.post(`/accounts/${f}/subscriptions`,{body:Object.keys(p).length>0?p:void 0})),{successLabel:`Created`})}};function pe(e){return e.positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const me={command:`delete <subscription-identifier>`,describe:`Deletes an account's subscription.`,builder:pe,handler:async t=>{if(t.dryRun){c({command:`cf accounts subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`json`,body:{body:t.body}});return}let a=await r(t),u=t.local?d:await n(a);if(t.accountId=u,!await e({force:!!t.force})){process.stderr.write(`Aborted.
15
+ `);return}if(t.body){let e=o(t.body);s(await l(`Deleting`,async()=>a.delete(`/accounts/${u}/subscriptions/${encodeURIComponent(String(t[`subscription-identifier`]))}`,{body:e})),{successLabel:`Deleted`});return}s(await l(`Deleting`,async()=>a.accounts.subscriptions.delete(t[`subscription-identifier`],u)),{successLabel:`Deleted`})}};function he(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get`,describe:`Lists all of an account's subscriptions.`,builder:he,handler:async e=>{if(e.dryRun){c({command:`cf accounts subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/subscriptions`,pathParams:{},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.subscriptions.get(a)),{successLabel:`Loaded`})}};function _e(e){return e.positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).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 ve={command:`update <subscription-identifier>`,describe:`Updates an account subscription.`,builder:_e,handler:async e=>{if(e.dryRun){c({command:`cf accounts subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/subscriptions/${e[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(e[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(e[`subscription-identifier`]??``)},bodyKind:`json`,body:{"app-install-id":e[`app-install-id`],frequency:e.frequency,"rate-plan-currency":e[`rate-plan-currency`],"rate-plan-externally-managed":e[`rate-plan-externally-managed`],"rate-plan-id":e[`rate-plan-id`],"rate-plan-is-contract":e[`rate-plan-is-contract`],"rate-plan-public-name":e[`rate-plan-public-name`],"rate-plan-scope":e[`rate-plan-scope`],"rate-plan-sets":e[`rate-plan-sets`],body:e.body}});return}let t=await r(e),f=e.local?d:await n(t);if(e.accountId=f,e.body){let n=o(e.body);s(await l(`Updating`,async()=>t.put(`/accounts/${f}/subscriptions/${encodeURIComponent(String(e[`subscription-identifier`]))}`,{body:n})),{successLabel:`Updated`});return}let p={};e[`app-install-id`]!==void 0&&a(p,[`app`,`install_id`],u(e[`app-install-id`],`app-install-id`,`text`)),e.frequency!==void 0&&a(p,[`frequency`],u(e.frequency,`frequency`,`text`)),e[`rate-plan-currency`]!==void 0&&a(p,[`rate_plan`,`currency`],u(e[`rate-plan-currency`],`rate-plan-currency`,`text`)),e[`rate-plan-externally-managed`]!==void 0&&a(p,[`rate_plan`,`externally_managed`],e[`rate-plan-externally-managed`]),e[`rate-plan-id`]!==void 0&&a(p,[`rate_plan`,`id`],u(e[`rate-plan-id`],`rate-plan-id`,`text`)),e[`rate-plan-is-contract`]!==void 0&&a(p,[`rate_plan`,`is_contract`],e[`rate-plan-is-contract`]),e[`rate-plan-public-name`]!==void 0&&a(p,[`rate_plan`,`public_name`],u(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`)),e[`rate-plan-scope`]!==void 0&&a(p,[`rate_plan`,`scope`],u(e[`rate-plan-scope`],`rate-plan-scope`,`text`)),e[`rate-plan-sets`]!==void 0&&a(p,[`rate_plan`,`sets`],e[`rate-plan-sets`]),s(await l(`Updating`,async()=>t.put(`/accounts/${f}/subscriptions/${encodeURIComponent(String(e[`subscription-identifier`]))}`,{body:Object.keys(p).length>0?p:void 0})),{successLabel:`Updated`})}},ye={command:`subscriptions`,describe:`View and manage plan subscriptions attached to this account`,builder:e=>e.command(fe).command(me).command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).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 xe={command:`create`,describe:`Create a new Account Owned API token.`,builder:be,handler:async e=>{if(e.dryRun){c({command:`cf accounts tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens`,pathParams:{},bodyKind:`json`,body:{"condition-request-ip-in":e[`condition-request-ip-in`],"condition-request-ip-not-in":e[`condition-request-ip-not-in`],"expires-on":e[`expires-on`],name:e.name,"not-before":e[`not-before`],body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Creating`,async()=>f.post(`/accounts/${p}/tokens`,{body:t})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await t(`name`,`Token name.`));let m={};e[`condition-request-ip-in`]!==void 0&&a(m,[`condition`,`request_ip`,`in`],e[`condition-request-ip-in`]),e[`condition-request-ip-not-in`]!==void 0&&a(m,[`condition`,`request_ip`,`not_in`],e[`condition-request-ip-not-in`]),e[`expires-on`]!==void 0&&a(m,[`expires_on`],u(e[`expires-on`],`expires-on`,`text`)),e.name!==void 0&&a(m,[`name`],u(e.name,`name`,`text`)),e[`not-before`]!==void 0&&a(m,[`not_before`],u(e[`not-before`],`not-before`,`text`)),s(await l(`Creating`,async()=>f.post(`/accounts/${p}/tokens`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function Se(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`delete <token-id>`,describe:`Destroy an Account Owned API token.`,builder:Se,handler:async t=>{if(t.dryRun){c({command:`cf accounts tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let a=await r(t),u=t.local?d:await n(a);if(t.accountId=u,!await e({force:!!t.force})){process.stderr.write(`Aborted.
16
+ `);return}if(t.body){let e=o(t.body);s(await l(`Deleting`,async()=>a.delete(`/accounts/${u}/tokens/${encodeURIComponent(String(t[`token-id`]))}`,{body:e})),{successLabel:`Deleted`});return}s(await l(`Deleting`,async()=>a.accounts.tokens.delete(u,t[`token-id`])),{successLabel:`Deleted`})}};function we(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get <token-id>`,describe:`Get information about a specific Account Owned API token.`,builder:we,handler:async e=>{if(e.dryRun){c({command:`cf accounts tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.tokens.get(a,e[`token-id`])),{successLabel:`Loaded`})}};function Ee(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`List all Account Owned API tokens created for this account.`,builder:Ee,handler:async e=>{let t={page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){c({command:`cf accounts tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.tokens.list(o,t)),{successLabel:`Loaded`})}};function Oe(e){return e.option(`name`,{type:`string`,description:`Filter by the name of the permission group.
17
+ The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
18
+ The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`get`,describe:`Find all available permission groups for Account Owned API Tokens`,builder:Oe,handler:async e=>{let t={name:e.name,scope:e.scope};if(e.dryRun){c({command:`cf accounts tokens permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/permission_groups`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.tokens.permissionGroups.get(o,t)),{successLabel:`Loaded`})}};function Ae(e){return e.option(`name`,{type:`string`,description:`Filter by the name of the permission group.
19
+ The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
20
+ The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`Find all available permission groups for Account Owned API Tokens`,builder:Ae,handler:async e=>{let t={name:e.name,scope:e.scope};if(e.dryRun){c({command:`cf accounts tokens permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/permission_groups`,pathParams:{},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.accounts.tokens.permissionGroups.list(o,t)),{successLabel:`Loaded`})}},Me={command:`permission-groups`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(ke).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ne(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pe={command:`update <token-id>`,describe:`Update an existing token.`,builder:Ne,handler:async e=>{if(e.dryRun){c({command:`cf accounts tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`json`,body:{"condition-request-ip-in":e[`condition-request-ip-in`],"condition-request-ip-not-in":e[`condition-request-ip-not-in`],"expires-on":e[`expires-on`],name:e.name,"not-before":e[`not-before`],status:e.status,body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Updating`,async()=>f.put(`/accounts/${p}/tokens/${encodeURIComponent(String(e[`token-id`]))}`,{body:t})),{successLabel:`Updated`});return}e.name===void 0&&(e.name=await t(`name`,`Token name.`));let m={};e[`condition-request-ip-in`]!==void 0&&a(m,[`condition`,`request_ip`,`in`],e[`condition-request-ip-in`]),e[`condition-request-ip-not-in`]!==void 0&&a(m,[`condition`,`request_ip`,`not_in`],e[`condition-request-ip-not-in`]),e[`expires-on`]!==void 0&&a(m,[`expires_on`],u(e[`expires-on`],`expires-on`,`text`)),e.name!==void 0&&a(m,[`name`],u(e.name,`name`,`text`)),e[`not-before`]!==void 0&&a(m,[`not_before`],u(e[`not-before`],`not-before`,`text`)),e.status!==void 0&&a(m,[`status`],u(e.status,`status`,`text`)),s(await l(`Updating`,async()=>f.put(`/accounts/${p}/tokens/${encodeURIComponent(String(e[`token-id`]))}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}};function $(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fe={command:`update <token-id>`,describe:`Roll the Account Owned API token secret.`,builder:$,handler:async e=>{if(e.dryRun){c({command:`cf accounts tokens value update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}/value`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),a=e.local?d:await n(t);if(e.accountId=a,e.body){let n=o(e.body);s(await l(`Updating`,async()=>t.put(`/accounts/${a}/tokens/${encodeURIComponent(String(e[`token-id`]))}/value`,{body:n})),{successLabel:`Updated`});return}s(await l(`Updating`,async()=>t.accounts.tokens.value.update(a,e[`token-id`])),{successLabel:`Updated`})}},Ie={command:`value`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`verify`,describe:`Test whether a token works.`,builder:Le,handler:async e=>{if(e.dryRun){c({command:`cf accounts tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/tokens/verify`,pathParams:{},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.accounts.tokens.verify(a)),{successLabel:`Loaded`})}},ze={command:`tokens`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(xe).command(Ce).command(Te).command(De).command(Pe).command(Re).command(Me).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Be(e){return e.option(`id`,{type:`string`,description:`Identifier`}).option(`name`,{type:`string`,description:`Account name`}).option(`settings-abuse-contact-email`,{type:`string`,description:`Sets an abuse contact email to notify for abuse reports.`}).option(`settings-enforce-twofactor`,{type:`boolean`,description:`Indicates whether membership in this account requires that
21
+ Two-Factor Authentication is enabled`}).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 Ve={command:`update`,describe:`Update an existing account.`,builder:Be,handler:async e=>{if(e.dryRun){c({command:`cf accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}`,pathParams:{},bodyKind:`json`,body:{id:e.id,name:e.name,"settings-abuse-contact-email":e[`settings-abuse-contact-email`],"settings-enforce-twofactor":e[`settings-enforce-twofactor`],body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Updating`,async()=>f.put(`/accounts/${p}`,{body:t})),{successLabel:`Updated`});return}e.id===void 0&&(e.id=await t(`id`,`Identifier`)),e.name===void 0&&(e.name=await t(`name`,`Account name`));let m={};e.id!==void 0&&a(m,[`id`],u(e.id,`id`,`text`)),e.name!==void 0&&a(m,[`name`],u(e.name,`name`,`text`)),e[`settings-abuse-contact-email`]!==void 0&&a(m,[`settings`,`abuse_contact_email`],u(e[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`)),e[`settings-enforce-twofactor`]!==void 0&&a(m,[`settings`,`enforce_twofactor`],e[`settings-enforce-twofactor`]),s(await l(`Updating`,async()=>f.put(`/accounts/${p}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}},He={command:`accounts`,describe:`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,builder:e=>e.command(N).command(F).command(L).command(z).command(ae).command(Ve).command(m).command(_).command(w).command(j).command(U).command(re).command(ue).command(ye).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{He as default};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{C as e,T as t,b as n,t as r}from"./auth-CQcAgnOy.mjs";import{n as i,t as a}from"./body-parser-Br-BoYk-.mjs";import{t as o}from"./output-D7_yAFVR.mjs";import{n as s,t as c}from"./progress-CjcQ6ato.mjs";import{n as l}from"./input-validation-zEO81MWN.mjs";function u(e){return e.option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const d={command:`create`,describe:`Add Custom Origin Trust Store for a Zone.`,builder:u,handler:async e=>{if(e.dryRun){s({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{certificate:e.certificate,body:e.body}});return}let u=await r(e);if(e.zoneId=await n({zone:e.zone},u,{quiet:e.quiet}),e.body){let t=a(e.body);o(await c(`Creating`,async()=>u.post(`/zones/${e.zoneId}/acm/custom_trust_store`,{body:t})),{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await t(`certificate`,`The zone's SSL certificate or certificate and the intermediate(s).`));let d={};e.certificate!==void 0&&i(d,[`certificate`],l(e.certificate,`certificate`,`text`)),o(await c(`Creating`,async()=>u.post(`/zones/${e.zoneId}/acm/custom_trust_store`,{body:Object.keys(d).length>0?d:void 0})),{successLabel:`Created`})}};function f(e){return e.positional(`custom-origin-trust-store-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete <custom-origin-trust-store-id>`,describe:`Removes a CA certificate from the custom origin trust store. Origins using certificates signed by this CA will no longer be trusted.`,builder:f,handler:async t=>{if(t.dryRun){s({command:`cf acm custom-trust-store delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/acm/custom_trust_store/${t[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(t[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(t[`custom-origin-trust-store-id`]??``),"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let i=await r(t),a=await n({zone:t.zone},i,{quiet:t.quiet});if(t.zoneId=a,!await e({force:!!t.force})){process.stderr.write(`Aborted.
3
+ `);return}o(await c(`Deleting`,async()=>i.acm.customTrustStore.delete(t[`custom-origin-trust-store-id`],a)),{successLabel:`Deleted`})}};function m(e){return e.positional(`custom-origin-trust-store-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <custom-origin-trust-store-id>`,describe:`Retrieves details about a specific certificate in the custom origin trust store, including expiration and subject information.`,builder:m,handler:async e=>{if(e.dryRun){s({command:`cf acm custom-trust-store get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store/${e[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(e[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(e[`custom-origin-trust-store-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>t.acm.customTrustStore.get(e[`custom-origin-trust-store-id`],i)),{successLabel:`Loaded`})}};function g(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Get Custom Origin Trust Store for a Zone.`,builder:g,handler:async e=>{let t={page:e.page,per_page:e[`per-page`],limit:e.limit,offset:e.offset};if(e.dryRun){s({command:`cf acm custom-trust-store list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),a=await n({zone:e.zone},i,{quiet:e.quiet});e.zoneId=a,o(await c(`Loading`,async()=>i.acm.customTrustStore.list(a,t)),{successLabel:`Loaded`})}},v={command:`custom-trust-store`,describe:`Upload CA certificates that Cloudflare trusts when connecting to your origin server`,builder:e=>e.command(d).command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`certificate-authority`,{type:`string`,description:`The Certificate Authority that Total TLS certificates will be issued through.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`enabled`,{type:`boolean`,description:`If enabled, Total TLS will order a hostname specific TLS certificate for any proxied A, AAAA, or CNAME record in your zone.`}).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:`edit`,describe:`Set Total TLS Settings or disable the feature for a Zone.`,builder:y,handler:async e=>{if(e.dryRun){s({command:`cf acm total-tls edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/total_tls`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{"certificate-authority":e[`certificate-authority`],enabled:e.enabled,body:e.body}});return}let t=await r(e);if(e.zoneId=await n({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=a(e.body);o(await c(`Creating`,async()=>t.post(`/zones/${e.zoneId}/acm/total_tls`,{body:n})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u={};e[`certificate-authority`]!==void 0&&i(u,[`certificate_authority`],l(e[`certificate-authority`],`certificate-authority`,`text`)),e.enabled!==void 0&&i(u,[`enabled`],e.enabled),o(await c(`Creating`,async()=>t.post(`/zones/${e.zoneId}/acm/total_tls`,{body:Object.keys(u).length>0?u:void 0})),{successLabel:`Created`})}};function x(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get Total TLS Settings for a Zone.`,builder:x,handler:async e=>{if(e.dryRun){s({command:`cf acm total-tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/total_tls`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>t.acm.totalTLS.get(i)),{successLabel:`Loaded`})}};function C(e){return e.option(`certificate-authority`,{type:`string`,description:`The Certificate Authority that Total TLS certificates will be issued through.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`enabled`,{type:`boolean`,description:`If enabled, Total TLS will order a hostname specific TLS certificate for any proxied A, AAAA, or CNAME record in your zone.`}).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 w={command:`update`,describe:`Set Total TLS Settings or disable the feature for a Zone.`,builder:C,handler:async e=>{if(e.dryRun){s({command:`cf acm total-tls update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/total_tls`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{"certificate-authority":e[`certificate-authority`],enabled:e.enabled,body:e.body}});return}let t=await r(e);if(e.zoneId=await n({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=a(e.body);o(await c(`Creating`,async()=>t.post(`/zones/${e.zoneId}/acm/total_tls`,{body:n})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u={};e[`certificate-authority`]!==void 0&&i(u,[`certificate_authority`],l(e[`certificate-authority`],`certificate-authority`,`text`)),e.enabled!==void 0&&i(u,[`enabled`],e.enabled),o(await c(`Creating`,async()=>t.post(`/zones/${e.zoneId}/acm/total_tls`,{body:Object.keys(u).length>0?u:void 0})),{successLabel:`Created`})}},T={command:`total-tls`,describe:`Automatically issue certificates for all hostnames and subdomains in your zone`,builder:e=>e.command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`acm`,describe:`Advanced Certificate Manager — Total TLS auto-issuance and custom origin trust store certificates`,builder:e=>e.command(v).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{E as default};
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import{C as e,T as t,b as n,h as r,t as i,x as a}from"./auth-CQcAgnOy.mjs";import{n as o,t as s}from"./body-parser-Br-BoYk-.mjs";import{t as c}from"./output-D7_yAFVR.mjs";import{n as l,t as u}from"./progress-CjcQ6ato.mjs";import{n as d,t as f}from"./input-validation-zEO81MWN.mjs";import{t as p}from"./local-VJaJ3BZ1.mjs";import{n as m,t as ee}from"./raw-fetch-hRv-6P3D.mjs";function te(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`delete <address-map-id>`,describe:`Remove an account as a member of a particular address map.`,builder:te,handler:async t=>{if(t.dryRun){let e=a();l({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/accounts/${e??`<account-id>`}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
3
+ `);return}if(t.body){let e=s(t.body);c(await u(`Deleting`,async()=>n.delete(`/accounts/${o}/addressing/address_maps/${encodeURIComponent(String(t[`address-map-id`]))}/accounts/${o}`,{body:e})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>n.addressing.addressMaps.accounts.delete(o,t[`address-map-id`])),{successLabel:`Deleted`})}};function g(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`update <address-map-id>`,describe:`Add an account as a member of a particular address map.`,builder:g,handler:async e=>{if(e.dryRun){let t=a();l({command:`cf addressing address-maps accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}/accounts/${t??`<account-id>`}`,pathParams:{"address-map-id":String(e[`address-map-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.body){let r=s(e.body);c(await u(`Updating`,async()=>t.put(`/accounts/${n}/addressing/address_maps/${encodeURIComponent(String(e[`address-map-id`]))}/accounts/${n}`,{body:r})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.addressing.addressMaps.accounts.update(n,e[`address-map-id`])),{successLabel:`Updated`})}},v={command:`accounts`,describe:`Map Cloudflare IPs to specific zones or accounts for custom Anycast addressing`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`description`,{type:`string`,description:`An optional description field which may be used to describe the types of IPs or zones on the map.`}).option(`enabled`,{type:`boolean`,description:`Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.`,default:!1}).option(`ips`,{type:`string`,array:!0,description:`The ips 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 b={command:`create`,describe:`Create a new address map under the account.`,builder:y,handler:async e=>{if(e.dryRun){l({command:`cf addressing address-maps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`json`,body:{description:e.description,enabled:e.enabled,ips:e.ips,body:e.body}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.body){let r=s(e.body);c(await u(`Creating`,async()=>t.post(`/accounts/${n}/addressing/address_maps`,{body:r})),{successLabel:`Created`});return}let f={};e.description!==void 0&&o(f,[`description`],d(e.description,`description`,`text`)),e.enabled!==void 0&&o(f,[`enabled`],e.enabled),e.ips!==void 0&&o(f,[`ips`],e.ips),c(await u(`Creating`,async()=>t.post(`/accounts/${n}/addressing/address_maps`,{body:Object.keys(f).length>0?f:void 0})),{successLabel:`Created`})}};function x(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`delete <address-map-id>`,describe:`Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.`,builder:x,handler:async t=>{if(t.dryRun){l({command:`cf addressing address-maps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
4
+ `);return}if(t.body){let e=s(t.body);c(await u(`Deleting`,async()=>n.delete(`/accounts/${o}/addressing/address_maps/${encodeURIComponent(String(t[`address-map-id`]))}`,{body:e})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>n.addressing.addressMaps.delete(t[`address-map-id`],o)),{successLabel:`Deleted`})}};function C(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`default-sni`,{type:`string`,description:`If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.`}).option(`description`,{type:`string`,description:`An optional description field which may be used to describe the types of IPs or zones on the map.`}).option(`enabled`,{type:`boolean`,description:`Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.`}).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 w={command:`edit <address-map-id>`,describe:`Modify properties of an address map owned by the account.`,builder:C,handler:async e=>{if(e.dryRun){l({command:`cf addressing address-maps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}`,pathParams:{"address-map-id":String(e[`address-map-id`]??``)},bodyKind:`json`,body:{"default-sni":e[`default-sni`],description:e.description,enabled:e.enabled,body:e.body}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.body){let r=s(e.body);c(await u(`Updating`,async()=>t.patch(`/accounts/${n}/addressing/address_maps/${encodeURIComponent(String(e[`address-map-id`]))}`,{body:r})),{successLabel:`Updated`});return}let f={};e[`default-sni`]!==void 0&&o(f,[`default_sni`],d(e[`default-sni`],`default-sni`,`text`)),e.description!==void 0&&o(f,[`description`],d(e.description,`description`,`text`)),e.enabled!==void 0&&o(f,[`enabled`],e.enabled),c(await u(`Updating`,async()=>t.patch(`/accounts/${n}/addressing/address_maps/${encodeURIComponent(String(e[`address-map-id`]))}`,{body:Object.keys(f).length>0?f:void 0})),{successLabel:`Updated`})}};function T(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <address-map-id>`,describe:`Show a particular address map owned by the account.`,builder:T,handler:async e=>{if(e.dryRun){l({command:`cf addressing address-maps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}`,pathParams:{"address-map-id":String(e[`address-map-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.addressMaps.get(e[`address-map-id`],n)),{successLabel:`Loaded`})}};function D(e){return e.positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`delete <ip-address>`,describe:`Remove an IP from a particular address map.`,builder:D,handler:async t=>{if(t.dryRun){l({command:`cf addressing address-maps ips delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/ips/${t[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(t[`ip-address`]))}`,pathParams:{"ip-address":String(t[`ip-address`]??``),"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
5
+ `);return}if(t.body){let e=s(t.body);c(await u(`Deleting`,async()=>n.delete(`/accounts/${o}/addressing/address_maps/${encodeURIComponent(String(t[`address-map-id`]))}/ips/${encodeURIComponent(String(t[`ip-address`]))}`,{body:e})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>n.addressing.addressMaps.ips.delete(t[`ip-address`],t[`address-map-id`],o)),{successLabel:`Deleted`})}};function k(e){return e.positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`update <ip-address>`,describe:`Add an IP from a prefix owned by the account to a particular address map.`,builder:k,handler:async e=>{if(e.dryRun){l({command:`cf addressing address-maps ips update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}/ips/${e[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(e[`ip-address`]))}`,pathParams:{"ip-address":String(e[`ip-address`]??``),"address-map-id":String(e[`address-map-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.body){let r=s(e.body);c(await u(`Updating`,async()=>t.put(`/accounts/${n}/addressing/address_maps/${encodeURIComponent(String(e[`address-map-id`]))}/ips/${encodeURIComponent(String(e[`ip-address`]))}`,{body:r})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.addressing.addressMaps.ips.update(e[`ip-address`],e[`address-map-id`],n)),{successLabel:`Updated`})}},j={command:`ips`,describe:`Map Cloudflare IPs to specific zones or accounts for custom Anycast addressing`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List all address maps owned by the account.`,builder:M,handler:async e=>{if(e.dryRun){l({command:`cf addressing address-maps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.addressMaps.list(n)),{successLabel:`Loaded`})}};function P(e){return e.option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`delete`,describe:`Remove a zone as a member of a particular address map.`,builder:P,handler:async t=>{if(t.dryRun){l({command:`cf addressing address-maps zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/zones/${t.zone??t.zoneId??`<zone>`}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let o=await i(t),d=t.local?p:await r(o);t.accountId=d;let f=await n({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=f,!await e({force:!!t.force})){process.stderr.write(`Aborted.
6
+ `);return}if(t.body){let e=s(t.body);c(await u(`Deleting`,async()=>o.delete(`/accounts/${d}/addressing/address_maps/${encodeURIComponent(String(t[`address-map-id`]))}/zones/${t.zoneId}`,{body:e})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>o.addressing.addressMaps.zones.delete(f,t[`address-map-id`],d)),{successLabel:`Deleted`})}};function I(e){return e.option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`update`,describe:`Add a zone as a member of a particular address map.`,builder:I,handler:async e=>{if(e.dryRun){l({command:`cf addressing address-maps zones update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}/zones/${e.zone??e.zoneId??`<zone>`}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"address-map-id":String(e[`address-map-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await i(e),o=e.local?p:await r(t);e.accountId=o;let d=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=d,e.body){let n=s(e.body);c(await u(`Updating`,async()=>t.put(`/accounts/${o}/addressing/address_maps/${encodeURIComponent(String(e[`address-map-id`]))}/zones/${e.zoneId}`,{body:n})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.addressing.addressMaps.zones.update(d,e[`address-map-id`],o)),{successLabel:`Updated`})}},R={command:`zones`,describe:`Map Cloudflare IPs to specific zones or accounts for custom Anycast addressing`,builder:e=>e.command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`address-maps`,describe:`Map Cloudflare IPs to specific zones or accounts for custom Anycast addressing`,builder:e=>e.command(b).command(S).command(w).command(E).command(N).command(v).command(j).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List all leases owned by the account.`,builder:B,handler:async e=>{if(e.dryRun){l({command:`cf addressing leases list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/leases`,pathParams:{},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.leases.list(n)),{successLabel:`Loaded`})}},H={command:`leases`,describe:`Leases operations`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`loa-document`,{type:`string`,description:`LOA document to upload.`})}const W={command:`create`,describe:`Submit LOA document (pdf format) under the account.`,builder:U,handler:async e=>{if(e.dryRun){l({command:`cf addressing loa-documents create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/loa_documents`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,"loa-document":e[`loa-document`]}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.file!==void 0||e.body!==void 0||e[`loa-document`]!==void 0){let r=new FormData;if(e.file){let t=f(e.file);r.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&r.append(`file`,e.body);e[`loa-document`]!==void 0&&r.append(`loa_document`,String(d(e[`loa-document`],`loa-document`,`text`)??``)),c(await u(`Creating`,async()=>t.post(`/accounts/${n}/addressing/loa_documents`,{body:r})),{successLabel:`Created`});return}if(e.body){let r=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${n}/addressing/loa_documents`,{body:r,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function G(e){return e.positional(`loa-document-id`,{type:`string`,description:`Identifier for the uploaded LOA document.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const K={command:`get <loa-document-id>`,describe:`Download specified LOA document under the account.`,builder:G,handler:async e=>{if(e.dryRun){l({command:`cf addressing loa-documents get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/loa_documents/${e[`loa-document-id`]==null?`<loa-document-id>`:encodeURIComponent(String(e[`loa-document-id`]))}/download`,pathParams:{"loa-document-id":String(e[`loa-document-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n;let o=await u(`Loading`,async()=>ee(`/accounts/${n}/addressing/loa_documents/${encodeURIComponent(String(e[`loa-document-id`]))}/download`,{method:`GET`,localEndpoint:e.local?e.localEndpoint:void 0}));m(e.text===!0?o.toString(`utf-8`):o)}},q={command:`loa-documents`,describe:`Letter of Authorization documents required to verify IP prefix ownership`,builder:e=>e.command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`advertised`,{type:`boolean`,description:"Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If \n`false`, the BGP route is withdrawn.\n"}).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 Y={command:`edit <prefix-id>`,describe:`Advertise or withdraw the BGP route for a prefix. **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix.`,builder:J,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes advertisement-status edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bgp/status`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:{advertised:e.advertised,body:e.body}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.body){let r=s(e.body);c(await u(`Updating`,async()=>t.patch(`/accounts/${n}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bgp/status`,{body:r})),{successLabel:`Updated`});return}if(e.advertised===void 0)throw Error(`--advertised is required (or pass --body with this field set).`);let d={};e.advertised!==void 0&&o(d,[`advertised`],e.advertised),c(await u(`Updating`,async()=>t.patch(`/accounts/${n}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bgp/status`,{body:Object.keys(d).length>0?d:void 0})),{successLabel:`Updated`})}};function X(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <prefix-id>`,describe:`View the current advertisement state for a prefix. **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix.`,builder:X,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes advertisement-status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bgp/status`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.advertisementStatus.get(e[`prefix-id`],n)),{successLabel:`Loaded`})}},Q={command:`advertisement-status`,describe:`BYOIP prefixes — onboard your own IP ranges, manage BGP announcements, service bindings, and delegations`,builder:e=>e.command(Y).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create <prefix-id>`,describe:`Create a BGP prefix, controlling the BGP advertisement status of a specific subnet. When created, BGP prefixes are initially withdrawn, and can be advertised with the Update BGP Prefix API.`,builder:ne,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes bgp-prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:{cidr:e.cidr,body:e.body}});return}let n=await i(e),f=e.local?p:await r(n);if(e.accountId=f,e.body){let t=s(e.body);c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes`,{body:t})),{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await t(`cidr`,`IP Prefix in Classless Inter-Domain Routing format.`));let m={};e.cidr!==void 0&&o(m,[`cidr`],d(e.cidr,`cidr`,`text`)),c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function ie(e){return e.positional(`bgp-prefix-id`,{type:`string`,description:`Identifier of BGP Prefix.`,demandOption:!0}).option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,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 <bgp-prefix-id>`,describe:`Delete a BGP Prefix associated with the specified IP Prefix. A BGP Prefix must be withdrawn before it can be deleted.`,builder:ie,handler:async t=>{if(t.dryRun){l({command:`cf addressing prefixes bgp-prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}/bgp/prefixes/${t[`bgp-prefix-id`]==null?`<bgp-prefix-id>`:encodeURIComponent(String(t[`bgp-prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``),"bgp-prefix-id":String(t[`bgp-prefix-id`]??``)},bodyKind:`none`});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
7
+ `);return}c(await u(`Deleting`,async()=>n.addressing.prefixes.bgpPrefixes.delete(o,t[`prefix-id`],t[`bgp-prefix-id`])),{successLabel:`Deleted`})}};function oe(e){return e.positional(`bgp-prefix-id`,{type:`string`,description:`Identifier of BGP Prefix.`,demandOption:!0}).option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`asn-prepend-count`,{type:`number`,description:`Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute`}).option(`auto-advertise-withdraw`,{type:`boolean`,description:`Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route.`}).option(`on-demand-advertised`,{type:`boolean`,description:`The on_demand.advertised 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 se={command:`edit <bgp-prefix-id>`,describe:`Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn).`,builder:oe,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes bgp-prefixes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes/${e[`bgp-prefix-id`]==null?`<bgp-prefix-id>`:encodeURIComponent(String(e[`bgp-prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``),"bgp-prefix-id":String(e[`bgp-prefix-id`]??``)},bodyKind:`json`,body:{"asn-prepend-count":e[`asn-prepend-count`],"auto-advertise-withdraw":e[`auto-advertise-withdraw`],"on-demand-advertised":e[`on-demand-advertised`],body:e.body}});return}let t=await i(e),n=e.local?p:await r(t);if(e.accountId=n,e.body){let r=s(e.body);c(await u(`Updating`,async()=>t.patch(`/accounts/${n}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes/${encodeURIComponent(String(e[`bgp-prefix-id`]))}`,{body:r})),{successLabel:`Updated`});return}let d={};e[`asn-prepend-count`]!==void 0&&o(d,[`asn_prepend_count`],e[`asn-prepend-count`]),e[`auto-advertise-withdraw`]!==void 0&&o(d,[`auto_advertise_withdraw`],e[`auto-advertise-withdraw`]),e[`on-demand-advertised`]!==void 0&&o(d,[`on_demand`,`advertised`],e[`on-demand-advertised`]),c(await u(`Updating`,async()=>t.patch(`/accounts/${n}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes/${encodeURIComponent(String(e[`bgp-prefix-id`]))}`,{body:Object.keys(d).length>0?d:void 0})),{successLabel:`Updated`})}};function ce(e){return e.positional(`bgp-prefix-id`,{type:`string`,description:`Identifier of BGP Prefix.`,demandOption:!0}).option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <bgp-prefix-id>`,describe:`Retrieve a single BGP Prefix according to its identifier`,builder:ce,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes bgp-prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes/${e[`bgp-prefix-id`]==null?`<bgp-prefix-id>`:encodeURIComponent(String(e[`bgp-prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``),"bgp-prefix-id":String(e[`bgp-prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.bgpPrefixes.get(n,e[`prefix-id`],e[`bgp-prefix-id`])),{successLabel:`Loaded`})}};function ue(e){return e.option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to control which specific subnets are advertised to the Internet. It is possible to advertise subnets more specific than an IP Prefix by creating more specific BGP Prefixes.`,builder:ue,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes bgp-prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bgp/prefixes`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.bgpPrefixes.list(n,e[`prefix-id`])),{successLabel:`Loaded`})}},fe={command:`bgp-prefixes`,describe:`BYOIP prefixes — onboard your own IP ranges, manage BGP announcements, service bindings, and delegations`,builder:e=>e.command(re).command(ae).command(se).command(le).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.option(`asn`,{type:`number`,description:`Autonomous System Number (ASN) the prefix will be advertised under.`}).option(`cidr`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`delegate-loa-creation`,{type:`boolean`,description:`Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner.`,default:!1}).option(`description`,{type:`string`,description:`Description of the prefix.`}).option(`loa-document-id`,{type:`string`,description:`Identifier for the uploaded LOA document.`}).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 me={command:`create`,describe:`Add a new prefix under the account.`,builder:pe,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes`,pathParams:{},bodyKind:`json`,body:{asn:e.asn,cidr:e.cidr,"delegate-loa-creation":e[`delegate-loa-creation`],description:e.description,"loa-document-id":e[`loa-document-id`],body:e.body}});return}let n=await i(e),f=e.local?p:await r(n);if(e.accountId=f,e.body){let t=s(e.body);c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes`,{body:t})),{successLabel:`Created`});return}if(e.asn===void 0)throw Error(`--asn is required (or pass --body with this field set).`);e.cidr===void 0&&(e.cidr=await t(`cidr`,`IP Prefix in Classless Inter-Domain Routing format.`));let m={};e.asn!==void 0&&o(m,[`asn`],e.asn),e.cidr!==void 0&&o(m,[`cidr`],d(e.cidr,`cidr`,`text`)),e[`delegate-loa-creation`]!==void 0&&o(m,[`delegate_loa_creation`],e[`delegate-loa-creation`]),e.description!==void 0&&o(m,[`description`],d(e.description,`description`,`text`)),e[`loa-document-id`]!==void 0&&o(m,[`loa_document_id`],d(e[`loa-document-id`],`loa-document-id`,`text`)),c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function he(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`delegated-account-id`,{type:`string`,description:`Account identifier for the account to which prefix is being delegated.`}).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 ge={command:`create <prefix-id>`,describe:`Create a new account delegation for a given IP prefix.`,builder:he,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes delegations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/delegations`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:{cidr:e.cidr,"delegated-account-id":e[`delegated-account-id`],body:e.body}});return}let n=await i(e),f=e.local?p:await r(n);if(e.accountId=f,e.body){let t=s(e.body);c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/delegations`,{body:t})),{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await t(`cidr`,`IP Prefix in Classless Inter-Domain Routing format.`)),e[`delegated-account-id`]===void 0&&(e[`delegated-account-id`]=await t(`delegated-account-id`,`Account identifier for the account to which prefix is being delegated.`));let m={};e.cidr!==void 0&&o(m,[`cidr`],d(e.cidr,`cidr`,`text`)),e[`delegated-account-id`]!==void 0&&o(m,[`delegated_account_id`],d(e[`delegated-account-id`],`delegated-account-id`,`text`)),c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/delegations`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function _e(e){return e.positional(`delegation-id`,{type:`string`,description:`Identifier of a Delegation.`,demandOption:!0}).option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ve={command:`delete <delegation-id>`,describe:`Delete an account delegation for a given IP prefix.`,builder:_e,handler:async t=>{if(t.dryRun){l({command:`cf addressing prefixes delegations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}/delegations/${t[`delegation-id`]==null?`<delegation-id>`:encodeURIComponent(String(t[`delegation-id`]))}`,pathParams:{"delegation-id":String(t[`delegation-id`]??``),"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
8
+ `);return}if(t.body){let e=s(t.body);c(await u(`Deleting`,async()=>n.delete(`/accounts/${o}/addressing/prefixes/${encodeURIComponent(String(t[`prefix-id`]))}/delegations/${encodeURIComponent(String(t[`delegation-id`]))}`,{body:e})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>n.addressing.prefixes.delegations.delete(t[`delegation-id`],t[`prefix-id`],o)),{successLabel:`Deleted`})}};function ye(e){return e.option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`list`,describe:`List all delegations for a given account IP prefix.`,builder:ye,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes delegations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/delegations`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.delegations.list(e[`prefix-id`],n)),{successLabel:`Loaded`})}},xe={command:`delegations`,describe:`BYOIP prefixes — onboard your own IP ranges, manage BGP announcements, service bindings, and delegations`,builder:e=>e.command(ge).command(ve).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`delete <prefix-id>`,describe:`Delete an unapproved prefix owned by the account.`,builder:Se,handler:async t=>{if(t.dryRun){l({command:`cf addressing prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
9
+ `);return}if(t.body){let e=s(t.body);c(await u(`Deleting`,async()=>n.delete(`/accounts/${o}/addressing/prefixes/${encodeURIComponent(String(t[`prefix-id`]))}`,{body:e})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>n.addressing.prefixes.delete(t[`prefix-id`],o)),{successLabel:`Deleted`})}};function we(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the prefix.`}).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 Te={command:`edit <prefix-id>`,describe:`Modify the description for a prefix owned by the account.`,builder:we,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:{description:e.description,body:e.body}});return}let n=await i(e),f=e.local?p:await r(n);if(e.accountId=f,e.body){let t=s(e.body);c(await u(`Updating`,async()=>n.patch(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}`,{body:t})),{successLabel:`Updated`});return}e.description===void 0&&(e.description=await t(`description`,`Description of the prefix.`));let m={};e.description!==void 0&&o(m,[`description`],d(e.description,`description`,`text`)),c(await u(`Updating`,async()=>n.patch(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}};function Ee(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get <prefix-id>`,describe:`List a particular prefix owned by the account.`,builder:Ee,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.get(e[`prefix-id`],n)),{successLabel:`Loaded`})}};function Oe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List all prefixes owned by the account.`,builder:Oe,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes`,pathParams:{},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.list(n)),{successLabel:`Loaded`})}};function Ae(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`service-id`,{type:`string`,description:`Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the
10
+ **List Services** endpoint.
11
+ `}).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 je={command:`create <prefix-id>`,describe:`Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. **NOTE:** The first Service Binding created for an IP Prefix must exactly match the IP Prefix's CIDR. Subsequent Service Bindings may be created with a more-specific CIDR. Refer to the [Service Bindings Documentation](https://developers.cloudflare.com/byoip/service-bindings/) for compatibility details.`,builder:Ae,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes service-bindings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bindings`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:{cidr:e.cidr,"service-id":e[`service-id`],body:e.body}});return}let n=await i(e),f=e.local?p:await r(n);if(e.accountId=f,e.body){let t=s(e.body);c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bindings`,{body:t})),{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await t(`cidr`,`IP Prefix in Classless Inter-Domain Routing format.`)),e[`service-id`]===void 0&&(e[`service-id`]=await t(`service-id`,`Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the **List Services** endpoint. `));let m={};e.cidr!==void 0&&o(m,[`cidr`],d(e.cidr,`cidr`,`text`)),e[`service-id`]!==void 0&&o(m,[`service_id`],d(e[`service-id`],`service-id`,`text`)),c(await u(`Creating`,async()=>n.post(`/accounts/${f}/addressing/prefixes/${encodeURIComponent(String(e[`prefix-id`]))}/bindings`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function Me(e){return e.positional(`binding-id`,{type:`string`,description:`Identifier of a Service Binding.`,demandOption:!0}).option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,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 Ne={command:`delete <binding-id>`,describe:`Delete a Service Binding`,builder:Me,handler:async t=>{if(t.dryRun){l({command:`cf addressing prefixes service-bindings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}/bindings/${t[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(t[`binding-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``),"binding-id":String(t[`binding-id`]??``)},bodyKind:`none`});return}let n=await i(t),o=t.local?p:await r(n);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
12
+ `);return}c(await u(`Deleting`,async()=>n.addressing.prefixes.serviceBindings.delete(o,t[`prefix-id`],t[`binding-id`])),{successLabel:`Deleted`})}};function Pe(e){return e.positional(`binding-id`,{type:`string`,description:`Identifier of a Service Binding.`,demandOption:!0}).option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`get <binding-id>`,describe:`Fetch a single Service Binding`,builder:Pe,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes service-bindings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bindings/${e[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(e[`binding-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``),"binding-id":String(e[`binding-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.serviceBindings.get(n,e[`prefix-id`],e[`binding-id`])),{successLabel:`Loaded`})}};function Ie(e){return e.option(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`list`,describe:"List the Cloudflare services this prefix is currently bound to. Traffic sent to an address within an IP prefix will be routed to the Cloudflare service of the most-specific Service Binding matching the address. **Example:** binding `192.0.2.0/24` to Cloudflare Magic Transit and `192.0.2.1/32` to the Cloudflare CDN would route traffic for `192.0.2.1` to the CDN, and traffic for all other IPs in the prefix to Cloudflare Magic Transit.",builder:Ie,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes service-bindings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/bindings`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.prefixes.serviceBindings.list(n,e[`prefix-id`])),{successLabel:`Loaded`})}},Re={command:`service-bindings`,describe:`BYOIP prefixes — onboard your own IP ranges, manage BGP announcements, service bindings, and delegations`,builder:e=>e.command(je).command(Ne).command(Fe).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.positional(`prefix-id`,{type:`string`,description:`Identifier of an IP Prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`create <prefix-id>`,describe:`Triggers a new prefix validation. The checks are run asynchronously and include IRR, RPKI, and prefix ownership.`,builder:ze,handler:async e=>{if(e.dryRun){l({command:`cf addressing prefixes validate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}/validate`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Creating`,async()=>t.addressing.prefixes.validate.create(e[`prefix-id`],n)),{successLabel:`Created`})}},Ve={command:`validate`,describe:`Additional IP prefix operations — BGP prefix deletion and prefix validation`,builder:e=>e.command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},He={command:`prefixes`,describe:`BYOIP prefixes — onboard your own IP ranges, manage BGP announcements, service bindings, and delegations`,builder:e=>e.command(me).command(Ce).command(Te).command(De).command(ke).command(Q).command(fe).command(xe).command(Re).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ue(e){return e.option(`hostname`,{type:`string`,description:"DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`"}).option(`region-key`,{type:`string`,description:`Identifying key for the region`}).option(`routing`,{type:`string`,description:`Configure which routing method to use for the regional hostname`,default:`dns`}).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 We={command:`create`,describe:`Create a new Regional Hostname entry. Cloudflare will only use data centers that are physically located within the chosen region to decrypt and service HTTPS traffic. Learn more about [Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/).`,builder:Ue,handler:async e=>{if(e.dryRun){l({command:`cf addressing regional-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/addressing/regional_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{hostname:e.hostname,"region-key":e[`region-key`],routing:e.routing,body:e.body}});return}let r=await i(e);if(e.zoneId=await n({zone:e.zone},r,{quiet:e.quiet}),e.body){let t=s(e.body);c(await u(`Creating`,async()=>r.post(`/zones/${e.zoneId}/addressing/regional_hostnames`,{body:t})),{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await t(`hostname`,"DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`")),e[`region-key`]===void 0&&(e[`region-key`]=await t(`region-key`,`Identifying key for the region`));let a={};e.hostname!==void 0&&o(a,[`hostname`],d(e.hostname,`hostname`,`text`)),e[`region-key`]!==void 0&&o(a,[`region_key`],d(e[`region-key`],`region-key`,`text`)),e.routing!==void 0&&o(a,[`routing`],d(e.routing,`routing`,`text`)),c(await u(`Creating`,async()=>r.post(`/zones/${e.zoneId}/addressing/regional_hostnames`,{body:Object.keys(a).length>0?a:void 0})),{successLabel:`Created`})}};function Ge(e){return e.positional(`hostname`,{type:`string`,description:"DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`",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 Ke={command:`delete <hostname>`,describe:`Delete the region configuration for a specific Regional Hostname.`,builder:Ge,handler:async t=>{if(t.dryRun){l({command:`cf addressing regional-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/addressing/regional_hostnames/${t.hostname==null?`<hostname>`:encodeURIComponent(String(t.hostname))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),hostname:String(t.hostname??``)},bodyKind:`none`});return}let r=await i(t),a=await n({zone:t.zone},r,{quiet:t.quiet});if(t.zoneId=a,!await e({force:!!t.force})){process.stderr.write(`Aborted.
13
+ `);return}c(await u(`Deleting`,async()=>r.addressing.regionalHostnames.delete(a,t.hostname)),{successLabel:`Deleted`})}};function qe(e){return e.positional(`hostname`,{type:`string`,description:"DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`",demandOption:!0}).option(`region-key`,{type:`string`,description:`Identifying key for the region`}).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 Je={command:`edit <hostname>`,describe:`Update the configuration for a specific Regional Hostname. Only the region_key of a hostname is mutable.`,builder:qe,handler:async e=>{if(e.dryRun){l({command:`cf addressing regional-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/addressing/regional_hostnames/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),hostname:String(e.hostname??``)},bodyKind:`json`,body:{"region-key":e[`region-key`],body:e.body}});return}let r=await i(e);if(e.zoneId=await n({zone:e.zone},r,{quiet:e.quiet}),e.body){let t=s(e.body);c(await u(`Updating`,async()=>r.patch(`/zones/${e.zoneId}/addressing/regional_hostnames/${encodeURIComponent(String(e.hostname))}`,{body:t})),{successLabel:`Updated`});return}e[`region-key`]===void 0&&(e[`region-key`]=await t(`region-key`,`Identifying key for the region`));let a={};e[`region-key`]!==void 0&&o(a,[`region_key`],d(e[`region-key`],`region-key`,`text`)),c(await u(`Updating`,async()=>r.patch(`/zones/${e.zoneId}/addressing/regional_hostnames/${encodeURIComponent(String(e.hostname))}`,{body:Object.keys(a).length>0?a:void 0})),{successLabel:`Updated`})}};function $(e){return e.positional(`hostname`,{type:`string`,description:"DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`get <hostname>`,describe:`Fetch the configuration for a specific Regional Hostname, within a zone.`,builder:$,handler:async e=>{if(e.dryRun){l({command:`cf addressing regional-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/addressing/regional_hostnames/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,c(await u(`Loading`,async()=>t.addressing.regionalHostnames.get(r,e.hostname)),{successLabel:`Loaded`})}};function Xe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`list`,describe:`List all Regional Hostnames within a zone.`,builder:Xe,handler:async e=>{if(e.dryRun){l({command:`cf addressing regional-hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/addressing/regional_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,c(await u(`Loading`,async()=>t.addressing.regionalHostnames.list(r)),{successLabel:`Loaded`})}};function Qe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`list`,describe:`List all Regional Services regions available for use by this account.`,builder:Qe,handler:async e=>{if(e.dryRun){l({command:`cf addressing regional-hostnames regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/regional_hostnames/regions`,pathParams:{},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.regionalHostnames.regions.list(n)),{successLabel:`Loaded`})}},et={command:`regions`,describe:`Pin hostnames to specific geographic regions for data locality compliance`,builder:e=>e.command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},tt={command:`regional-hostnames`,describe:`Pin hostnames to specific geographic regions for data locality compliance`,builder:e=>e.command(We).command(Ke).command(Je).command(Ye).command(Ze).command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`list`,describe:`Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the IP addresses. This endpoint can be used as a reference of available services on the Cloudflare network, and their service IDs.`,builder:nt,handler:async e=>{if(e.dryRun){l({command:`cf addressing services list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/addressing/services`,pathParams:{},bodyKind:`none`});return}let t=await i(e),n=e.local?p:await r(t);e.accountId=n,c(await u(`Loading`,async()=>t.addressing.services.list(n)),{successLabel:`Loaded`})}},it={command:`services`,describe:`Cloudflare services (CDN, Spectrum, Magic Transit) that IP prefixes can be bound to`,builder:e=>e.command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},at={command:`addressing`,describe:`IP address management — BYOIP prefixes, address maps, regional hostnames, and BGP advertisement control`,builder:e=>e.command(z).command(H).command(q).command(He).command(tt).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{at as default};