cf 1.0.0-beta.17 → 1.0.0-beta.19
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.
- package/README.md +7 -0
- package/dist/_meta/commands.json +9122 -6086
- package/dist/_meta/hand-written-commands.json +6 -0
- package/dist/_meta/schemas.json +8392 -5576
- package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-DhgunVFo.mjs} +6 -6
- package/dist/{access-DnWW2AAT.mjs → access-BDoDq_WZ.mjs} +1 -1
- package/dist/{accounts-8UcHNm3S.mjs → accounts-DLTCzZJg.mjs} +17 -13
- package/dist/{acm-qRM3iy4Z.mjs → acm-DS1CosYq.mjs} +1 -1
- package/dist/{addressing-CAb8z2Dq.mjs → addressing-DFeYj8TY.mjs} +19 -19
- package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-DXjQ8N0g.mjs} +6 -6
- package/dist/{ai-DnhytGdc.mjs → ai-V5YopMkS.mjs} +4 -4
- package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-yg8D0azz.mjs} +2 -2
- package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway--dkH9qGz.mjs} +42 -42
- package/dist/ai-search-BRtsUaUI.mjs +79 -0
- package/dist/{ai-security-KUs94UW-.mjs → ai-security-DRJCcLpF.mjs} +5 -5
- package/dist/{alerting-CCmyEPzN.mjs → alerting-8DsyMKGG.mjs} +30 -30
- package/dist/{analytics-BAvBj6qx.mjs → analytics-BpYUZTtQ.mjs} +7 -7
- package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
- package/dist/{api-security-BItVQymb.mjs → api-security-CBhWZE8z.mjs} +26 -26
- package/dist/{argo-DsJCvfml.mjs → argo-B0u2N3Dh.mjs} +1 -1
- package/dist/{artifacts-DzHXeah6.mjs → artifacts-B6XzjMiM.mjs} +1 -1
- package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-59fCc1aw.mjs} +1 -1
- package/dist/auth-5cgi8ePZ.mjs +2 -0
- package/dist/auth-BaUNb1Ed.mjs +2 -0
- package/dist/auth-ChYOc_rS.mjs +2 -0
- package/dist/{auth-token-Cw4c0y89.mjs → auth-token-B1pP2jaK.mjs} +1 -1
- package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
- package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
- package/dist/{billing-COgAWTYh.mjs → billing-Ad-rK-JH.mjs} +6 -6
- package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
- package/dist/body-parser-ChnyBsfm.mjs +2 -0
- package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CGpfjQ4w.mjs} +4 -4
- package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
- package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-CP73_yX8.mjs} +5 -5
- package/dist/browser-run-OpUfawh_.mjs +42 -0
- package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
- package/dist/build-DQZ2w_dQ.mjs +2 -0
- package/dist/builds-DsRNlILV.mjs +71 -0
- package/dist/{cache-BUh85NRr.mjs → cache-RppXjxXA.mjs} +3 -3
- package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
- package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
- package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
- package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
- package/dist/{cli-DJhpXf38.mjs → cli-Dd1n2YAJ.mjs} +1 -1
- package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
- package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
- package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
- package/dist/cloudforce-one-C1xdpspb.mjs +395 -0
- package/dist/{command-RC9WM5jq.mjs → command-BioiZMm9.mjs} +1 -1
- package/dist/{command-rx0Kb5pn.mjs → command-C0nJ2LRd.mjs} +1 -1
- package/dist/{command-CiApsRql.mjs → command-C5ARgURy.mjs} +1 -1
- package/dist/{command-CCq-Z2Ua.mjs → command-C7NIRU-u.mjs} +1 -1
- package/dist/{command-B694oLDo.mjs → command-C8DV-x_C.mjs} +1 -1
- package/dist/{command-Bmee6uwe.mjs → command-CFV1cqfR.mjs} +1 -1
- package/dist/{command-CbQFbfps.mjs → command-ChQXv0jP.mjs} +1 -1
- package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
- package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
- package/dist/{command-CAs3SxlI.mjs → command-DWE7YdeC.mjs} +1 -1
- package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
- package/dist/{command-D1JR8Fb7.mjs → command-DmPQXNRg.mjs} +1 -1
- package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
- package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
- package/dist/{command-DerHAjQL.mjs → command-yAXk5NXh.mjs} +1 -1
- package/dist/{completions-11latun5.mjs → completions-Bh0Hz-hA.mjs} +3 -3
- package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
- package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
- package/dist/{connectors-DXIUG4Zi.mjs → connectors-RUEU1QDB.mjs} +1 -1
- package/dist/containers-xU-0EhLO.mjs +78 -0
- package/dist/{containers-WMWKhLkp.mjs → containers-yUOvm-4V.mjs} +211 -211
- package/dist/{content-scan-CRDmR7rD.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
- package/dist/{context-q-6bMSL-.mjs → context-BQ6KeMgq.mjs} +2 -2
- package/dist/cps-CgPduy0H.mjs +6 -0
- package/dist/csam-scanner-B0Ra6fXL.mjs +10 -0
- package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
- package/dist/custom-hostnames-Dzov_CPw.mjs +27 -0
- package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
- package/dist/custom-pages-DxVD_f10.mjs +21 -0
- package/dist/{d1-Dbs8HItA.mjs → d1-D7p4uJ-e.mjs} +17 -19
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-5utIiOMN.mjs → deploy-BjWvVZol.mjs} +1 -1
- package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
- package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
- package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
- package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-DdhTemYB.mjs} +2 -2
- package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
- package/dist/discover-DEjUARkU.mjs +2 -0
- package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
- package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
- package/dist/{dls-lbM3i4x-.mjs → dls-BBODA9Rk.mjs} +1 -1
- package/dist/{dns-QTMPGYMa.mjs → dns-CK_hyn5q.mjs} +22 -22
- package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DbvX9R-7.mjs} +9 -9
- package/dist/{docs-bV3hPwQL.mjs → docs-BDTijwM3.mjs} +1 -1
- package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
- package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
- package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
- package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
- package/dist/{email-auth-PzRqG0ex.mjs → email-auth-BEgDxU-g.mjs} +1 -1
- package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-DKWmPOVo.mjs} +13 -13
- package/dist/{email-security-CSTKIecn.mjs → email-security-RWbAp8qa.mjs} +44 -44
- package/dist/{email-sending-BSwuAir8.mjs → email-sending-BbJy_vl8.mjs} +18 -18
- package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
- package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
- package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-Bob6udAc.mjs} +2 -2
- package/dist/{firewall-BsZxVitA.mjs → firewall-DziiEsR8.mjs} +20 -20
- package/dist/{flagship-qBohOZaM.mjs → flagship-xOtgddUK.mjs} +11 -11
- package/dist/{fraud-vGNdrSm-.mjs → fraud-BUS7i5Yh.mjs} +1 -1
- package/dist/generate-D6V4Q58z.mjs +2 -0
- package/dist/get-BTisquA3.mjs +2 -0
- package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
- package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
- package/dist/healthchecks-CbD2PsnM.mjs +22 -0
- package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
- package/dist/{iam-Dl_n_Lqq.mjs → iam-DvsCztqU.mjs} +9 -9
- package/dist/{images-vMtXk2Rf.mjs → images-BipVjHNw.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/init-LvFgCsNX.mjs +43 -0
- package/dist/{intel-Bq4GGXv-.mjs → intel-D1LPkkBM.mjs} +31 -41
- package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
- package/dist/interactive-pjVqirHx.mjs +2 -0
- package/dist/{ips-BcvZS46g.mjs → ips-2iUGs8ws.mjs} +1 -1
- package/dist/{k2-DL4hrVTj.mjs → k2-DGzRm3NJ.mjs} +2 -2
- package/dist/{kv-BLo9wMgb.mjs → kv-BW-s9MJY.mjs} +4 -4
- package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
- package/dist/load-balancers-CtnusAzP.mjs +76 -0
- package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
- package/dist/local-DCnFIgLJ.mjs +2 -0
- package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
- package/dist/login-CqZJgUF1.mjs +5 -0
- package/dist/{login-Du_W6b9o.mjs → login-DR60WiAY.mjs} +1 -1
- package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
- package/dist/{logos-BuhvSu_H.mjs → logos-Yzhd-VKb.mjs} +2 -2
- package/dist/logpush-JYG4gXZ-.mjs +46 -0
- package/dist/{logs-CaKOk-1v.mjs → logs-DLblEjK0.mjs} +3 -3
- package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
- package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-D2px4Ep4.mjs} +9 -9
- package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-Bnwsi0UQ.mjs} +170 -170
- package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-CTtNoxzW.mjs} +9 -9
- package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-B92mJi5i.mjs} +2 -2
- package/dist/{matches-DkLSWb5X.mjs → matches-CzbL1XD-.mjs} +1 -1
- package/dist/{mcp-BcV1XqE8.mjs → mcp-Cic_aMer.mjs} +10 -10
- package/dist/{mesh-CSSlZ-0F.mjs → mesh-DZTgD16C.mjs} +14 -14
- package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
- package/dist/{monetization-B-nJ0SyI.mjs → monetization-DCQ2_niU.mjs} +4 -4
- package/dist/{network-ZzxQ_Dcz.mjs → network-BqMqD2qn.mjs} +27 -25
- package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
- package/dist/o11y-CS5q1vSh.mjs +93 -0
- package/dist/oauth-DPLYUvRl.mjs +2 -0
- package/dist/oauth-DdYSPYoE.mjs +4 -0
- package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
- package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
- package/dist/organization-DFRN2g6z.mjs +75 -0
- package/dist/{organizations-CcgZPmFl.mjs → organizations-yiGopnKf.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
- package/dist/output-O6b9MR9R.mjs +2 -0
- package/dist/{page-rules-DFfqfllI.mjs → page-rules-F1Jdxx6A.mjs} +4 -4
- package/dist/pages-CezC0YrR.mjs +54 -0
- package/dist/pay-per-crawl-fZ-kTBbN.mjs +38 -0
- package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-B14BTKVI.mjs} +8 -8
- package/dist/pipelines-BN7ydBHl.mjs +44 -0
- package/dist/precursor-B88RDDZT.mjs +4 -0
- package/dist/previews-CiqRIq_k.mjs +7 -0
- package/dist/process-DiXf4VPi.mjs +2 -0
- package/dist/{progress-DaQ4MzBI.mjs → progress-CdlDthXA.mjs} +1 -1
- package/dist/{prompt-KWYZvJWM.mjs → prompt-1AC-qwxS.mjs} +1 -1
- package/dist/{queries-DoyhspQf.mjs → queries-C2sgUI9j.mjs} +3 -3
- package/dist/{queues-BPxTU2rU.mjs → queues-DCP5x-PZ.mjs} +17 -17
- package/dist/{r2-CQt4S7o7.mjs → r2-D7UhzWR7.mjs} +21 -21
- package/dist/{radar-CALpR1vq.mjs → radar-osOiFeY_.mjs} +1 -1
- package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
- package/dist/{realtime-BiHKBoI4.mjs → realtime-DCnqxiWo.mjs} +90 -87
- package/dist/registrar-DAFYjjRa.mjs +43 -0
- package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-zeNHABZ0.mjs} +11 -9
- package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
- package/dist/{reporting-8aRJD5HX.mjs → reporting-KehV_PXm.mjs} +1 -1
- package/dist/{request-headers-CqfJOkpO.mjs → request-headers-ojAw3pQO.mjs} +1 -1
- package/dist/request-tracers-BStCgh6m.mjs +4 -0
- package/dist/resolve-BGNMAcGR.mjs +2 -0
- package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-3xtSgWG7.mjs} +19 -19
- package/dist/{rules-CFOuN3t2.mjs → rules-7F-G2Bg_.mjs} +6 -6
- package/dist/{rulesets-DkhV2Hny.mjs → rulesets-B0YtS2br.mjs} +20 -20
- package/dist/{rum-BnMW0Tlb.mjs → rum-B3V6tqS-.mjs} +6 -6
- package/dist/{run-Clc3P2u7.mjs → run-B_07PrkW.mjs} +1 -1
- package/dist/run-D6AJfZT-.mjs +2 -0
- package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
- package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
- package/dist/{scim-tvZm6A-r.mjs → scim-CQ9TdajH.mjs} +6 -6
- package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
- package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-BsLMdo1r.mjs} +2 -2
- package/dist/{security-txt-D4pRk7-w.mjs → security-txt-pCAiHvys.mjs} +1 -1
- package/dist/session-BsNzFtPi.mjs +2 -0
- package/dist/shared-CWBjMZDR.mjs +2 -0
- package/dist/smart-shield-BTXQsVxz.mjs +24 -0
- package/dist/{snippets-BIcZ6vSW.mjs → snippets-CYVieyc3.mjs} +3 -3
- package/dist/source-AlTrHNem.mjs +6 -0
- package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
- package/dist/{spectrum-DjDX0geK.mjs → spectrum-DLRr4Q03.mjs} +14 -14
- package/dist/{speed-DiPoFJMm.mjs → speed-BJfaDYxz.mjs} +13 -13
- package/dist/sql-DQ4xrdc2.mjs +4 -0
- package/dist/src-BnMvFE3q.mjs +125 -0
- package/dist/ssl-CL1B69Pw.mjs +139 -0
- package/dist/startup-profile-DuaJFX1y.mjs +2 -0
- package/dist/startup-profile-HMblAiBi.mjs +29 -0
- package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
- package/dist/state-DePlO0Kv.mjs +2 -0
- package/dist/{stream-uhn_Zsni.mjs → stream-DrMZOO5u.mjs} +55 -55
- package/dist/{submit-C3suIDBX.mjs → submit-DjlLoVk2.mjs} +1 -1
- package/dist/tags-DY7Ur1k-.mjs +23 -0
- package/dist/{telemetry-DYjsavEr.mjs → telemetry-BG3kcYsV.mjs} +1 -1
- package/dist/telemetry-Dpm6GfZD.mjs +2 -0
- package/dist/{tenant-DK88yQM4.mjs → tenant-BEMfNMjO.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
- package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
- package/dist/tunnels-_JXe-UgM.mjs +29 -0
- package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DXEfneQq.mjs} +5 -5
- package/dist/ui-CY79jlGZ.mjs +2 -0
- package/dist/update-check-DfbYVefm.mjs +2 -0
- package/dist/{update-check-BhhtSXVZ.mjs → update-check-atcehhBC.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-a0mY4UsC.mjs → url-info-B1kL9asc.mjs} +1 -1
- package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
- package/dist/url-scanner-OnZP_-jm.mjs +16 -0
- package/dist/{user-DDH9lxf5.mjs → user-BBBuFNj4.mjs} +59 -59
- package/dist/{vectorize-DaT3amFV.mjs → vectorize-DcctB8bw.mjs} +17 -17
- package/dist/version-CLgSHoNm.mjs +2 -0
- package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-JaFE5wP1.mjs} +13 -13
- package/dist/{web-assets-NqNglLSI.mjs → web-assets-Cu0swUPe.mjs} +35 -35
- package/dist/{web3-UnCUuIfB.mjs → web3-C67z4OtQ.mjs} +6 -6
- package/dist/workers-ClTP0Ysl.mjs +43 -0
- package/dist/workers-builds-C5wKhvKe.mjs +14 -0
- package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-rxwkYyb3.mjs} +25 -22
- package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
- package/dist/{workflows-Dq-k81hU.mjs → workflows-COJ5jwvk.mjs} +24 -24
- package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
- package/dist/zaraz-BkZ7yW05.mjs +22 -0
- package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-lUFLYuL1.mjs} +509 -454
- package/dist/{zone-DcZIUTWt.mjs → zone-CC1_qxt-.mjs} +1 -1
- package/dist/{zones-BVdvYUCv.mjs → zones-BRiLlTmW.mjs} +45 -36
- package/package.json +14 -14
- package/dist/account-tags-zvHRQZxb.mjs +0 -15
- package/dist/ai-search-CtfW5fzl.mjs +0 -79
- package/dist/auth-C530fHKQ.mjs +0 -2
- package/dist/auth-Ccm5viK_.mjs +0 -2
- package/dist/auth-MNz2D-PD.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-ChXohmNG.mjs +0 -42
- package/dist/build-BRJnyeu8.mjs +0 -2
- package/dist/builds-DmEFTQTa.mjs +0 -71
- package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
- package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
- package/dist/client-certificates-B3UxH_Au.mjs +0 -13
- package/dist/cloudforce-one-DN5N3C3w.mjs +0 -405
- package/dist/containers-DCH6MFjY.mjs +0 -78
- package/dist/cps-Due0P5IW.mjs +0 -6
- package/dist/csam-scanner-DvLrPw45.mjs +0 -10
- package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
- package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
- package/dist/custom-hostnames-DI_dFaof.mjs +0 -27
- package/dist/custom-pages-ubava9Qm.mjs +0 -21
- package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
- package/dist/deploy-context-C0iVbWRG.mjs +0 -56
- package/dist/discover-DIDEGKo3.mjs +0 -2
- package/dist/error-sanitization-CIQOep3I.mjs +0 -2
- package/dist/generate-D80-1GnZ.mjs +0 -2
- package/dist/get-By1q8YlI.mjs +0 -2
- package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
- package/dist/hostnames-CLlaMqHu.mjs +0 -11
- package/dist/init-_7djeBVw.mjs +0 -43
- package/dist/interactive-DGUWZ2Gk.mjs +0 -2
- package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
- package/dist/keys-BSV5IXdU.mjs +0 -4
- package/dist/load-balancers-CCCWoQXv.mjs +0 -76
- package/dist/local-DxWDQDnG.mjs +0 -2
- package/dist/login-DT6Q1UJw.mjs +0 -5
- package/dist/logpush-DgZtF9vG.mjs +0 -46
- package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
- package/dist/o11y-LG6Y9LUZ.mjs +0 -93
- package/dist/oauth-Bx693Af5.mjs +0 -2
- package/dist/oauth-CP82E1_0.mjs +0 -4
- package/dist/organization-DMr_z6n4.mjs +0 -71
- package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
- package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
- package/dist/output-Co4xdFf6.mjs +0 -2
- package/dist/pages-BkcL5rC4.mjs +0 -54
- package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
- package/dist/pipelines-DUMIVwof.mjs +0 -44
- package/dist/precursor-DsGbA_YJ.mjs +0 -4
- package/dist/previews-Cma3-M7K.mjs +0 -7
- package/dist/process-2wmDCy17.mjs +0 -2
- package/dist/registrar-gERQ3b85.mjs +0 -43
- package/dist/request-tracers-DcnwQg3K.mjs +0 -4
- package/dist/resolve-BpgXeklt.mjs +0 -2
- package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
- package/dist/run-CHNyLZLG.mjs +0 -2
- package/dist/session-Cq3YNLoI.mjs +0 -2
- package/dist/shared-zePemxHi.mjs +0 -2
- package/dist/smart-shield-2egm1Vaw.mjs +0 -24
- package/dist/source-mXUcrTVw.mjs +0 -6
- package/dist/sql-DLjCt_R3.mjs +0 -4
- package/dist/src-CutrsNl4.mjs +0 -125
- package/dist/ssl-vNzK0c9S.mjs +0 -45
- package/dist/startup-profile-BOaseXnO.mjs +0 -29
- package/dist/startup-profile-BwEZFVGS.mjs +0 -2
- package/dist/state-CODDG9Nx.mjs +0 -2
- package/dist/tags-Dy2jG-Dt.mjs +0 -4
- package/dist/telemetry-Bdv5LZZs.mjs +0 -2
- package/dist/tunnels-DjbomhCa.mjs +0 -29
- package/dist/ui-BtIBQeaG.mjs +0 -2
- package/dist/update-check-Dld7rbLd.mjs +0 -2
- package/dist/url-scanner-D0egjBe5.mjs +0 -16
- package/dist/values-Bfr5-bL6.mjs +0 -4
- package/dist/version-CAuKDZAG.mjs +0 -2
- package/dist/workers-DfA9ugmb.mjs +0 -40
- package/dist/workers-builds-Cy6fdtm5.mjs +0 -14
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
- package/dist/zaraz-Dpr1pLDx.mjs +0 -22
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{n,t as r}from"./local-B4sZZTRA.mjs";import{a as i,i as a,n as o}from"./auth-BaUNb1Ed.mjs";import{a as s,t as c}from"./context-BQ6KeMgq.mjs";import{t as l}from"./output-O6b9MR9R.mjs";import{t as u}from"./dry-run-DQmFkNK_.mjs";import{t as d}from"./progress-CdlDthXA.mjs";import{n as f,t as p}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as m,n as h,r as g,s as _,t as v}from"./body-parser-ChnyBsfm.mjs";import{n as y}from"./input-validation-D7z60HJH.mjs";import{a as ee,i as b,n as te,o as x,r as S}from"./prompt-1AC-qwxS.mjs";import{_ as C,a as w,c as ne,d as T,g as E,h as D,i as O,m as k,o as re,p as ie,r as A,s as j,t as ae,u as oe}from"./schema-flags-DY3OKCvr.mjs";import{domainToASCII as se}from"node:url";import{isDeepStrictEqual as ce}from"node:util";var M={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/extensions/${e.extension}`};function le(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <extension>`,describe:`Get extension`,builder:le,handler:async e=>p({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(M,{account_id:n,extension:e.extension}));l(i,{successLabel:`Loaded`})})};var de={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/extensions`,query:[`name`,`cursor`,`per_page`,`direction`,`sort_by`]};function fe(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
3
|
+
Pass this value to fetch the next page of results. Omit (or
|
|
4
|
+
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List extensions`,builder:fe,handler:async e=>p({command:`registrar extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){let e=await s();u({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let n=await o(e),i=e.local?r:await c();e.accountId=i;let a=await d(`Loading`,async()=>n.send(de,{account_id:i,...t}));l(a,{successLabel:`Loaded`})})},me={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(ue).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:e=>t`/accounts/${e.account_id}/registrar/domain-check`,body:`json`,errors:{400:`BadRequestError`}};function he(e){return e.usage("$0 registrar registrations check <domains...>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,array:!0,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const ge={command:`check <domains...>`,describe:`Check domain availability`,builder:he,handler:async e=>p({command:`registrar registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?v({domains:e.domains}):h(e.body)});return}let t=await o(e),n=e.local?r:await c();if(e.accountId=n,e.body){let r=h(e.body),i=await d(`Creating`,async()=>t.send(N,{body:r,account_id:n}));l(i,{successLabel:`Created`});return}let i=v({domains:e.domains}),a=await d(`Creating`,async()=>t.send(N,{body:i,account_id:n}));l(a,{successLabel:`Created`})})};var _e={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/registrations/${e.domain_name}/registration-status`};function ve(e){return e.usage("$0 registrar registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:ve,handler:async e=>p({command:`registrar registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(_e,{account_id:n,domain_name:e[`domain-name`]}));l(i,{successLabel:`Loaded`})})};var be={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/registrations/${e.domain_name}/transfer-in-status`};function xe(e){return e.usage("$0 registrar registrations get-transfer-status <domain-name>\n\nReturns the current status of a domain transfer workflow. Use this endpoint to poll transfer progress after initiating a transfer with `POST /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in`. The URL is provided in the `links.self` field of the transfer response. ### Transfer timelines Transfers typically take 1–10 days due to ICANN-mandated approval windows. ### Workflow states **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `in_progress`: Transfer has been submitted to the registry and is being processed. Continue polling. - `blocked`: The workflow is waiting on the losing registrar or registry to release the domain. This is the **most common state** for transfers and is entirely normal — it means the ICANN transfer approval window is in effect. The losing registrar has up to 5 days to approve or reject. Continue polling with longer intervals (e.g., every 30–60 minutes). - `action_required`: The user needs to take action (e.g., the FOA email needs to be accepted). See `context` for details on what is needed. - `pending`: Transfer workflow created but not yet started processing. ### Polling guidance Adjust your polling interval based on the current workflow state: - `pending` or `in_progress`: Poll every 30 seconds. - `blocked`: The transfer is waiting on a third party (e.g., losing registrar approval). Poll every 30–60 minutes. - `action_required`: Stop polling. The workflow will not advance until the user takes action. Check `context` for details on what is needed. - `succeeded` or `failed`: Terminal — stop polling.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-transfer-status <domain-name>`,describe:`Get Transfer Status`,builder:xe,handler:async e=>p({command:`registrar registrations get-transfer-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar registrations get-transfer-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(be,{account_id:n,domain_name:e[`domain-name`]}));l(i,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/registrations/${e.domain_name}/update-status`};function we(e){return e.usage("$0 registrar registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:we,handler:async e=>p({command:`registrar registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(Ce,{account_id:n,domain_name:e[`domain-name`]}));l(i,{successLabel:`Loaded`})})};var Ee={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/registrations/${e.domain_name}`};function De(e){return e.usage("$0 registrar registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get <domain-name>`,describe:`Get Registration`,builder:De,handler:async e=>p({command:`registrar registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(Ee,{account_id:n,domain_name:e[`domain-name`]}));l(i,{successLabel:`Loaded`})})};var ke={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/registrations`,query:[`cursor`,`per_page`,`direction`,`sort_by`]};function Ae(e){return e.usage("$0 registrar registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
5
|
+
Pass this value to fetch the next page of results. Omit (or
|
|
6
|
+
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to registration date (`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`List Registrations`,builder:Ae,handler:async e=>p({command:`registrar registrations list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){let e=await s();u({command:`cf registrar registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar/registrations`,pathParams:{},query:t,bodyKind:`none`});return}let n=await o(e),i=e.local?r:await c();e.accountId=i;let a=await d(`Loading`,async()=>n.send(ke,{account_id:i,...t}));l(a,{successLabel:`Loaded`})})};var Me={method:`GET`,path:e=>t`/accounts/${e.account_id}/registrar/domain-search`,query:[`q`,`extensions`,`limit`],joined:[`extensions`],errors:{400:`BadRequestError`}};function Ne(e){return e.usage('$0 registrar registrations search\n\nSearches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. ### Use cases - Brand name discovery (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., "example.com" → example.com, example.app, example.xyz) ### Workflow 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check` with the user\'s chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., "com" or ".app") is not supported. Provide a keyword or domain name.').option(`query`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
|
|
7
|
+
- Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.
|
|
8
|
+
- Domain names: "example.com" returns example.com and variations across extensions`,demandOption:!0}).option(`extensions`,{type:`string`,description:`Limits results to specific domain extensions from the supported set. If not specified,
|
|
9
|
+
returns results across all supported extensions. Extensions not in the supported
|
|
10
|
+
set are silently ignored.`}).option(`limit`,{type:`number`,description:`Maximum number of domain suggestions to return. Defaults to 20 if not specified.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`search`,describe:`Search for available domains`,builder:Ne,handler:async e=>p({command:`registrar registrations search`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={q:e.query,extensions:e.extensions,limit:e.limit};if(e.dryRun){let e=await s();u({command:`cf registrar registrations search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar/domain-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await o(e),i=e.local?r:await c();e.accountId=i;let a=await d(`Loading`,async()=>n.send(Me,{account_id:i,...t}));l(a,{successLabel:`Loaded`})})};var Fe={method:`POST`,path:e=>t`/accounts/${e.account_id}/registrar/domain-transfer-check`,body:`json`,errors:{400:`BadRequestError`,503:`ServiceUnavailableError`}};function Ie(e){return e.usage("$0 registrar registrations transfer-check\n\nPerforms real-time, authoritative eligibility checks directly against needed requirements. Use this endpoint to verify a domain is available before attempting a transfer via `POST /registrations/:domain_name/transfer-in`. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Behavior - Maximum 10 domains per request - Pricing is only returned for domains where `transferable: true` - Results are not cached; each request queries the registry & other needed upstreams ## Extension Support All `.uk` extensions (`.uk`, `.co.uk`, etc) do not support auth codes. As such, Cloudflare will ignore the `auth_code` section of this request for `.uk` domains. This means that a `.uk` domain depends on public data to obtain domain information, so it might be a few minutes outdated. ### Workflow 1. Call this endpoint with domains the user wants to transfer. 2. For each domain where `transferable: true`, present pricing to the user. 3. For each domain where `transferable: false`, present reasons to the user 4. Proceed to `POST /registrations/:domain_name/transfer-in` only for the `transferable: true` domains.").option(`domains`,{type:`string`,description:`List of domain objects to evaluate for transfer eligibility. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of transferable domain objects to check.`})}const Le={command:`transfer-check`,describe:`Check domain transfer eligibility`,builder:Ie,handler:async e=>p({command:`registrar registrations transfer-check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();u({command:`cf registrar registrations transfer-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/domain-transfer-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?v({domains:m(e.domains,`domains`)}):h(e.body)});return}let t=await o(e),n=e.local?r:await c();if(e.accountId=n,e.body){let r=h(e.body),i=await d(`Creating`,async()=>t.send(Fe,{body:r,account_id:n}));l(i,{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);let i=v({domains:m(e.domains,`domains`)}),a=await d(`Creating`,async()=>t.send(Fe,{body:i,account_id:n}));l(a,{successLabel:`Created`})})};function Re(e){return e.usage("$0 registrar registrations transfer-in <domain-name>\n\nStarts a domain transfer-in workflow. This is typically a billable operation — successful transfers charge the account's default payment method, except for extensions with zero transfer pricing (e.g. UK extensions). All successful domain transfers are non-refundable. ### How transfers work Domain transfers move a domain from another registrar to Cloudflare. Transfers typically take 1-10 days due to ICANN-mandated approval windows. ### Prerequisites - The domain must already have a zone in the Cloudflare account (added through the dashboard or zone API). - The zone must have DNSSec disabled. - For billable transfers (i.e. extensions with non-zero transfer pricing), the account must have a billing profile with a valid default payment method. Set this up at `https://dash.cloudflare.com/{account_id}/billing/payment-info`. - The domain must be unlocked at the current registrar. - An authorization/EPP code from the current registrar is required, except for UK extensions — see Auth code below. ### Auth code An authorization code (also called EPP code, transfer key, or auth-info code) is required for most extensions, with the exception of UK extensions. Obtain this from your current registrar's control panel. The auth code in the request body must be base64-encoded per RFC 4648 §4 (standard alphabet, no line breaks). ### Response behavior Successful transfer initiation returns `202 Accepted`. Validation or initiation failures return the documented `4XX` responses. Poll `GET /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in-status` to track progress. ### Premium domains Premium domain transfers are not currently supported by this API. Please use the [dashboard](https://dash.cloudflare.com/) for now. ### Billing The account's default payment method is charged upon successful transfer completion, unless the extension has zero transfer pricing (e.g. UK extensions). The transfer adds time to the domain's existing expiration date (typically 1 year).").positional(`domain-name`,{type:`string`,description:`Domain name to transfer.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to indicate a preference for asynchronous\nprocessing (RFC 7240)."}).option(`auth-code`,{type:`string`,description:`The EPP/authorization code from your current registrar, base64-encoded
|
|
11
|
+
per RFC 4648 §4. Obtain this from your current registrar's control panel.
|
|
12
|
+
Required for all extensions, except for UK.
|
|
13
|
+
`}).option(`auto-renew`,{type:`boolean`,description:"Enable or disable automatic renewal after transfer. Defaults to `false` if omitted.\n",default:!1}).option(`contact-extensions`,{type:`string`,description:"Registry-specific contact extension values for the registrant.\n`GET /accounts/{account_id}/registrar/extensions/{extension}` documents the\nrequired keys and allowed values for each extension in the\n`transfer_schema.properties.contact_extensions` object.\n\nExamples include `.us` nexus fields, `.uk` registrant type fields,\nand `.ca` legal type fields. Include this object only when the extension's\ntransfer schema defines `contact_extensions`. Provide as a JSON object or @path/to/file.json."}).option(`contacts-administrator-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
|
|
14
|
+
communications from the registry, including ownership verification
|
|
15
|
+
and renewal notices.
|
|
16
|
+
`}).option(`contacts-administrator-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
|
|
17
|
+
Most registrations do not require a fax number.
|
|
18
|
+
`}).option(`contacts-administrator-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-administrator-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-administrator-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-billing-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
|
|
19
|
+
communications from the registry, including ownership verification
|
|
20
|
+
and renewal notices.
|
|
21
|
+
`}).option(`contacts-billing-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
|
|
22
|
+
Most registrations do not require a fax number.
|
|
23
|
+
`}).option(`contacts-billing-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-billing-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-billing-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-registrant-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
|
|
24
|
+
communications from the registry, including ownership verification
|
|
25
|
+
and renewal notices.
|
|
26
|
+
`}).option(`contacts-registrant-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
|
|
27
|
+
Most registrations do not require a fax number.
|
|
28
|
+
`}).option(`contacts-registrant-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-registrant-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-registrant-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`contacts-technical-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
|
|
29
|
+
communications from the registry, including ownership verification
|
|
30
|
+
and renewal notices.
|
|
31
|
+
`}).option(`contacts-technical-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
|
|
32
|
+
Most registrations do not require a fax number.
|
|
33
|
+
`}).option(`contacts-technical-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` without spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan)."}).option(`contacts-technical-postal-info-name`,{type:`string`,description:"Full legal name of the contact, including all required name components for an individual or authorized representative. Some registries require a complete personal name that includes a family or last name where applicable. Provide the complete name in this single field, for example `Ada Lovelace`; do not send separate first-name or last-name fields."}).option(`contacts-technical-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`privacy-mode`,{type:`string`,description:`WHOIS privacy mode to apply after transfer completes. Defaults to
|
|
34
|
+
the extension's default privacy mode (typically \`redaction\`).
|
|
35
|
+
`,choices:[`off`,`redaction`]}).coerce(`privacy-mode`,e=>y(e,`privacy-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`contacts-administrator-email`,`contacts-administrator-fax`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-administrator-postal-info-organization`,`contacts-billing-email`,`contacts-billing-fax`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-billing-postal-info-organization`,`contacts-registrant-email`,`contacts-registrant-fax`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-registrant-postal-info-organization`,`contacts-technical-email`,`contacts-technical-fax`,`contacts-technical-phone`,`contacts-technical-postal-info-name`,`contacts-technical-postal-info-organization`].some(t=>e[t]!==void 0)){let t=[`contacts-administrator-email`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-billing-email`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-registrant-email`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-technical-email`,`contacts-technical-phone`,`contacts-technical-postal-info-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --contacts-* flag is set`)}return!0})}const ze={command:`transfer-in <domain-name>`,describe:`Initiate Transfer`,builder:Re,handler:async e=>p({command:`registrar registrations transfer-in`,classification:{safeFlags:[`auto-renew`,`privacy-mode`,`dry-run`]}},e,async()=>{let t={};if(e.prefer!==void 0&&(t.Prefer=String(e.prefer)),e.dryRun){let t=await s();u({command:`cf registrar registrations transfer-in`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/transfer-in`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`json`,body:e.body===void 0?v({auth_code:y(e[`auth-code`],`auth-code`,`text`),auto_renew:e[`auto-renew`],contact_extensions:g(e[`contact-extensions`],`contact-extensions`),contacts:{administrator:{email:y(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`),fax:y(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`),phone:y(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`),postal_info:{name:y(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`),organization:y(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)}},billing:{email:y(e[`contacts-billing-email`],`contacts-billing-email`,`text`),fax:y(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`),phone:y(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`),postal_info:{name:y(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`),organization:y(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)}},registrant:{email:y(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`),fax:y(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`),phone:y(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`),postal_info:{name:y(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`),organization:y(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)}},technical:{email:y(e[`contacts-technical-email`],`contacts-technical-email`,`text`),fax:y(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`),phone:y(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`),postal_info:{name:y(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`),organization:y(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)}}},privacy_mode:e[`privacy-mode`]},[[`contact_extensions`]]):h(e.body)});return}let n=await o(e),i=e.local?r:await c();if(e.accountId=i,e.body){let r=h(e.body),o=await d(`Creating`,async()=>a(n,`POST`,`/accounts/${i}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}/transfer-in`,{body:r,headers:Object.keys(t).length>0?t:void 0}));l(o,{successLabel:`Created`});return}let f={};e[`auth-code`]!==void 0&&_(f,[`auth_code`],y(e[`auth-code`],`auth-code`,`text`)),e[`auto-renew`]!==void 0&&_(f,[`auto_renew`],e[`auto-renew`]),e[`contact-extensions`]!==void 0&&_(f,[`contact_extensions`],g(e[`contact-extensions`],`contact-extensions`)),e[`contacts-administrator-email`]!==void 0&&_(f,[`contacts`,`administrator`,`email`],y(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`)),e[`contacts-administrator-fax`]!==void 0&&_(f,[`contacts`,`administrator`,`fax`],y(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`)),e[`contacts-administrator-phone`]!==void 0&&_(f,[`contacts`,`administrator`,`phone`],y(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`)),e[`contacts-administrator-postal-info-name`]!==void 0&&_(f,[`contacts`,`administrator`,`postal_info`,`name`],y(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`)),e[`contacts-administrator-postal-info-organization`]!==void 0&&_(f,[`contacts`,`administrator`,`postal_info`,`organization`],y(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)),e[`contacts-billing-email`]!==void 0&&_(f,[`contacts`,`billing`,`email`],y(e[`contacts-billing-email`],`contacts-billing-email`,`text`)),e[`contacts-billing-fax`]!==void 0&&_(f,[`contacts`,`billing`,`fax`],y(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`)),e[`contacts-billing-phone`]!==void 0&&_(f,[`contacts`,`billing`,`phone`],y(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`)),e[`contacts-billing-postal-info-name`]!==void 0&&_(f,[`contacts`,`billing`,`postal_info`,`name`],y(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`)),e[`contacts-billing-postal-info-organization`]!==void 0&&_(f,[`contacts`,`billing`,`postal_info`,`organization`],y(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)),e[`contacts-registrant-email`]!==void 0&&_(f,[`contacts`,`registrant`,`email`],y(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`)),e[`contacts-registrant-fax`]!==void 0&&_(f,[`contacts`,`registrant`,`fax`],y(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`)),e[`contacts-registrant-phone`]!==void 0&&_(f,[`contacts`,`registrant`,`phone`],y(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`)),e[`contacts-registrant-postal-info-name`]!==void 0&&_(f,[`contacts`,`registrant`,`postal_info`,`name`],y(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`)),e[`contacts-registrant-postal-info-organization`]!==void 0&&_(f,[`contacts`,`registrant`,`postal_info`,`organization`],y(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)),e[`contacts-technical-email`]!==void 0&&_(f,[`contacts`,`technical`,`email`],y(e[`contacts-technical-email`],`contacts-technical-email`,`text`)),e[`contacts-technical-fax`]!==void 0&&_(f,[`contacts`,`technical`,`fax`],y(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`)),e[`contacts-technical-phone`]!==void 0&&_(f,[`contacts`,`technical`,`phone`],y(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`)),e[`contacts-technical-postal-info-name`]!==void 0&&_(f,[`contacts`,`technical`,`postal_info`,`name`],y(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`)),e[`contacts-technical-postal-info-organization`]!==void 0&&_(f,[`contacts`,`technical`,`postal_info`,`organization`],y(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)),e[`privacy-mode`]!==void 0&&_(f,[`privacy_mode`],e[`privacy-mode`]);let p=await d(`Creating`,async()=>a(n,`POST`,`/accounts/${i}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}/transfer-in`,{body:f,headers:Object.keys(t).length>0?t:void 0}));l(p,{successLabel:`Created`})})};function Be(e){return e.usage("$0 registrar registrations update <domain-name>\n\nUpdates an existing domain registration. By default, the server holds the connection for a bounded, server-defined amount of time while the update completes. Most updates finish within this window and return `200 OK` with a completed workflow status. If the update is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`. This endpoint currently supports updating `auto_renew` only.").positional(`domain-name`,{type:`string`,description:`Domain name to update.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to receive an immediate `202 Accepted` without\nwaiting for the operation to complete (RFC 7240)."}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal.
|
|
36
|
+
Setting this field to \`true\` authorizes Cloudflare to charge the
|
|
37
|
+
account's default payment method up to 30 days before domain expiry
|
|
38
|
+
to renew the domain automatically. Renewal pricing may change over
|
|
39
|
+
time based on registry pricing.
|
|
40
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. "})}const Ve={command:`update <domain-name>`,describe:`Update Registration`,builder:Be,handler:async e=>p({command:`registrar registrations update`,classification:{safeFlags:[`auto-renew`,`dry-run`]}},e,async()=>{let t={};if(e.prefer!==void 0&&(t.Prefer=String(e.prefer)),e.dryRun){let t=await s();u({command:`cf registrar registrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`json`,body:e.body===void 0?v({auto_renew:e[`auto-renew`]}):h(e.body)});return}let n=await o(e),i=e.local?r:await c();if(e.accountId=i,e.body){let r=h(e.body),o=await d(`Updating`,async()=>a(n,`PATCH`,`/accounts/${i}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:r,headers:Object.keys(t).length>0?t:void 0}));l(o,{successLabel:`Updated`});return}let f={};e[`auto-renew`]!==void 0&&_(f,[`auto_renew`],e[`auto-renew`]);let p=await d(`Updating`,async()=>a(n,`PATCH`,`/accounts/${i}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:f,headers:Object.keys(t).length>0?t:void 0}));l(p,{successLabel:`Updated`})})};async function P(e,t,n){let r=x(n),i=se(n.trim().replace(/\.$/,``)).toLowerCase(),a=await d(`Checking availability`,()=>e.send(N,{account_id:t,body:{domains:[n]}})),o=i===``?[]:a.domains.filter(e=>e.name.toLowerCase()===i),s=o.length===1?o[0]:void 0;if(!s)throw Error(`The availability check returned no result for ${r}, so cf cannot safely register it.`);if(s.registrable!==!0&&s.reason===`domain_premium`)throw Error(`${r} is a premium domain (domain_premium). Premium registration is not supported by this API, so cf will not submit it.`);if(s.registrable!==!0){let e=s.reason===void 0?``:` (${x(s.reason)})`;throw Error(`${r} is not available for registration${e}.`)}if(s.tier===`premium`)throw Error(`${r} is a premium domain. Premium registration is not supported by this API, so cf will not submit it.`);if(s.tier!==`standard`)throw Error(`${r} is not confirmed as a standard domain. This API only supports standard registrations, so cf will not submit it.`);if(!s.pricing)throw Error(`The availability check returned no pricing for ${r}, so cf cannot safely register it.`);return s.pricing}const F=`registrar-extension-schema`;function He(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function Ue(e,t,n,r){let i;try{i=r===void 0?await n.send(M,{account_id:t,extension:e}):await n.send(M,{account_id:t,extension:e},{timeoutInSeconds:r/1e3,maxRetries:0})}catch(e){return{ok:!1,reason:k(e)}}let a=D(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function I(e,t,n,r,i){let a=t?[t]:He(e);if(a.length===0)return{ok:!1,reason:`'${e}' has no extension — pass a fully qualified domain name`};let o,s=`not found`;for(let e of a){let t=E(F,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:k(e)}}let a;if(i!==void 0&&(a=i-Date.now(),a<=0))return{ok:!1,reason:`the request timed out`};let c=await Ue(e,n,o,a);if(c.ok)return C(F,[n,e],c.schema),c;if(s=c.reason,!/not found/i.test(c.reason))return c}return{ok:!1,reason:a.length>1?`no registration schema for ${a.map(e=>`.${e}`).join(` or `)} (${s})`:s}}const We=/* @__PURE__ */ new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),Ge={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function L(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function Ke(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function R(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function z(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function qe(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=z(n,e),i=R(t),a=L(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&T(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function Je(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:L(Ge,n)??Ke(n)).join(` · `)}function B(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&We.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...B(a,t,e));continue}let o=z(t,e);r.push([Je(e,o),qe(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function V(e,t,n){if(Object.hasOwn(e,n))return R(e[n]);let r=Ye(t,n);return r===void 0?`API default`:`${R(r)} (default)`}function H(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(H)]}function U(e,t){return e===void 0?[]:[...H(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>U(e,t))]}function Ye(e,t){let n=U(e,t),r=n[0];return n.length>0&&n.every(e=>ce(e,r))?r:void 0}function W(t){let n=t.map(([e,t])=>[x(e),x(t)]),r=Math.min(32,Math.max(...n.map(([e])=>e.length),0));return n.map(([t,n])=>`│ ${e.muted(t.padEnd(r))} ${e.bold(n)}`)}function Xe(t){let n=[[`Domain`,t.domain],[`Account`,t.accountId],[`Registration term`,`${t.years} ${t.years===1?`year`:`years`}`],[`Due now`,t.quotedCost],[`Renewal price`,`${t.pricing.currency} ${t.pricing.renewal_cost} per year`],[`Auto-renew`,V(t.body,t.schema,`auto_renew`)],[`Privacy mode`,V(t.body,t.schema,`privacy_mode`)]],r=B(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...W(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...W(r)]:[],`│`].join(`
|
|
41
|
+
`)}const G=[`domain_name`],K=`Fully qualified domain name to register, e.g. example.travel`,q=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function Ze(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function Qe(e,t,n){return t.some(t=>{if(t.path[0]!==e||t.path.length===1)return!1;let r=t.name.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());return Object.hasOwn(n,t.name)&&n[t.name]!==void 0||Object.hasOwn(n,r)&&n[r]!==void 0})}function $e(e){if(e.choices===void 0)return;let t=(e.schema.enum??(e.schema.oneOf??e.schema.anyOf)?.flatMap(e=>e.const===void 0?e.enum??[]:[e.const]))?.filter(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`);return t?.length===e.choices.length?t:void 0}function et(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:x(n);return{path:Ze(e.path),flag:`--${e.name}`,question:j(e),description:r,choices:$e(e)?.map(t=>{let n=String(t),r=e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n;return{value:t,label:x(r)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function J(e,t,n,r,i){let a=w(n,r);return a.length!==0&&(l({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(et),validationErrors:i}),!0)}function tt(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function nt(e,t){let n=tt(e.registration_cost),r=tt(e.renewal_cost);if(!n||!r)return;let i=Math.max(n.scale,r.scale),a=e=>10n**BigInt(e),o=n.units*a(i-n.scale)+r.units*a(i-r.scale)*BigInt(t-1);if(i===0)return o.toString();let s=a(i);return`${o/s}.${(o%s).toString().padStart(i,`0`)}`}function rt(e,t){let n=nt(e,t);if(!n||!/^[A-Z]{3}$/.test(e.currency))throw Error(`The availability check returned invalid pricing, so cf cannot safely confirm this registration.`);return`${e.currency} ${n}`}function Y(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function X(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&A(e.if)&&T(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=X(a,t,n,r,i);e.found&&(o=!0,s=Y(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(A)?a.filter(e=>st(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>X(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=Y(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function Z(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>Z(e,t))]}function Q(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function it(e){let t=[...typeof e.minimum==`number`?[e.exclusiveMinimum===!0?Math.floor(e.minimum)+1:Math.ceil(e.minimum)]:[],...typeof e.exclusiveMinimum==`number`?[Math.floor(e.exclusiveMinimum)+1]:[],...(e.allOf??[]).flatMap(e=>{let t=it(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function at(e){let t=Z(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=Z(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=it(e);return r===void 0?{found:!1}:{found:!0,value:r}}function $(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=Y(a,$(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=Y(a,e.flatMap(e=>$(e).map(e=>[e]))));return a.map(Q)}function ot(e){return e.flatMap(e=>$(e).map(t=>({schema:e,candidate:at(t)})))}function st(e,t,n,r){let i=T(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>T(e,{...n,[t]:r}).length===0)}function ct(e,t){let n=Object.hasOwn(e,`years`),r=X(t,`years`,e,!1);if(!r.found)throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let i=r.bundles.map(Q),a=X(t,`years`,e,!0,n?[]:ot(i).flatMap(({schema:e,candidate:t})=>t.found&&T(e,t.value).length===0?[t.value]:[]));if(!a.found||n&&a.bundles.some(e=>e.length===0))throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let o=a.bundles.map(Q),s=o,c,l;if(n)l=e.years;else{let n=ot(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=T(e,t.value);return n===void 0||(c??=n,!1)});if(A(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&T(t,{...e,years:n.value}).length===0);i.length>0&&(n=[...r,...i])}s=n.map(({schema:e})=>e);let r=n.map(({candidate:e})=>e),[i]=r;l=i?.found===!0&&r.every(e=>e.found&&Object.is(e.value,i.value))?i.value:void 0}if(typeof l!=`number`||!Number.isInteger(l)||l<=0)throw!n&&s.length===0&&c?Error(`The extension schema returned an invalid default registration term: ${c}`):Error(n?`The requested registration term must be a positive whole number of years.`:`The extension schema returned no safe default registration term, so cf cannot safely confirm this registration.`);let u=n?T(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>T(e,l));if(u.length>0)throw Error(n?`The requested registration term is invalid: ${u[0]}`:`The extension schema returned an invalid default registration term: ${u[0]}`);return e.years=l,l}let lt;function ut(e){let t=y(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function dt(e){return lt=e,e.positional(`domain-name`,{type:`string`,description:`Fully qualified domain name, e.g. example.travel`}).option(`extension`,{type:`string`,description:`Extension whose registration schema to use (default: derived from the domain)`}).option(`prefer`,{type:`string`,description:"Set the Prefer header, e.g. `respond-async` to skip the synchronous wait"}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip the registration confirmation prompt`,default:!1}).option(`contacts`,{type:`string`,description:`Registrant contacts as inline JSON or @path to a reusable JSON file`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this extension's input flags`}).epilogue("Input flags depend on the extension: run `cf registrar registrations create <domain> --help`.\ncf rechecks availability and pricing before confirmation. Run `cf registrar registrations check --domains <domain>` to inspect them separately.")}async function ft(t){lt?.showHelp(`log`);let n=ut(t[`domain-name`]);if(!n)return;let r=x(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let a=Date.now()+ie,s=await i(a);if(!s){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the registration fields for ${r}.`)}`);return}let c=await I(n,t.extension,s,()=>o(t),a);console.log(c.ok?`\n${re(ne(c.schema,{exclude:[G]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${x(c.reason)}.`)}`)}async function pt(e,t,n){for(;;){let r=O(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=j(e);if(e.type===`boolean`&&e.schema.const===!0){let r=x(e.schema.description??n);if(!await S(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await b(e.name,r,e.choices,e.choiceLabels):t[e.name]=await ee(e.name,r,{validate:t=>oe(e,t)})}}}function mt(e){let t=h(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function ht(e){let t;if(e.startsWith(`@`))t=y(e,`contacts`,`json`);else try{t=JSON.parse(e)}catch{throw Error(`--contacts must contain a JSON object or @path to a JSON file`)}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--contacts must contain a JSON object or @path to a JSON file`);return t}var gt=f({command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:dt,handler:async e=>{if(e.help){await ft(e);return}if(e.local)throw Error(n);let t={};e.prefer!==void 0&&(t.Prefer=String(e.prefer));let r;if(e.body!==void 0){let t=ae([],e,{reserved:q}).errors.some(e=>e.startsWith(`Unknown flag`));if(e.contacts!==void 0||t)throw Error(`--body cannot be combined with registration field flags. Pass one or the other.`);r=mt(e.body)}let i=e.contacts===void 0?void 0:ht(e.contacts),f=ut(e[`domain-name`]),p=r?.domain_name;if(p!==void 0&&typeof p!=`string`)throw Error(`--body field domain_name must be a string`);if(f!==void 0&&p!==void 0&&f!==p)throw Error(`The positional domain '${x(f)}' does not match --body domain_name '${x(p)}'`);let m=f??p;if(!m){if(r!==void 0){l({submitted:!1,reason:`registration_input_required`,message:`Not submitted. A domain is required to determine the registration schema.`,missingFields:[{path:`/domain_name`,flag:`--domain-name`,question:K}],validationErrors:["`/domain_name` is required"]});return}m=await ee(`domain-name`,K)}let h=x(m);r&&(r.domain_name=m);let g=e.dryRun?await s()??`<account-id>`:await c(),_,v=async()=>(_||=await o(e),_);e.dryRun||await P(await v(),g,m);let y=await I(m,e.extension,g,v);if(!y.ok)throw Error(`Could not load the registration schema for ${h}: ${x(y.reason)}.`);let b=x(y.extension),S=y.schema,C=ne(y.schema,{exclude:[G]});if(!r){if(i!==void 0&&Qe(`contacts`,C,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=i===void 0?void 0:{contacts:i};if(n!==void 0&&delete t.contacts,!await pt(C,t,n))return;let a=ae(C,t,{reserved:q,baseBody:n});if(a.errors.length>0)throw Error(`${a.errors.join(`
|
|
42
|
+
`)}\n\nRun \`cf registrar registrations create ${h} --help\` for .${b}'s registration fields.`);r={domain_name:m,...a.body}}let w;try{w=ct(r,S)}catch(e){let t=T(S,r);if(J(m,y.extension,C,r,t))return;throw e}let E=T(S,r);if(J(m,y.extension,C,r,E))return;if(E.length>0)throw Error(`${E.join(`
|
|
43
|
+
`)}\n\nRun \`cf registrar registrations create ${h} --help\` for this extension's registration fields.`);if(e.dryRun){u({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${g}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:r});return}let D=await P(await v(),g,m),O=rt(D,w);if(e.force||process.stderr.write(`${Xe({domain:m,accountId:g,years:w,quotedCost:O,pricing:D,body:r,schema:S,descriptors:C})}\n`),!await te({force:e.force,message:`Registering ${h} for ${w} ${w===1?`year`:`years`} costs ${O}, charges the account's default payment method, and cannot be refunded.`}))return;if(r.years!==w)throw Error(`The registration term changed after confirmation, so cf will not submit this registration.`);let k=await P(await v(),g,m);if(k.currency!==D.currency||k.registration_cost!==D.registration_cost||k.renewal_cost!==D.renewal_cost)throw Error(`Availability or pricing changed while awaiting confirmation, so cf will not submit this registration. Re-run the command to review the current quote.`);let re=await v();e.accountId=g;let ie=await d(`Registering`,async()=>a(re,`POST`,`/accounts/${g}/registrar/registrations`,{body:r,headers:Object.keys(t).length>0?t:void 0}));l(ie,{successLabel:`Registered ${h}`})}},{command:`registrar registrations create`,recordArgs:!1});const _t={command:`registrations`,describe:`Operations for registrations`,builder:e=>e.command(ge).command(gt).command(Oe).command(ye).command(Se).command(Te).command(je).command(Pe).command(Le).command(ze).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vt={command:`registrar`,describe:`registrar`,builder:e=>e.command(me).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{vt as default};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,r as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-1AC-qwxS.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/extensions/${t.extension}`};function _(e){return e.usage("$0 registrar-sandbox extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <extension>`,describe:`Get extension`,builder:_,handler:async e=>l({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,extension:e.extension}));o(u,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/extensions`,query:[`name`,`cursor`,`per_page`,`direction`,`sort_by`]};function b(e){return e.usage("$0 registrar-sandbox extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
3
3
|
Pass this value to fetch the next page of results. Omit (or
|
|
4
|
-
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List extensions`,builder:b,handler:async e=>l({command:`registrar-sandbox extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let n={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){let e=await i();s({command:`cf registrar-sandbox extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/extensions`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(y,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},S={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/domain-check`,body:`json`,errors:{400:`BadRequestError`}};function w(e){return e.usage("$0 registrar-sandbox registrations check <domains...>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,array:!0,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const T={command:`check <domains...>`,describe:`Check domain availability`,builder:w,handler:async e=>l({command:`registrar-sandbox registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({domains:e.domains}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(C,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let d=p({domains:e.domains}),f=await c(`Creating`,async()=>n.send(C,{body:d,account_id:l}));o(f,{successLabel:`Created`})})};function E(e){return e.usage("$0 registrar-sandbox registrations create\n\nStarts a domain registration workflow. ### Prerequisites - The account must not already be at the maximum supported domain limit. A single account may own up to 500 domains in total across registrations created through either the dashboard or this API. - The domain must be on a supported extension for programmatic registration. - Use `POST /domain-check` immediately before calling this endpoint to confirm real-time availability and pricing. ### Defaults - `years`: defaults to the extension's minimum registration period (1 year for most extensions, but varies — for example, `.ai` (if supported) requires a minimum of 2 years). - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the registration. Renewal pricing may change over time based on registry pricing. - `privacy_mode`: defaults to `redaction`. ### Premium domains Premium domain registration is not currently supported by this API. If `POST /domain-check` returns `tier: premium`, do not call this endpoint for that domain. ### Response behavior By default, the server holds the connection for a bounded, server-defined amount of time while the registration completes. Most registrations finish within this window and return `201 Created` with a completed workflow status. If the registration is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`.").option(`prefer`,{type:`string`,description:`Set to \`respond-async\` to receive an immediate \`202 Accepted\` without
|
|
5
5
|
waiting for the operation to complete (RFC 7240).
|
|
6
6
|
|
|
7
7
|
The header may be combined with other preferences using standard
|
|
8
|
-
comma-separated syntax.`}).option(`
|
|
8
|
+
comma-separated syntax.`}).option(`acknowledgements`,{type:`string`,description:`Provides user acknowledgements for a specific extension or premium
|
|
9
|
+
registration flow. The extension registration schema from the
|
|
10
|
+
extension discovery endpoint identifies the required keys. Provide as a JSON object or @path/to/file.json.`}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal. Defaults to \`false\` if omitted.
|
|
9
11
|
Setting this field to \`true\` is an explicit opt-in authorizing
|
|
10
12
|
Cloudflare to charge the account's default payment method up to 30
|
|
11
13
|
days before domain expiry to renew the domain automatically.
|
|
12
14
|
Renewal pricing may change over time based on registry pricing.
|
|
13
|
-
`,default:!1}).option(`contacts-administrator-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
|
|
15
|
+
`,default:!1}).option(`contact-extensions`,{type:`string`,description:"Provides registry-specific contact extension values for the registrant.\n`GET /accounts/{account_id}/registrar/extensions/{extension}` identifies\nthe required keys and allowed values for each extension in the\n`registration_schema.properties.contact_extensions` object.\n\nExamples include `.us` nexus fields, `.uk` registrant type fields,\nand `.ca` legal type fields. Omit this object when the extension's\nregistration schema excludes `contact_extensions`. Provide as a JSON object or @path/to/file.json."}).option(`contacts-administrator-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
|
|
14
16
|
communications from the registry, including ownership verification
|
|
15
17
|
and renewal notices.
|
|
16
18
|
`}).option(`contacts-administrator-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
|
|
@@ -34,7 +36,7 @@ Most registrations do not require a fax number.
|
|
|
34
36
|
(e.g., \`example.com\`, \`mybrand.app\`). The domain name uniquely identifies
|
|
35
37
|
a registration. Cloudflare permits only one registration per domain, making
|
|
36
38
|
the domain name a natural idempotency key for registration requests.
|
|
37
|
-
`}).option(`privacy-mode`,{type:`string`,description:"Sets the WHOIS privacy mode for the registration. Defaults to `redaction`.\n- `off`: Disables WHOIS privacy.\n- `redaction`: Requests WHOIS redaction where the extension supports it.\n Some extensions exclude privacy and redaction.\n",choices:[`off`,`redaction`],default:`redaction`}).coerce(`privacy-mode`,e=>
|
|
39
|
+
`}).option(`privacy-mode`,{type:`string`,description:"Sets the WHOIS privacy mode for the registration. Defaults to `redaction`.\n- `off`: Disables WHOIS privacy.\n- `redaction`: Requests WHOIS redaction where the extension supports it.\n Some extensions exclude privacy and redaction.\n",choices:[`off`,`redaction`],default:`redaction`}).coerce(`privacy-mode`,e=>m(e,`privacy-mode`,`text`)).option(`years`,{type:`number`,description:`Sets the registration term from 1 to 10 years. When omitted, this
|
|
38
40
|
field defaults to the registry's minimum registration period for the
|
|
39
41
|
extension. Most extensions require 1 year, while some require longer
|
|
40
42
|
minimum terms (e.g., \`.ai\` requires 2 years).
|
|
@@ -42,15 +44,15 @@ minimum terms (e.g., \`.ai\` requires 2 years).
|
|
|
42
44
|
Each registry may also enforce its own maximum registration term. A
|
|
43
45
|
request above that maximum fails. When uncertain, omit this field to
|
|
44
46
|
use the default.
|
|
45
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`contacts-administrator-email`,`contacts-administrator-fax`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-administrator-postal-info-organization`,`contacts-billing-email`,`contacts-billing-fax`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-billing-postal-info-organization`,`contacts-registrant-email`,`contacts-registrant-fax`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-registrant-postal-info-organization`,`contacts-technical-email`,`contacts-technical-fax`,`contacts-technical-phone`,`contacts-technical-postal-info-name`,`contacts-technical-postal-info-organization`].some(t=>e[t]!==void 0)){let t=[`contacts-administrator-email`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-billing-email`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-registrant-email`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-technical-email`,`contacts-technical-phone`,`contacts-technical-postal-info-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --contacts-* flag is set`)}return!0})}const E={command:`create`,describe:`Create Registration`,builder:T,handler:async e=>l({command:`registrar-sandbox registrations create`,classification:{safeFlags:[`auto-renew`,`privacy-mode`,`dry-run`]}},e,async()=>{let l={};if(e.prefer!==void 0&&(l.Prefer=String(e.prefer)),e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({auto_renew:e[`auto-renew`],contacts:{administrator:{email:p(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`),fax:p(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`),phone:p(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`),postal_info:{name:p(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`),organization:p(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)}},billing:{email:p(e[`contacts-billing-email`],`contacts-billing-email`,`text`),fax:p(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`),phone:p(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`),postal_info:{name:p(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`),organization:p(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)}},registrant:{email:p(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`),fax:p(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`),phone:p(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`),postal_info:{name:p(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`),organization:p(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)}},technical:{email:p(e[`contacts-technical-email`],`contacts-technical-email`,`text`),fax:p(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`),phone:p(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`),postal_info:{name:p(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`),organization:p(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)}}},domain_name:p(e[`domain-name`],`domain-name`,`text`),privacy_mode:e[`privacy-mode`],years:e.years}):d(e.body)});return}let h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/registrar-sandbox/registrations`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`domain-name`]===void 0&&(e[`domain-name`]=await m(`domain-name`,"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests. "));let _={};e[`auto-renew`]!==void 0&&u(_,[`auto_renew`],e[`auto-renew`]),e[`contacts-administrator-email`]!==void 0&&u(_,[`contacts`,`administrator`,`email`],p(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`)),e[`contacts-administrator-fax`]!==void 0&&u(_,[`contacts`,`administrator`,`fax`],p(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`)),e[`contacts-administrator-phone`]!==void 0&&u(_,[`contacts`,`administrator`,`phone`],p(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`)),e[`contacts-administrator-postal-info-name`]!==void 0&&u(_,[`contacts`,`administrator`,`postal_info`,`name`],p(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`)),e[`contacts-administrator-postal-info-organization`]!==void 0&&u(_,[`contacts`,`administrator`,`postal_info`,`organization`],p(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)),e[`contacts-billing-email`]!==void 0&&u(_,[`contacts`,`billing`,`email`],p(e[`contacts-billing-email`],`contacts-billing-email`,`text`)),e[`contacts-billing-fax`]!==void 0&&u(_,[`contacts`,`billing`,`fax`],p(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`)),e[`contacts-billing-phone`]!==void 0&&u(_,[`contacts`,`billing`,`phone`],p(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`)),e[`contacts-billing-postal-info-name`]!==void 0&&u(_,[`contacts`,`billing`,`postal_info`,`name`],p(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`)),e[`contacts-billing-postal-info-organization`]!==void 0&&u(_,[`contacts`,`billing`,`postal_info`,`organization`],p(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)),e[`contacts-registrant-email`]!==void 0&&u(_,[`contacts`,`registrant`,`email`],p(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`)),e[`contacts-registrant-fax`]!==void 0&&u(_,[`contacts`,`registrant`,`fax`],p(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`)),e[`contacts-registrant-phone`]!==void 0&&u(_,[`contacts`,`registrant`,`phone`],p(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`)),e[`contacts-registrant-postal-info-name`]!==void 0&&u(_,[`contacts`,`registrant`,`postal_info`,`name`],p(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`)),e[`contacts-registrant-postal-info-organization`]!==void 0&&u(_,[`contacts`,`registrant`,`postal_info`,`organization`],p(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)),e[`contacts-technical-email`]!==void 0&&u(_,[`contacts`,`technical`,`email`],p(e[`contacts-technical-email`],`contacts-technical-email`,`text`)),e[`contacts-technical-fax`]!==void 0&&u(_,[`contacts`,`technical`,`fax`],p(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`)),e[`contacts-technical-phone`]!==void 0&&u(_,[`contacts`,`technical`,`phone`],p(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`)),e[`contacts-technical-postal-info-name`]!==void 0&&u(_,[`contacts`,`technical`,`postal_info`,`name`],p(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`)),e[`contacts-technical-postal-info-organization`]!==void 0&&u(_,[`contacts`,`technical`,`postal_info`,`organization`],p(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)),e[`domain-name`]!==void 0&&u(_,[`domain_name`],p(e[`domain-name`],`domain-name`,`text`)),e[`privacy-mode`]!==void 0&&u(_,[`privacy_mode`],e[`privacy-mode`]),e.years!==void 0&&u(_,[`years`],e.years);let v=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/registrar-sandbox/registrations`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations/${t.domain_name}/registration-status`};function O(e){return e.usage("$0 registrar-sandbox registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:O,handler:async e=>l({command:`registrar-sandbox registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(D,{account_id:l,domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations/${t.domain_name}/update-status`};function j(e){return e.usage("$0 registrar-sandbox registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:j,handler:async e=>l({command:`registrar-sandbox registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(A,{account_id:l,domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations/${t.domain_name}`};function P(e){return e.usage("$0 registrar-sandbox registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <domain-name>`,describe:`Get Registration`,builder:P,handler:async e=>l({command:`registrar-sandbox registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(N,{account_id:l,domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations`,query:[`cursor`,`per_page`,`direction`,`sort_by`]};function L(e){return e.usage("$0 registrar-sandbox registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
47
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`contacts-administrator-email`,`contacts-administrator-fax`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-administrator-postal-info-organization`,`contacts-billing-email`,`contacts-billing-fax`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-billing-postal-info-organization`,`contacts-registrant-email`,`contacts-registrant-fax`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-registrant-postal-info-organization`,`contacts-technical-email`,`contacts-technical-fax`,`contacts-technical-phone`,`contacts-technical-postal-info-name`,`contacts-technical-postal-info-organization`].some(t=>e[t]!==void 0)){let t=[`contacts-administrator-email`,`contacts-administrator-phone`,`contacts-administrator-postal-info-name`,`contacts-billing-email`,`contacts-billing-phone`,`contacts-billing-postal-info-name`,`contacts-registrant-email`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-technical-email`,`contacts-technical-phone`,`contacts-technical-postal-info-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --contacts-* flag is set`)}return!0})}const D={command:`create`,describe:`Create Registration`,builder:E,handler:async e=>l({command:`registrar-sandbox registrations create`,classification:{safeFlags:[`auto-renew`,`privacy-mode`,`dry-run`]}},e,async()=>{let l={};if(e.prefer!==void 0&&(l.Prefer=String(e.prefer)),e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({acknowledgements:d(e.acknowledgements,`acknowledgements`),auto_renew:e[`auto-renew`],contact_extensions:d(e[`contact-extensions`],`contact-extensions`),contacts:{administrator:{email:m(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`),fax:m(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`),phone:m(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`),postal_info:{name:m(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`),organization:m(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)}},billing:{email:m(e[`contacts-billing-email`],`contacts-billing-email`,`text`),fax:m(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`),phone:m(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`),postal_info:{name:m(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`),organization:m(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)}},registrant:{email:m(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`),fax:m(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`),phone:m(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`),postal_info:{name:m(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`),organization:m(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)}},technical:{email:m(e[`contacts-technical-email`],`contacts-technical-email`,`text`),fax:m(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`),phone:m(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`),postal_info:{name:m(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`),organization:m(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)}}},domain_name:m(e[`domain-name`],`domain-name`,`text`),privacy_mode:e[`privacy-mode`],years:e.years},[[`acknowledgements`],[`contact_extensions`]]):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/registrar-sandbox/registrations`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`domain-name`]===void 0&&(e[`domain-name`]=await h(`domain-name`,"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests. "));let v={};e.acknowledgements!==void 0&&f(v,[`acknowledgements`],d(e.acknowledgements,`acknowledgements`)),e[`auto-renew`]!==void 0&&f(v,[`auto_renew`],e[`auto-renew`]),e[`contact-extensions`]!==void 0&&f(v,[`contact_extensions`],d(e[`contact-extensions`],`contact-extensions`)),e[`contacts-administrator-email`]!==void 0&&f(v,[`contacts`,`administrator`,`email`],m(e[`contacts-administrator-email`],`contacts-administrator-email`,`text`)),e[`contacts-administrator-fax`]!==void 0&&f(v,[`contacts`,`administrator`,`fax`],m(e[`contacts-administrator-fax`],`contacts-administrator-fax`,`text`)),e[`contacts-administrator-phone`]!==void 0&&f(v,[`contacts`,`administrator`,`phone`],m(e[`contacts-administrator-phone`],`contacts-administrator-phone`,`text`)),e[`contacts-administrator-postal-info-name`]!==void 0&&f(v,[`contacts`,`administrator`,`postal_info`,`name`],m(e[`contacts-administrator-postal-info-name`],`contacts-administrator-postal-info-name`,`text`)),e[`contacts-administrator-postal-info-organization`]!==void 0&&f(v,[`contacts`,`administrator`,`postal_info`,`organization`],m(e[`contacts-administrator-postal-info-organization`],`contacts-administrator-postal-info-organization`,`text`)),e[`contacts-billing-email`]!==void 0&&f(v,[`contacts`,`billing`,`email`],m(e[`contacts-billing-email`],`contacts-billing-email`,`text`)),e[`contacts-billing-fax`]!==void 0&&f(v,[`contacts`,`billing`,`fax`],m(e[`contacts-billing-fax`],`contacts-billing-fax`,`text`)),e[`contacts-billing-phone`]!==void 0&&f(v,[`contacts`,`billing`,`phone`],m(e[`contacts-billing-phone`],`contacts-billing-phone`,`text`)),e[`contacts-billing-postal-info-name`]!==void 0&&f(v,[`contacts`,`billing`,`postal_info`,`name`],m(e[`contacts-billing-postal-info-name`],`contacts-billing-postal-info-name`,`text`)),e[`contacts-billing-postal-info-organization`]!==void 0&&f(v,[`contacts`,`billing`,`postal_info`,`organization`],m(e[`contacts-billing-postal-info-organization`],`contacts-billing-postal-info-organization`,`text`)),e[`contacts-registrant-email`]!==void 0&&f(v,[`contacts`,`registrant`,`email`],m(e[`contacts-registrant-email`],`contacts-registrant-email`,`text`)),e[`contacts-registrant-fax`]!==void 0&&f(v,[`contacts`,`registrant`,`fax`],m(e[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`)),e[`contacts-registrant-phone`]!==void 0&&f(v,[`contacts`,`registrant`,`phone`],m(e[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`)),e[`contacts-registrant-postal-info-name`]!==void 0&&f(v,[`contacts`,`registrant`,`postal_info`,`name`],m(e[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`)),e[`contacts-registrant-postal-info-organization`]!==void 0&&f(v,[`contacts`,`registrant`,`postal_info`,`organization`],m(e[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)),e[`contacts-technical-email`]!==void 0&&f(v,[`contacts`,`technical`,`email`],m(e[`contacts-technical-email`],`contacts-technical-email`,`text`)),e[`contacts-technical-fax`]!==void 0&&f(v,[`contacts`,`technical`,`fax`],m(e[`contacts-technical-fax`],`contacts-technical-fax`,`text`)),e[`contacts-technical-phone`]!==void 0&&f(v,[`contacts`,`technical`,`phone`],m(e[`contacts-technical-phone`],`contacts-technical-phone`,`text`)),e[`contacts-technical-postal-info-name`]!==void 0&&f(v,[`contacts`,`technical`,`postal_info`,`name`],m(e[`contacts-technical-postal-info-name`],`contacts-technical-postal-info-name`,`text`)),e[`contacts-technical-postal-info-organization`]!==void 0&&f(v,[`contacts`,`technical`,`postal_info`,`organization`],m(e[`contacts-technical-postal-info-organization`],`contacts-technical-postal-info-organization`,`text`)),e[`domain-name`]!==void 0&&f(v,[`domain_name`],m(e[`domain-name`],`domain-name`,`text`)),e[`privacy-mode`]!==void 0&&f(v,[`privacy_mode`],e[`privacy-mode`]),e.years!==void 0&&f(v,[`years`],e.years);let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/registrar-sandbox/registrations`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations/${t.domain_name}/registration-status`};function k(e){return e.usage("$0 registrar-sandbox registrations get-registration-status <domain-name>\n\nReturns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get-registration-status <domain-name>`,describe:`Get Registration Status`,builder:k,handler:async e=>l({command:`registrar-sandbox registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(O,{account_id:l,domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations/${t.domain_name}/update-status`};function M(e){return e.usage("$0 registrar-sandbox registrations get-update-status <domain-name>\n\nReturns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.").positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get-update-status <domain-name>`,describe:`Get Update Status`,builder:M,handler:async e=>l({command:`registrar-sandbox registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(j,{account_id:l,domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations/${t.domain_name}`};function F(e){return e.usage("$0 registrar-sandbox registrations get <domain-name>\n\nReturns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.").positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <domain-name>`,describe:`Get Registration`,builder:F,handler:async e=>l({command:`registrar-sandbox registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(P,{account_id:l,domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/registrations`,query:[`cursor`,`per_page`,`direction`,`sort_by`]};function R(e){return e.usage("$0 registrar-sandbox registrations list\n\nReturns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.").option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
46
48
|
Pass this value to fetch the next page of results. Omit (or
|
|
47
|
-
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to registration date (`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
49
|
+
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to registration date (`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List Registrations`,builder:R,handler:async e=>l({command:`registrar-sandbox registrations list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){let e=await i();s({command:`cf registrar-sandbox registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(L,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/registrar-sandbox/domain-search`,query:[`q`,`extensions`,`limit`],joined:[`extensions`],errors:{400:`BadRequestError`}};function V(e){return e.usage('$0 registrar-sandbox registrations search\n\nSearches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. ### Use cases - Brand name discovery (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., "example.com" → example.com, example.app, example.xyz) ### Workflow 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check` with the user\'s chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., "com" or ".app") is not supported. Provide a keyword or domain name.').option(`query`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
|
|
48
50
|
- Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.
|
|
49
51
|
- Domain names: "example.com" returns example.com and variations across extensions`,demandOption:!0}).option(`extensions`,{type:`string`,description:`Limits results to specific domain extensions from the supported set. If not specified,
|
|
50
52
|
returns results across all supported extensions. Extensions not in the supported
|
|
51
|
-
set are silently ignored.`}).option(`limit`,{type:`number`,description:`Maximum number of domain suggestions to return. Defaults to 20 if not specified.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
53
|
+
set are silently ignored.`}).option(`limit`,{type:`number`,description:`Maximum number of domain suggestions to return. Defaults to 20 if not specified.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`search`,describe:`Search for available domains`,builder:V,handler:async e=>l({command:`registrar-sandbox registrations search`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={q:e.query,extensions:e.extensions,limit:e.limit};if(e.dryRun){let e=await i();s({command:`cf registrar-sandbox registrations search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/registrar-sandbox/domain-search`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(B,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};function U(e){return e.usage("$0 registrar-sandbox registrations update <domain-name>\n\nUpdates an existing domain registration. By default, the server holds the connection for a bounded, server-defined amount of time while the update completes. Most updates finish within this window and return `200 OK` with a completed workflow status. If the update is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`. This endpoint currently supports updating `auto_renew` only.").positional(`domain-name`,{type:`string`,description:`Domain name to update.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to receive an immediate `202 Accepted` without\nwaiting for the operation to complete (RFC 7240)."}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal.
|
|
52
54
|
Setting this field to \`true\` authorizes Cloudflare to charge the
|
|
53
55
|
account's default payment method up to 30 days before domain expiry
|
|
54
56
|
to renew the domain automatically. Renewal pricing may change over
|
|
55
57
|
time based on registry pricing.
|
|
56
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. "})}const
|
|
58
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. "})}const W={command:`update <domain-name>`,describe:`Update Registration`,builder:U,handler:async e=>l({command:`registrar-sandbox registrations update`,classification:{safeFlags:[`auto-renew`,`dry-run`]}},e,async()=>{let l={};if(e.prefer!==void 0&&(l.Prefer=String(e.prefer)),e.dryRun){let t=await i();s({command:`cf registrar-sandbox registrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/registrar-sandbox/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({auto_renew:e[`auto-renew`]}):u(e.body)});return}let d=await r(e),m=e.local?t:await a();if(e.accountId=m,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n(d,`PATCH`,`/accounts/${m}/registrar-sandbox/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let h={};e[`auto-renew`]!==void 0&&f(h,[`auto_renew`],e[`auto-renew`]);let g=await c(`Updating`,async()=>n(d,`PATCH`,`/accounts/${m}/registrar-sandbox/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:h,headers:Object.keys(l).length>0?l:void 0}));o(g,{successLabel:`Updated`})})},G={command:`registrations`,describe:`Operations for registrations`,builder:e=>e.command(T).command(D).command(I).command(A).command(N).command(z).command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`registrar-sandbox`,describe:`registrar-sandbox`,builder:e=>e.command(S).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./cf-
|
|
2
|
+
import{i as e}from"./cf-PISMdEje.mjs";import{resolve as t}from"node:path";const n=`CLOUDFLARE_REGISTRY_PATH`;function r(r=process.env){let i=r[n];return i===void 0||i===``?t(e(),`registry`):t(i)}function i(e=process.env){let t=r(e);return{[n]:t,WRANGLER_REGISTRY_PATH:t,MINIFLARE_REGISTRY_PATH:t}}export{r as n,i as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{i as f}from"./prompt-1AC-qwxS.mjs";var p={method:`GET`,path:t=>e`/accounts/${t.account_id}/reporting/industry`};function m(e){return e.usage(`$0 reporting industry get
|
|
3
3
|
|
|
4
4
|
Gets the industry classification for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Get an account industry`,builder:m,handler:async e=>c({command:`reporting industry get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf reporting industry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(p,{account_id:l}));a(u,{successLabel:`Loaded`})})};var g={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/reporting/industry`,body:`json`,errors:{400:`BadRequestError`,423:`LockedError`,500:`InternalServerError`}};function _(e){return e.usage(`$0 reporting industry update
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./agent-context-DFEgYjEQ.mjs";import{t}from"./version-
|
|
2
|
+
import{t as e}from"./agent-context-DFEgYjEQ.mjs";import{t}from"./version-CLgSHoNm.mjs";import{i as n,t as r}from"./interactive-d_lFnSev.mjs";function i(){return r?`ci`:n()?`interactive`:`non-interactive`}function a(){let n=e(),r=n.isAgentic&&n.harness!==null?{"X-CF-CLI-Agent":n.harness.id}:{};return{"User-Agent":t,"X-CF-CLI-Mode":i(),...r}}export{a as n,i as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,r as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p}from"./prompt-1AC-qwxS.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/request-tracer/trace`,body:`json`};function h(e){return e.usage(`$0 request-tracers traces create
|
|
3
|
+
|
|
4
|
+
Traces a simulated HTTP request through Cloudflare's edge to analyze how rules, settings, and configurations would process the request. Useful for debugging firewall rules, page rules, and other request transformations without sending actual traffic. Supports custom headers, cookies, body content, and geolocation context.`).option(`body-base64`,{type:`string`,description:`Base64 encoded request body`}).option(`body-json`,{type:`string`,description:`Arbitrary json as request body. Provide as a JSON object or @path/to/file.json.`}).option(`body-plain-text`,{type:`string`,description:`Request body as plain text`}).option(`context-bot-score`,{type:`number`,description:`Bot score used for evaluating tracing request processing`}).option(`context-geoloc-city`,{type:`string`,description:`The context.geoloc.city field`}).option(`context-geoloc-continent`,{type:`string`,description:`The context.geoloc.continent field`}).option(`context-geoloc-is-eu-country`,{type:`boolean`,description:`The context.geoloc.is_eu_country field`}).option(`context-geoloc-iso-code`,{type:`string`,description:`The context.geoloc.iso_code field`}).option(`context-geoloc-latitude`,{type:`number`,description:`The context.geoloc.latitude field`}).option(`context-geoloc-longitude`,{type:`number`,description:`The context.geoloc.longitude field`}).option(`context-geoloc-postal-code`,{type:`string`,description:`The context.geoloc.postal_code field`}).option(`context-geoloc-region-code`,{type:`string`,description:`The context.geoloc.region_code field`}).option(`context-geoloc-subdivision-2-iso-code`,{type:`string`,description:`The context.geoloc.subdivision_2_iso_code field`}).option(`context-geoloc-timezone`,{type:`string`,description:`The context.geoloc.timezone field`}).option(`context-skip-challenge`,{type:`boolean`,description:`Whether to skip any challenges for tracing request (e.g.: captcha)`}).option(`context-threat-score`,{type:`number`,description:`Threat score used for evaluating tracing request processing`}).option(`cookies`,{type:`string`,description:`Cookies added to tracing request. Provide as a JSON object or @path/to/file.json.`}).option(`headers`,{type:`string`,description:`Headers added to tracing request. Provide as a JSON object or @path/to/file.json.`}).option(`method`,{type:`string`,description:`HTTP Method of tracing request`}).option(`protocol`,{type:`string`,description:`HTTP Protocol of tracing request`}).option(`skip-response`,{type:`boolean`,description:`Skip sending the request to the Origin server after all rules evaluation`}).option(`url`,{type:`string`,description:`URL to which perform tracing request`}).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:`Request Trace`,builder:h,handler:async e=>c({command:`request-tracers traces create`,classification:{safeFlags:[`context-geoloc-is-eu-country`,`context-skip-challenge`,`skip-response`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf request-tracers traces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/request-tracer/trace`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({body:{base64:f(e[`body-base64`],`body-base64`,`text`),json:u(e[`body-json`],`body-json`),plain_text:f(e[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:e[`context-bot-score`],geoloc:{city:f(e[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:f(e[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:e[`context-geoloc-is-eu-country`],iso_code:f(e[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:e[`context-geoloc-latitude`],longitude:e[`context-geoloc-longitude`],postal_code:f(e[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:f(e[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:f(e[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:f(e[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:e[`context-skip-challenge`],threat_score:e[`context-threat-score`]},cookies:u(e.cookies,`cookies`),headers:u(e.headers,`headers`),method:f(e.method,`method`,`text`),protocol:f(e.protocol,`protocol`,`text`),skip_response:e[`skip-response`],url:f(e.url,`url`,`text`)},[[`body`,`json`],[`cookies`],[`headers`]]):l(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e.method===void 0&&(e.method=await p(`method`,`HTTP Method of tracing request`)),e.url===void 0&&(e.url=await p(`url`,`URL to which perform tracing request`));let g=d({body:{base64:f(e[`body-base64`],`body-base64`,`text`),json:u(e[`body-json`],`body-json`),plain_text:f(e[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:e[`context-bot-score`],geoloc:{city:f(e[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:f(e[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:e[`context-geoloc-is-eu-country`],iso_code:f(e[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:e[`context-geoloc-latitude`],longitude:e[`context-geoloc-longitude`],postal_code:f(e[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:f(e[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:f(e[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:f(e[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:e[`context-skip-challenge`],threat_score:e[`context-threat-score`]},cookies:u(e.cookies,`cookies`),headers:u(e.headers,`headers`),method:f(e.method,`method`,`text`),protocol:f(e.protocol,`protocol`,`text`),skip_response:e[`skip-response`],url:f(e.url,`url`,`text`)},[[`body`,`json`],[`cookies`],[`headers`]]),_=await s(`Creating`,async()=>c.send(m,{body:g,account_id:h}));a(_,{successLabel:`Created`})})},_={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
|